romate-mcp-server
Allows interaction with GitHub's API through the GitHub MCP server, providing tools for repository search and other GitHub operations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🚀 mcp-proxy-server
HTTP MCP Gateway — 将本地 stdio MCP 工具暴露为 HTTP/SSE 协议。
你只需要配置本地执行的命令,romate-mcp-server 就会自动将任意 stdio MCP 服务器注册为 HTTP 端点,让远程客户端(如 Claude Desktop、Cline 等)通过网络调用。
特性
特性 | 说明 |
🔌 零代码集成 | 只需 YAML 配置命令,无需修改任何 MCP 服务器代码 |
🌐 HTTP + SSE 双协议 | 支持 Streamable HTTP 和 Server-Sent Events 两种传输方式 |
🔗 聚合模式 | 单一路径聚合所有工具,自动 |
🔐 Bearer Token 鉴权 | 可选 Token 鉴权,支持排除路径 |
♻️ 自动重启 | 子进程崩溃后自动重启,指数退避策略 |
⏱️ 超时控制 | 握手超时 10s,工具调用超时 60s |
🔄 配置热重载 | 监听配置文件变更,自动增删改代理实例 |
🩺 健康检查 |
|
Related MCP server: mcp_sdk_eyra_accelerator
快速开始
安装
git clone https://github.com/haode01/mcp-proxy-server.git && cd romate-mcp-server
npm install
npm run build配置
创建 config.yaml:
server:
port: 3100
host: "0.0.0.0"
auth:
token: "your-secret-token" # 可选,Bearer Token 鉴权
excludePaths:
- "/health" # 无需鉴权的路径
tools:
- name: "filesystem"
description: "文件系统操作工具"
command: "npx"
args:
- "-y"
- "@modelcontextprotocol/server-filesystem"
- "/tmp"
restart: true
restartDelay: 2000
- name: "github"
description: "GitHub API 工具"
command: "npx"
args:
- "-y"
- "@modelcontextprotocol/server-github"
env:
GITHUB_TOKEN: "${GITHUB_TOKEN}" # 支持环境变量插值启动
# 开发模式(热重载)
npm run dev -- ./config.yaml
# 生产模式
npm run build
node dist/index.js ./config.yaml路由总览
路径 | 方法 | 说明 |
| GET | 健康检查(无需鉴权) |
| GET | 列出所有已注册工具 |
| POST | 单工具 Streamable HTTP |
| GET | 单工具 SSE 端点 |
| POST | 单工具 SSE 消息 |
| POST | 聚合模式 — 所有工具统一入口 |
| GET | 聚合模式 SSE 端点 |
| POST | 聚合模式 SSE 消息 |
使用示例
单工具模式
# 列出工具
curl -H "Authorization: Bearer your-secret-token" \
-H "Content-Type: application/json" \
-X POST http://localhost:3100/mcp/filesystem \
-d '{"method":"tools/list","id":1}'
# 调用工具
curl -H "Authorization: Bearer your-secret-token" \
-H "Content-Type: application/json" \
-X POST http://localhost:3100/mcp/filesystem \
-d '{
"method": "tools/call",
"params": {
"name": "read_file",
"arguments": { "path": "/tmp/test.txt" }
},
"id": 2
}'聚合模式
聚合模式下,工具名自动添加 {proxyName}_ 前缀以避免冲突:
# 列出所有工具(返回 echo_echo, filesystem_read_file, github_search_repos 等)
curl -H "Authorization: Bearer your-secret-token" \
-H "Content-Type: application/json" \
-X POST http://localhost:3100/mcp \
-d '{"method":"tools/list","id":1}'
# 调用工具 — 使用 proxyName_toolName 格式
curl -H "Authorization: Bearer your-secret-token" \
-H "Content-Type: application/json" \
-X POST http://localhost:3100/mcp \
-d '{
"method": "tools/call",
"params": {
"name": "filesystem_read_file",
"arguments": { "path": "/tmp/test.txt" }
},
"id": 2
}'SSE 模式(适用于 Claude Desktop 等客户端)
# 1. 客户端建立 SSE 连接
GET /mcp/filesystem/sse
→ event: endpoint
→ data: http://localhost:3100/mcp/filesystem/message?sessionId=filesystem-1
→ event: tools_list
→ data: [...]
# 2. 客户端向 endpoint URL 发送 JSON-RPC 请求
POST http://localhost:3100/mcp/filesystem/message?sessionId=filesystem-1
Content-Type: application/json
{"method":"tools/list","id":1}
# 3. 响应通过 SSE 连接返回
→ event: message
→ data: {"jsonrpc":"2.0","result":{"tools":[...]},"id":1}MCP 客户端配置
romate-mcp-server 兼容所有支持 HTTP/SSE 传输的 MCP 客户端。以下是一些常见客户端的配置方式:
Claude Desktop
在 claude_desktop_config.json 中添加 MCP 服务器配置:
{
"mcpServers": {
"romate-filesystem": {
"type": "sse",
"url": "http://your-server:3100/mcp/filesystem/sse",
"headers": {
"Authorization": "Bearer your-secret-token"
}
},
"romate-github": {
"type": "sse",
"url": "http://your-server:3100/mcp/github/sse",
"headers": {
"Authorization": "Bearer your-secret-token"
}
}
}
}Cline / Roo Code / Claude Dev
在 MCP 配置文件(通常为 ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json 或类似路径)中添加:
{
"mcpServers": {
"romate-filesystem": {
"type": "sse",
"url": "http://your-server:3100/mcp/filesystem/sse",
"headers": {
"Authorization": "Bearer your-secret-token"
}
}
}
}聚合模式客户端配置
如果希望在一个 SSE 连接中访问所有工具,使用聚合端点:
{
"mcpServers": {
"romate-all-tools": {
"type": "sse",
"url": "http://your-server:3100/mcp/sse",
"headers": {
"Authorization": "Bearer your-secret-token"
}
}
}
}注意:聚合模式下工具名会带有
{proxyName}_前缀,例如filesystem_read_file、github_search_repos。
自定义客户端(Streamable HTTP)
支持 MCP Streamable HTTP 传输的客户端可以直接使用 POST 端点:
POST http://your-server:3100/mcp/filesystem
Content-Type: application/json
Authorization: Bearer your-secret-token
{"method":"tools/list","id":1}配置参考
server 配置
字段 | 类型 | 默认值 | 说明 |
| number |
| HTTP 监听端口 |
| string |
| 监听地址 |
| string | — | Bearer Token,不配置则不启用鉴权 |
| string[] |
| 无需鉴权的路径前缀 |
tools[] 配置
字段 | 类型 | 默认值 | 说明 |
| string | — | 必填。工具唯一标识名 |
| string |
| 工具描述 |
| string | — | 必填。启动命令 |
| string[] |
| 命令参数 |
| object |
| 环境变量,支持 |
| string | — | 工作目录 |
| boolean |
| 崩溃后是否自动重启 |
| number |
| 重启基础延迟(ms),指数退避 x2,上限 30s |
架构
┌─────────────────────────────────────────────────┐
│ HTTP Client │
│ (Claude Desktop, Cline, curl, etc.) │
└──────────────────┬──────────────────────────────┘
│ HTTP/SSE
▼
┌─────────────────────────────────────────────────┐
│ romate-mcp-server │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Auth │ │ Routes │ │ Health │ │
│ │ Middleware│ │ /mcp/* │ │ /health │ │
│ └──────────┘ └────┬─────┘ └──────────┘ │
│ │ │
│ ┌──────────────────▼──────────────────────────┐ │
│ │ ProxyManager │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ McpProxy │ │ McpProxy │ │ McpProxy │ │ │
│ │ │ (echo) │ │(fs) │ │(github) │ │ │
│ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ │
│ └───────┼──────────────┼──────────────┼────────┘ │
└──────────┼──────────────┼──────────────┼──────────┘
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ stdio │ │ stdio │ │ stdio │
│ MCP 进程 │ │ MCP 进程 │ │ MCP 进程 │
└──────────┘ └──────────┘ └──────────┘工作流程
启动 → 加载 YAML 配置 → 为每个工具创建
McpProxy实例连接 → 每个
McpProxy通过StdioClientTransport启动子进程 → 完成 MCP 握手 → 缓存 tools/resources/prompts代理 → HTTP 请求到达 → 鉴权 → 路由到对应
McpProxy→ JSON-RPC 调用转发到子进程 → 返回结果容错 → 子进程崩溃 →
onclose触发 → 指数退避自动重启(restart: true时)热重载 → 配置文件变更 → 对比新旧配置 → 自动增/删/改代理实例
开发
# 类型检查
npm run typecheck
# 开发模式(tsx watch 自动重启)
npm run dev -- ./config.yaml
# 构建
npm run build
# 生产启动
npm start -- ./config.yaml许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA dual-transport MCP server that exposes your API as tools to LLM clients, supporting both stdio transport for local clients like Claude Desktop and HTTP/SSE transport for remote clients like OpenAI's Responses API.-
- FlicenseNot gradedqualityDmaintenanceA standalone MCP server that exposes API endpoints as tools for AI assistants by proxying requests to a target API defined in an OpenAPI specification. It supports various authentication methods and utilizes Server-Sent Events (SSE) to facilitate integration with clients like Claude and ChatGPT.-
- AlicenseNot gradedqualityDmaintenanceExposes any stdio-based MCP server to the internet via HTTP/SSE transport, enabling remote agents to access MCP tools over a network.27 npmMIT
- FlicenseNot gradedqualityDmaintenanceA standalone MCP server that exposes API endpoints as tools for AI assistants, using SSE transport.-