Skip to main content
Glama
globalpocket

mcp-routing-gateway

by globalpocket

MCP Routing Gateway

MCP Routing Gateway 是一个无状态路由器和纯代理,旨在解决“LLM 选择用户非预期工具”的问题,这是当前主流 AI 智能体(如 Claude Desktop、Cline)面临的常见问题。

🌟 为什么选择 MCP Routing Gateway?

当多个 MCP 服务器直接注册到标准 AI 智能体时,LLM 可以自由浏览并执行所有工具,这带来了触发意外破坏性操作或不必要工具调用的风险。

本项目位于 AI 智能体与实际 MCP 服务器组之间,通过中介通信提供了一个控制层,“仅向 LLM 展示经过安全管理(过滤和虚拟化)的工具”。

Related MCP server: cordon

🏗️ 架构

本项目在内部集成了“MCP 服务器”和“MCP 客户端”功能。

AI Agent (MCP Client) → | [MCP Server] Gateway [MCP Client] | → Backend MCP Servers
  1. 前端(MCP 服务器): 作为 AI 智能体的“单一安全 MCP 服务器”,通过标准输入/输出 (stdio) 接受连接。

  2. 后端(MCP 客户端): 读取 mcp_config.json 并自动启动和管理其中定义的多个 MCP 服务器(通过 stdio 派生进程)。

🎯 设计理念

本项目建立在严格的**“路由器与纯代理”**理念之上。

  1. 零负载干扰(透传): 它不会干扰请求 ID 或参数等负载。它完全专注于中继通信,充当纯粹的管道。

  2. 外观模式(过滤与工具覆盖): 网关仅干预 tools/list(展示工具列表)和 tools/call(工具调用)的路由。根据配置文件,它会隐藏危险工具或将其替换为安全的虚拟工具。

⚙️ 配置

所有配置均完全以 JSON 格式管理。默认情况下,网关会在工作目录 ~/.mcp-gateway 中查找这些文件。您可以使用 --work-dir 命令行选项更改此目录。

  1. mcp_config.json(后端定义): MCP 客户端的标准配置文件格式。它定义了网关连接并在后台启动的 MCP 服务器组。

  2. gateway_config.json(路由与过滤定义): 网关特有的规则配置文件。它定义了“要隐藏哪些工具(被阻止的工具)”以及“要虚拟化哪些工具(虚拟工具)”。

有关详细用法和命令行选项,请参阅 用户手册

Install Server
A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
6Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Open-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers
    25
    AGPL 3.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Security gateway for MCP tool calls. Sits between your LLM client and MCP servers, enforcing per-tool policies (allow/block/approve/read-only), logging every call, and pausing dangerous operations for human approval in terminal or Slack.
    2
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.
    45
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A drop-in proxy that guards MCP servers with policy enforcement, secret redaction, prompt-injection screening, rug-pull detection, rate limiting, and audit logging.
    12
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.

  • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/globalpocket/mcp-routing-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server