返回市场
MCPRouter

MCPRouter

作者:chatmcp294 星标更新:2025-07-22

项目介绍

mcprouter

适用于MCP服务器的OpenRouter

mcp-infa

启动代理服务器

  1. 编辑配置文件
cp .env.example.toml .env.toml

根据需要编辑.env.toml

  1. 启动代理服务器
go run main.go proxy
  1. 在MCP客户端(如Cursor)中添加代理URL

http://localhost:8025/sse/fetch

确保在.env.toml中设置了mcp_server_commands.fetch

启动API服务器

  1. 编辑配置文件
cp .env.example.toml .env.toml

根据需要编辑.env.toml

  1. 启动API服务器
go run main.go api
  1. 使用curl请求API
curl -X POST http://127.0.0.1:8027/v1/list-tools \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer fetch'

确保在.env.toml中设置了mcp_server_commands.fetch