Skip to main content
Glama
jorisc90

omniroute-mcp-bridge

by jorisc90

omniroute-mcp-bridge

一个 stdio MCP 桥接器,由 DSH 作为子进程启动(通过 dsh-mcp-client 插件,transport: stdio)。它将 tools/list / tools/call 代理到位于 https://llm.claassen.family/api/mcp/stream 的 omniroute streamable-http MCP 服务器,并且将白名单中的工具暴露给模型。

为什么

  • 上游 streamable-http 会话在空闲时会失效("Unknown Mcp-Session-Id" 404)。桥接器检测到这一确切的错误,会拆除失效的客户端,重新执行 MCP initialize 握手(获取新的 session id)并重试——这样,失效的上游会话不再导致工具调用失败。

  • dsh-mcp-client 插件没有工具过滤配置。该桥接器在服务端过滤 tools/list,因此只暴露 omniroute_web_search,而不是约 70 个工具(节省模型上下文;保留稳定的 serverName: omniroute,因此公开名称仍是 mcp__omniroute__omniroute_web_search)。

  • 上游认证头通过子进程的 env 传递,而不是 argv——密钥不会出现在进程列表中。它只存在于 web profile 中权限为 0600 的 cordis.patch.yml

Related MCP server: mcp-streaming-http-proxy

文件

文件

用途

bridge.mjs

stdio MCP 服务器入口点(由 DSH 启动)

upstream.mjs

可注入的上游访问器,带有失效会话重新初始化逻辑

test-bridge.mjs

独立实时测试:完整 MCP 握手 + 一次真实搜索调用

test-reinit.mjs

对重新初始化循环的确定性 fake-upstream 测试

probe.mjs

转储上游工具的原始名称

probe-ttl2.mjs

测量上游会话的空闲 TTL

SDK 解析

package.json@modelcontextprotocol/sdk 固定到桥接器开发时所依据的确切版本。有两种方式获取它:

  • 独立使用: 在此目录中运行 npm install

  • 在 DSH 主机内部(本部署): node_modules 是指向 /usr/lib/node_modules/@deepseek-ai/dsh/node_modules符号链接,因此桥接器始终使用 DSH 自带 mcp-client 插件所使用的同一套 SDK 构建。该符号链接已被 gitignore 忽略——在该环境中克隆后需重新创建它:

    ln -sfn /usr/lib/node_modules/@deepseek-ai/dsh/node_modules node_modules

配置(环境变量,在 ~/.dsh/profiles/web/cordis.patch.yml 中设置)

变量

含义

MCP_BRIDGE_UPSTREAM_URL

streamable-http URL(必填)

MCP_BRIDGE_UPSTREAM_HEADERS

请求头 JSON 对象

MCP_BRIDGE_ALLOWED_TOOLS

逗号分隔的原始工具名称(省略表示全部)

MCP_BRIDGE_LOG

1 = 在子进程的 stderr 上输出详细日志

测试

凭据不会被提交。请先导出它们(值来自你的 patch 文件):

export MCP_BRIDGE_UPSTREAM_URL='https://llm.claassen.family/api/mcp/stream'
export MCP_BRIDGE_UPSTREAM_HEADERS='{"Authorization":"Bearer …","X-Forwarded-For":"127.0.0.1"}'

然后:

node test-reinit.mjs   # deterministic: dead session -> re-init -> success (no network needed)
node test-bridge.mjs   # live: handshake + filtered list + real search
node probe.mjs         # dump the upstream's raw tool names
node probe-ttl2.mjs    # measure upstream session idle TTL

修改白名单

修改 patch 文件中的 MCP_BRIDGE_ALLOWED_TOOLS(来自 node probe.mjs 的逗号分隔的原始工具名称)。include-plugin 的 HMR 会在文件变更时重新应用补丁;mcp-client 插件会重新生成桥接器子进程。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (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

View all related MCP servers

Related MCP Connectors

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

  • Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.

  • Remote MCP for GenAI span mapping, provider normalization, dashboard schemas, and receipts.

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/jorisc90/mcp-bridge'

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