Btwiuse_npm Search Mcp Server

Btwiuse_npm Search Mcp Server

🚀 npm-search MCP 服务器

npm-search MCP 服务器是一个模型上下文协议(Model Context Protocol)服务器,允许你通过调用 npm search 命令搜索 npm 包,为软件包查找提供便利。

smithery badge

✨ 主要特性

  • 提供 search_npm_packages 工具,可用于搜索 npm 包。
  • 支持多种安装方式,包括通过 Smithery、NPM 以及 uv 工具。
  • 可配置为 Claude.app 和 Zed 等工具使用。
  • 支持调试和项目构建。

📦 安装指南

使用 Smithery 安装

通过 Smithery 自动为 Claude Desktop 安装 npm-search:

npx -y @smithery/cli install npm-search-mcp-server --client claude

使用 NPM(推荐)

你可以通过 npm 安装 npm-search-mcp-server

npm install -g npm-search-mcp-server

安装完成后,可以通过以下命令运行它:

npm-search-mcp-server

使用 uv

当使用 uv 时,无需特定安装。我们将使用 uvx 直接运行 npm-search-mcp-server

📚 详细文档

可用工具

  • search_npm_packages - 搜索 npm 包。
    • 必要参数:
      • query (字符串):搜索查询。

配置

配置为 Claude.app 使用

添加到你的 Claude 设置中:

使用 npm 安装
"mcpServers": {
"npm-search": {
"command": "npx",
"args": ["-y", "npm-search-mcp-server"]
}
}
使用 uvx
"mcpServers": {
"npm-search": {
"command": "uvx",
"args": ["npm-search-mcp-server"]
}
}

配置为 Zed 使用

添加到你的 Zed settings.json 中:

使用 npm 安装
"context_servers": {
"npm-search-mcp-server": {
"command": "npx",
"args": ["-y", "npm-search-mcp-server"]
}
},
使用 uvx
"context_servers": {
"npm-search-mcp-server": {
"command": "uvx",
"args": ["npm-search-mcp-server"]
}
}

💻 使用示例

基础用法

以下是一个请求和响应示例: 请求:

{
"intent": "search_npm_packages",
"arguments": {
"query": "node"
}
}

响应:

{
"result": {
"packages": [
{
"name": "node",
"version": "16.14.2",
"description": "Node.js: A platform built on Chrome's JavaScript runtime."
},
// 更多结果...
]
}
}

🔧 技术细节

调试

要调试服务器,请运行:

npm run debug

然后使用支持 LSP 的编辑器(如 VS Code)连接到端点 127.0.0.1:3000

构建

你可以通过以下命令构建项目:

docker build -t npm-search-mcp-server .

📄 许可证

该项目是开源的,使用 MIT 许可证。有关贡献和更多信息,请访问 GitHub 仓库

  • 0 关注
  • 0 收藏,23 浏览
  • system 提出于 2025-09-23 10:42

相似服务问题

相关AI产品