/ 目录 / 演练场 / Smithery CLI
● 官方 smithery-ai ⚡ 即开即用

Smithery CLI

作者 smithery-ai · smithery-ai/cli

Smithery 官方 CLI——smithery install <server> 即可将 MCP 添加到你的客户端配置,附带开发模式用于构建自己的 MCP。

Smithery 托管了公开的 MCP server 注册表。该 CLI 支持针对客户端配置安装/卸载,列出已安装的 server,以及脚手架生成新 MCP 用于发布。

为什么要用

核心特性

实时演示

实际使用效果

就绪

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "smithery-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli"
      ]
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "smithery-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli"
      ]
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "smithery-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli"
      ]
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "smithery-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli"
      ]
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "smithery-cli",
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "smithery-cli": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@smithery/cli"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add smithery-cli -- npx -y @smithery/cli

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: Smithery CLI

无需手动编辑配置即可安装 MCP

👤 开发者 ⏱ ~15 min intermediate

何时使用: 你厌倦了手动合并 stdio 配置。

步骤
  1. 浏览
    smithery search <topic>✓ 已复制
    → 匹配结果列出
  2. 安装
    smithery install <slug>✓ 已复制
    → 配置已编辑;重启客户端
  3. 验证
    smithery list✓ 已复制
    → server 已出现在列表中

结果: 新 MCP 安装完毕,无需查阅配置文件。

组合

与其他 MCP 搭配,撬动十倍杠杆

smithery-cli + mcp2cli

直接调试 Smithery 安装的 MCP

Combine smithery-cli with mcp2cli: Debug a Smithery-installed MCP directly✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
CLI subcommands (见文档) install / uninstall / list / dev / publish 1 次调用

成本与限制

运行它的成本

API 配额
不适用
每次调用 Token 数
不适用
费用
免费
提示
锁定版本——不带版本号的 slug 会跟踪最新版

安全

权限、密钥、影响范围

凭据存储: 会编辑你的客户端配置文件
数据出站: smithery.ai 注册表

故障排查

常见错误与修复

找不到配置文件

传入 --config-path;CLI 会猜测默认路径,但各 OS 有差异

替代方案

Smithery CLI 对比其他方案

替代方案何时用它替代权衡
手动配置你喜欢完全掌控更多手动工作

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills