romate-mcp-server
This server exposes local stdio MCP tools as HTTP/SSE endpoints, enabling remote clients like Claude Desktop to call them. It supports single-tool and aggregated modes with authentication, auto-restart, and hot reload.
README
๐ 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 ไธค็งไผ ่พๆนๅผ |
| ๐ ่ๅๆจกๅผ | ๅไธ่ทฏๅพ่ๅๆๆๅทฅๅ
ท๏ผ่ชๅจ proxyName_toolName ๅ็ผ่ทฏ็ฑ |
| ๐ Bearer Token ้ดๆ | ๅฏ้ Token ้ดๆ๏ผๆฏๆๆ้ค่ทฏๅพ |
| โป๏ธ ่ชๅจ้ๅฏ | ๅญ่ฟ็จๅดฉๆบๅ่ชๅจ้ๅฏ๏ผๆๆฐ้้ฟ็ญ็ฅ |
| โฑ๏ธ ่ถ ๆถๆงๅถ | ๆกๆ่ถ ๆถ 10s๏ผๅทฅๅ ท่ฐ็จ่ถ ๆถ 60s |
| ๐ ้ ็ฝฎ็ญ้่ฝฝ | ็ๅฌ้ ็ฝฎๆไปถๅๆด๏ผ่ชๅจๅขๅ ๆนไปฃ็ๅฎไพ |
| ๐ฉบ ๅฅๅบทๆฃๆฅ | /health ๅ /tools ็ซฏ็น๏ผๅฎๆถ็ๆง็ถๆ |
ๅฟซ้ๅผๅง
ๅฎ่ฃ
git clone <your-repo> && 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
่ทฏ็ฑๆป่ง
| ่ทฏๅพ | ๆนๆณ | ่ฏดๆ |
|---|---|---|
/health |
GET | ๅฅๅบทๆฃๆฅ๏ผๆ ้้ดๆ๏ผ |
/tools |
GET | ๅๅบๆๆๅทฒๆณจๅๅทฅๅ ท |
/mcp/:toolName |
POST | ๅๅทฅๅ ท Streamable HTTP |
/mcp/:toolName/sse |
GET | ๅๅทฅๅ ท SSE ็ซฏ็น |
/mcp/:toolName/message?sessionId= |
POST | ๅๅทฅๅ ท SSE ๆถๆฏ |
/mcp |
POST | ่ๅๆจกๅผ โ ๆๆๅทฅๅ ท็ปไธๅ ฅๅฃ |
/mcp/sse |
GET | ่ๅๆจกๅผ SSE ็ซฏ็น |
/mcp/message?sessionId= |
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 ้
็ฝฎ
| ๅญๆฎต | ็ฑปๅ | ้ป่ฎคๅผ | ่ฏดๆ |
|---|---|---|---|
port |
number | 3100 |
HTTP ็ๅฌ็ซฏๅฃ |
host |
string | "0.0.0.0" |
็ๅฌๅฐๅ |
auth.token |
string | โ | Bearer Token๏ผไธ้ ็ฝฎๅไธๅฏ็จ้ดๆ |
auth.excludePaths |
string[] | ["/health"] |
ๆ ้้ดๆ็่ทฏๅพๅ็ผ |
tools[] ้
็ฝฎ
| ๅญๆฎต | ็ฑปๅ | ้ป่ฎคๅผ | ่ฏดๆ |
|---|---|---|---|
name |
string | โ | ๅฟ ๅกซใๅทฅๅ ทๅฏไธๆ ่ฏๅ |
description |
string | "" |
ๅทฅๅ ทๆ่ฟฐ |
command |
string | โ | ๅฟ ๅกซใๅฏๅจๅฝไปค |
args |
string[] | [] |
ๅฝไปคๅๆฐ |
env |
object | {} |
็ฏๅขๅ้๏ผๆฏๆ ${VAR_NAME} ๆๅผ |
cwd |
string | โ | ๅทฅไฝ็ฎๅฝ |
restart |
boolean | true |
ๅดฉๆบๅๆฏๅฆ่ชๅจ้ๅฏ |
restartDelay |
number | 2000 |
้ๅฏๅบ็กๅปถ่ฟ(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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.