命令行工具集

Smithery CLI是一个命令行工具集,用于连接代理到数千种技能和MCP服务器,支持搜索、安装和管理功能。

  • by arcadeai-labs
  • TypeScript
  • 本地部署
  • 848 星标
  • 更新于
在 GitHub 查看 smithery-ai/cli

使用说明

Smithery CLI

Smithery CLI直接从命令行将您的代理连接到数千个技能和MCP服务器。要开始,只需运行 npx skills add smithery/cli.

安装

npm install -g smithery@latest

需要Node.js 20+。

命令

MCP服务器

smithery mcp search [term]              # Search the Smithery registry
smithery mcp add <url>                  # Add an MCP server connection
smithery mcp list                       # List your connections
smithery mcp remove <ids...>            # Remove connections

工具

与通过以下方式连接的MCP服务器上的工具进行交互 smithery mcp.

smithery tool list [connection]        # List tools from your connected MCP servers
smithery tool find [query]             # Search tools by name or intent
smithery tool get <connection> <tool>  # Show full details for one tool
smithery tool call <connection> <tool> [args]  # Call a tool

技能

浏览技能 Smithery技能登记处 和 使用上游安装程序安装它们:

npx skills add <skill>   # e.g. npx skills add smithery-ai/cli

认证

smithery auth login                     # Login with Smithery (OAuth)
smithery auth logout                    # Log out
smithery auth whoami                    # Check current user
smithery auth token                     # Mint a service token
smithery auth token --policy '<json>'   # Mint a restricted token

命名空间

smithery namespace list                 # List your namespaces
smithery namespace use <name>           # Set current namespace

出版

smithery mcp publish <url> -n <org/server>          # Publish an MCP server URL
smithery mcp publish <bundle.mcpb> -n <org/server>  # Publish an MCP bundle

例子

# Search and connect to an MCP server
smithery mcp search "github"
smithery mcp add github --id github

# Find and call tools from your connected MCP servers
smithery tool find "create issue"
smithery tool call github create_issue '{"title":"Bug fix","body":"..."}'

# Browse and install skills
smithery skill search "frontend" --json --page 2
smithery skill add anthropics/frontend-design --agent claude-code

# Publish your MCP server URL
smithery mcp publish https://my-mcp-server.com -n myorg/my-server

# Publish a built MCP bundle
smithery mcp publish ./server.mcpb -n myorg/my-server

发展

git clone https://github.com/smithery-ai/cli
cd cli && pnpm install && pnpm run build
npx . --help

贡献

欢迎投稿!请提交拉取请求。