Ydris
An open-source, vendor-agnostic MCP governance proxy that sits between AI clients and tool servers to apply response projection, metering, and retry policies, reducing token bloat and providing per-tool cost visibility.
README
<p align="center"> <img src="brand-assets/Main Logo.jpeg" alt="Ydris logo" width="240"> </p>
Ydris
An open source, vendor-agnostic MCP governance proxy. It runs on your machine and governs the last mile of tool traffic for every agent you use.
Ydris is MIT licensed and beholden to no vendor. It sits between your AI clients and your MCP tool servers as one local process, so whatever model you run and whatever tools you connect, the projection, metering, and retry all happen on your side of the wire under your control.
The pain point
MCP made it trivial to plug tools into agents, and that same ease created three problems nobody owns.
Tool responses are fat, and the whole blob lands in your context. An API returns forty fields when your agent needed four, and you pay for every token of the thirty-six you threw away, and a big enough response can overflow the window and crash the run outright.
You cannot see what any single tool costs you. Your provider dashboard reports tokens at the model level and attributes nothing to a specific tool or server, so you're metering a workflow by screenshot and guessing which call is bleeding you.
One rate-limited call kills the whole job. An upstream server throws a 429 and swallows the backoff signal, and your multi-step run dies on a transient hiccup that a retry would have cleared.
The gateways that solve this were built for platform teams running Kubernetes, and they govern the servers routed through the platform while the stdio tool you spun up on your laptop stays invisible to them. That last mile runs ungoverned whether you're one person running a handful of tools or an enterprise with thousands of employees quietly wiring up their own MCP servers.
Our solution
Ydris wears two faces in one process. It's an HTTP MCP server to any client, and an MCP client to any backend. Your agents point at one localhost endpoint, your tool servers hang behind it, and three policies apply in the middle on every request and every response.
Declarative response projection trims each tool result down to the fields you name in a config file, before the payload ever reaches the model. This is the piece almost nothing else in the MCP ecosystem does, and it's the one that kills the token bloat at the source.
A local flight recorder logs every call to SQLite with success rate, latency, and token estimates on both directions, so you read your real per-tool cost from your own machine without shipping telemetry to anyone.
Per-backend retry with exponential backoff catches the transient failures and the rate-limit signals that upstream servers throw away, so a 429 means a short wait instead of a dead workflow.
BrowserOS ─┐
Claude Code┤
Goose ┼──HTTP──▶ Ydris ──┬──stdio──▶ backend A
Codex ┤ /mcp │
Cursor ─┘ (projection, ├──stdio──▶ backend B
metering, │
retry) └──stdio──▶ any MCP server
Everything stays MCP-compliant on both faces, so Ydris introduces no new protocol and locks you into nothing. Any client that speaks HTTP MCP works, and any server you can start locally sits behind it regardless of who built it.
The outcome
You stop paying for tokens you never wanted, and in testing a single fat response dropped from 406 tokens to 47 through one projection rule. You get a per-tool cost and reliability number you can actually read, pulled from a local database you own. Your runs survive the rate limits that used to end them. And you hold all of it on your own hardware under an open license, with no vendor sitting in the middle of your tool traffic deciding what you can see or where your data goes.
For a hobbyist that means a cheaper, calmer local agent stack that stops crashing on bloated payloads. For an enterprise it means governance at the endpoint where the call actually happens, covering the machines a central gateway was never able to see, with logs it can ship upstream to whatever compliance pipeline already runs.
Who it's for
Solo builders and hobbyists running local agents who want their tool calls cheaper, quieter, and legible without standing up platform infrastructure. And enterprises that need the ungoverned last mile brought under control on every employee's machine, without forcing a single vendor's stack on anyone.
Install
git clone <your-repo-url> ydris && cd ydris
npm install
npm run build
Configure
Copy the example and edit it. Your real config is gitignored, so secrets and backend names never enter git history.
cp ydris.example.yaml ydris.yaml
port: 9280
dbPath: ./ydris.db
backends:
- name: backend-a
command: node
args: ["path/to/your-mcp-wrapper.mjs"]
env:
SOME_API_KEY: "set-this-in-your-real-ydris-yaml"
retry:
maxAttempts: 3
baseDelayMs: 300
maxDelayMs: 5000
# Trim each tool's response down to only the fields you need.
# Use [] for array fan-out: "records[].email" keeps email on every element.
projection:
record_search:
- "records[].name"
- "records[].title"
- "records[].email"
- "records[].organization.name"
Run
npm start
Point any MCP client at http://127.0.0.1:9280/mcp, and the tools from every backend show up namespaced as <backend>__<tool> so two servers never collide.
Control panel
Open http://127.0.0.1:9280/ in a browser for the beginner-friendly panel. It shows live tokens saved, call counts, and success rate across every tool, and it carries a wizard that writes your trimming rules for you, no YAML by hand.
The wizard is three steps. Pick a tool, run it once so Ydris can see what it returns, then check the fields worth keeping while a before-and-after bar shows the token cut in real time. When you save, the rule lands in ydris.yaml and takes effect on the very next call, no restart. This is also the fastest way to see what Ydris does, since you watch a fat response collapse on screen.
Read your stats
The control panel shows these live in the browser. For a terminal readout, run:
node dist/index.js report
┌─────────┬─────────────────┬────────────┬───────┬─────────────┬────────┬────────────┬────────────────┬──────────────┐
│ (index) │ tool │ backend │ calls │ success_pct │ avg_ms │ raw_tokens │ trimmed_tokens │ tokens_saved │
├─────────┼─────────────────┼────────────┼───────┼─────────────┼────────┼────────────┼────────────────┼──────────────┤
│ 0 │ 'record_search' │ 'backend-a'│ 1 │ 100 │ 12 │ 406 │ 47 │ 359 │
└─────────┴─────────────────┴────────────┴───────┴─────────────┴────────┴────────────┴────────────────┴──────────────┘
v0 scope
This release does projection, metering, and retry across stdio backends, plus a local control panel with a field-picker wizard. Fleet config sync across machines and a provider-quirks registry are the next modules, and they build on the same config surface.
License
MIT. Use it, fork it, ship it.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。