npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

earthsdk3-mcp

v0.0.1-beta.1

Published

地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn

Readme


立即体验 快速上手 示例 API 文档

earthsdk3-mcp 是一个将 EarthSDK 常规能力以 MCP 工具方式封装的前端集成库,使大模型(LLM)能够直接操控 EarthSDK 并实现更自然的交互体验。工具完全基于浏览器环境运行,与 EarthSDK 的原生设计逻辑高度一致,可充分发挥其前端渲染、高性能可视化以及场景实时更新等优势。通过这种纯前端模式,能够最大程度保持 EarthSDK 的动态性、渲染效率与交互性,从而让开发者获得更贴近原生 EarthSDK 的使用效果。实现真正的言出法随。

开始

安装

earthsdk3 是必须安装的基础包。

pnpm add earthsdk3 --save
pnpm add earthsdk3-mcp --save

以下为完整的使用示例,earthsdk3、earthsdk3-mcp、OpenAI 相结合。

import { ESObjectsManager } from "earthsdk3";
import { ESMCPService } from "earthsdk3-mcp";
import OpenAI from 'openai';

const objm = new ESObjectsManager();
const service = new ESMCPService(objm);
//service._registerTools(tool);

const tools = service.listTools();
console.log('all tools ',tools);

const messages = [ { role: 'user', content: '获取当前场景相机视角的信息' }];

const client = new OpenAI({apiKey: "YOUR_API_KEY", baseURL: "YOUR_BASE_URL"});

const formattedTools = tools.map(tool => ({
  type: 'function',
  function: { name: tool.name, description: tool.description,parameters: tool.inputSchema}
}));

const response = await client.chat.completions.create({ model: 'YOUR_MODEL_NAME', messages, tools: formattedTools});

const responseMessage = response.choices[0].message;

const tool_calls = responseMessage.tool_calls.map(call => ({
    name: call.function.name,
    arguments: JSON.parse(call.function.arguments)
}));

tool_calls.forEach(async(call) => {
  console.log(call.name, call.arguments);
  const result = await service.callTool(call.name, call.arguments);
  messages.push({ role: 'assistant', content: result });
});

console.log('final messages ',messages);

此开发包版权归北京西部世界科技有限公司所有。