@zhangzwd/mcp-gateway
Provides tools for managing context via the Upstash Context7 MCP service, including resolving library IDs and other 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.
@zhangzwd/mcp-gateway
一个轻量级 MCP 网关,将多个 MCP 服务聚合成一个统一的 stdio 接口。
每个子服务的工具会自动加上 {服务名}_ 前缀,避免工具名冲突。
安装
npx @zhangzwd/mcp-gateway无需全局安装,npx 会自动下载运行。
Related MCP server: super-mcp
配置文件
默认读取 ~/.mcp/gateway.config.json,可通过环境变量 MCP_GATEWAY_CONFIG 覆盖路径。
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp", "--api-key", "你的API_KEY"]
},
"另一个服务名": {
"command": "node",
"args": ["path/to/server.js"]
}
}
}mcpServers 中的每个 key 就是服务名,会作为工具前缀。例如 context7 服务的 resolve-library-id 工具对外暴露为 context7_resolve-library-id。
在 AI 工具中使用
opencode.json
{
"mcp": {
"gateway": {
"type": "local",
"command": ["npx", "-y", "@zhangzwd/mcp-gateway"]
}
}
}codex config.toml
[mcp_servers.gateway]
command = "npx"
args = ["-y", "@zhangzwd/mcp-gateway"]reasonix config.json
{
"mcpServers": {
"gateway": {
"command": "npx",
"args": ["-y", "@zhangzwd/mcp-gateway"]
}
}
}项目结构
~/.mcp/gateway.config.json # 配置文件(你编辑这个)
~/.mcp-gateway/
gateway.js # 主程序(已发布到 npm)
package.json
README.md工作原理
读取
gateway.config.json,获取子 MCP 服务列表为每个子服务启动一个子进程(stdio 通信)
调用
listTools获取工具列表,工具名加{服务名}_前缀将自己注册为一个 MCP Server,暴露合并后的工具列表
收到
tools/call请求时,根据工具名前缀路由到对应的子服务
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP federation gateway: route, govern and observe agent tools across clouds and MCP servers.
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
Single-connection MCP gateway discovering and executing 490+ verified MCP & A2A tools.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.66 npm2MIT
- AlicenseNot gradedqualityCmaintenanceA gateway that aggregates multiple MCP servers into a single endpoint, namespacing their tools and forwarding calls, so an agent connects to one MCP to access the entire stack.MIT
- AlicenseNot gradedqualityDmaintenanceA local stdio MCP concierge that aggregates multiple remote MCP servers, forwarding their tools with name-prefix routing to avoid conflicts.ISC
- AlicenseNot gradedqualityDmaintenanceA simple gateway that connects to multiple child MCP servers and forwards tool calls to them, enabling seamless client interactions with multiple tools.53 npmISC