MCP 代理服务器
一个通过单一 HTTP 服务器聚合和提供多个 MCP 资源服务器的代理服务。
快速入门
安装
从源码构建
- 克隆仓库:
git clone https://github.com/TBXark/mcp-proxy.git
- 构建项目:
cd mcp-proxy && make build
- 运行:
./build/mcp-proxy --config path/to/config.json
使用 Go 安装
运行以下命令:
go install github.com/TBXark/mcp-proxy@latest
使用 Docker
运行以下命令启动容器:
docker run -d -p 9090:9090 -v /path/to/config.json:/config/config.json ghcr.io/tbxark/mcp-proxy:latest
配置
创建 JSON 配置文件,示例:
{
"mcpProxy": {
"baseURL": "https://mcp.example.com",
"addr": ":9090"
},
"mcpServers": {
"example": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}
使用
- 启动服务后访问:
http(s)://{baseURL}/{clientName}/sse
- 示例:
https://mcp.example.com/fetch/sse