NPM MCP 服务器 - TypeScript 实现

NPM MCP 服务器 - TypeScript 实现

一个通过 Model Context Protocol 提供 NPM 包信息查询功能的服务器。

快速入门

安装

使用 Smithery 安装

运行以下命令: npx -y @smithery/cli install @mateusribeirocampos/npm-mcp-server --client claude

手动安装

运行以下命令: npm install

构建

运行以下命令构建项目: npm run build

启动

运行以下命令启动服务器: npm start

开发模式下可使用: npm run dev

使用

  1. 搜索 NPM 包 调用 searchNpmPackage 工具,例如: const result = await server.tools.searchNpmPackage({ packageName: "react" });

  2. 获取热门包 访问资源 URI: npm://popular 获取前 10 热门包列表。