cycle-mcp-client
v1.0.0
Published
MCP Client proxy for remote Cycle MCP Server
Maintainers
Readme
cycle-mcp-client
Cycle MCP Server 的客户端代理,用于连接远程 MCP Server。
安装
全局安装(推荐)
npm install -g @cycle/mcp-client使用 npx(无需安装)
无需安装,直接使用:
npx @cycle/mcp-client配置
设置环境变量 MCP_SERVER_URL 指向远程 MCP Server:
export MCP_SERVER_URL=https://api.xxx.com/mcp使用
Cursor 配置
编辑 ~/.cursor/mcp.json:
{
"mcpServers": {
"cycle": {
"command": "mcp-client",
"env": {
"MCP_SERVER_URL": "https://api.xxx.com/mcp"
}
}
}
}Claude Desktop 配置
编辑配置文件(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"cycle": {
"command": "mcp-client",
"env": {
"MCP_SERVER_URL": "https://api.xxx.com/mcp"
}
}
}
}使用 npx
如果使用 npx,配置如下:
{
"mcpServers": {
"cycle": {
"command": "npx",
"args": ["cycle-mcp-client"],
"env": {
"MCP_SERVER_URL": "https://api.xxx.com/mcp"
}
}
}
}工作原理
客户端代理将 stdio 的 JSON-RPC 请求转换为 HTTP/SSE 请求,发送到远程 MCP Server,并将响应转换回 stdio 格式。
更新
全局安装
npm update -g @cycle/mcp-clientnpx
npx 会自动使用最新版本,无需手动更新。
故障排除
找不到命令
确保已全局安装,或使用 npx。
连接失败
检查 MCP_SERVER_URL 环境变量是否正确设置,服务器是否可访问。
