这是一个与 Smithery Registry API 接口的 MCP 服务器,允许 AI 代理搜索 MCP 服务器,获取服务器详情,并创建连接 URL。
此服务器实现了 llms.txt 中描述的功能,提供了一种程序化的方式来搜索并获取模型上下文协议(MCP)服务器的启动配置。
# 克隆仓库
git clone https://github.com/aloshy-ai/smithery-registry-mcp.git
cd smithery-registry-mcp
# 安装依赖
npm install
# 构建项目
npm run build
你可以以两种模式运行服务器:
STDIO 模式(默认,用于 LLM 客户端):
npm start
SSE 模式(用于 Web 应用程序):
npm run sse
PORT:在 SSE 模式下监听的端口(默认:3000)HOST:在 SSE 模式下绑定的主机(默认:localhost)ENDPOINT:SSE 连接的端点路径(默认:/sse)USE_SSE:设置为 "true" 以在 SSE 模式而不是 STDIO 模式下运行# 使用 Smithery CLI 安装服务器
npx @smithery/cli install @aloshy-ai/smithery-registry-mcp
# 与各种客户端一起使用
npx @smithery/cli run @aloshy-ai/smithery-registry-mcp --client claude
authenticate使用你的 Smithery API 密钥进行身份验证。
参数:
apiKey:你的 Smithery API 密钥listServers搜索并从 Smithery Registry 中检索服务器列表。
参数:
query(可选):搜索查询(语义搜索)page(可选,默认值:1):分页的页码pageSize(可选,默认值:1_0):每页的项数getServer通过其限定名称获取特定服务器的详细信息。
参数:
qualifiedName:要获取详细信息的服务器的限定名称createConnectionUrl为具有所提供配置的服务器创建 WebSocket 连接 URL。
参数:
qualifiedName:服务器的限定名称config:匹配服务器模式的配置对象这里是如何使用此服务器与 AI 助手交互的一个例子:
authenticate({ apiKey: "your-smithery-api-key" })
listServers({ query: "web search capabilities" })
getServer({ qualifiedName: "brave-search" })
createConnectionUrl({
qualifiedName: "brave-search",
config: { apiKey: "your-brave-api-key" }
})
MIT