mcp-nexus
Routes requests to a Figma MCP server, allowing agents to discover and execute Figma capabilities through the Nexus control plane.
Routes requests to a GitHub MCP server, allowing agents to discover and execute GitHub capabilities such as listing pull request review comments.
Routes requests to a Jira MCP server, allowing agents to discover and execute Jira capabilities through the Nexus control plane.
Routes requests to a Slack MCP server, allowing agents to discover and execute Slack capabilities through the Nexus control plane.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-nexus find comments people left on my pull request"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Nexus
MCP Nexus is a local-first intelligent router for the Model Context Protocol. Your AI harness connects to one MCP endpoint — Nexus — while Nexus manages all of your real MCP servers behind the scenes: indexing their tools, discovering capabilities on demand, starting servers lazily, executing routed calls, and learning from local usage to rank results better over time.
Before With MCP Nexus
AI Harness AI Harness
├── GitHub MCP (30 tools) └── mcp-nexus (4 control tools)
├── Jira MCP (25 tools) ├── search_capabilities
├── Slack MCP (20 tools) ├──── describe_capabilities
├── Figma MCP (18 tools) ├──── execute_capability
... └──── search_servers
~90+ tool schemas in context │
(everything else stays indexed
on disk until actually needed)Why
Every connected MCP server contributes tool schemas to the model's context. Ten servers later you are burning tens of thousands of tokens on definitions the model rarely uses, and tool-selection quality degrades.
Nexus flips the model: instead of pushing every downstream schema into context, it keeps a lightweight capability index on disk and serves a tiny control plane. The agent discovers capabilities when needed (search_capabilities), inspects exact schemas only for what it selected (describe_capabilities), and executes through Nexus (execute_capability). All state (config, index, analytics, learned sequences) lives locally in .mcp-nexus/.
How much this helps depends on your harness
Some harnesses now defer tool definitions themselves, so it is worth being precise about what Nexus adds on top.
Harness | Without Nexus | What Nexus adds |
GitHub Copilot / VS Code | Hard cap of 128 tools per request. Past it, agent mode refuses to run until you manually turn tools off. | Downstream tool count stops mattering: the harness sees 4 tools regardless of how many servers you run. |
Claude Code (tool search on by default) | Tool definitions are deferred, but every tool name plus each server's instructions still load at session start, and every configured server is connected in the background. | Names collapse to 4. Servers stay unspawned until something actually calls them. |
Cursor, Windsurf, older models, Bedrock / Azure / proxied setups | Every schema loads upfront. | The full reduction below. |
On a synthetic 20-server, 400-tool ecosystem (npm run bench), the schemas total roughly 52,000 tokens against 544 for the Nexus control plane. That number is the upfront-loading case; where the harness already defers definitions, the saving is smaller but the lazy process startup and the tool-count ceiling still apply.
Context is not the only reason to use it. Nexus also gives you lazy server startup, per-capability policies, health quarantine, and local usage learning, none of which a harness provides.
Related MCP server: MetaMCP
Quick start
# 1. Scaffold a project config
npx @fyrlabs/mcp-nexus init
# 2. Add downstream MCP servers (anything runnable over stdio)
npx @fyrlabs/mcp-nexus add github -- npx -y @modelcontextprotocol/server-github
# or import an existing config:
npx @fyrlabs/mcp-nexus import --from claude
# 3. Point your harness at Nexus (see docs/harness-setup.md)Harness configuration (Claude Code, Cursor, Codex, and other MCP clients):
{
"mcpServers": {
"mcp-nexus": {
"command": "npx",
"args": ["-y", "@fyrlabs/mcp-nexus"]
}
}
}Nexus finds project-mcp.json automatically by walking up from the working directory, or pass --config ./path/to/nexus.json.
Then, from the agent's point of view:
search_capabilities { "query": "find comments people left on my PR" }
→ github.review_comments.list score=0.94 ...
describe_capabilities { "capabilityIds": ["github.review_comments.list"] }
→ exact input schema
execute_capability { "capabilityId": "github.review_comments.list",
"arguments": { ... } }
→ forwarded verbatim to the right server, started on demandWhat gets exposed vs. what stays hidden
Exposed to the model | Kept local | |
Control-plane tools | 4 fixed tools | — |
Capability metadata | Only on search (small records: id, title, description, risk, score) | Full index in SQLite |
Tool input schemas | Only for described capabilities | Persisted at index time |
Usage analytics | — | Local events + aggregates |
Secrets | Never (redacted from logs and CLI output) | Resolved in-process, passed to the downstream server env |
Highlights
Local-first. No cloud service, no account, no telemetry. Delete
.mcp-nexus/and all learned state is gone.Lazy execution lifecycle. After the one-time background index, servers start only when a task needs them, stop after tiered idle timeouts (hot / warm / cold), and are never stopped mid-call. A server that keeps failing to start is quarantined for a short, growing window instead of costing a startup timeout on every call.
Hybrid search. BM25 lexical ranking over weighted fields, exact id/tool matching, alias expansion (
pr → pull request, configurable), plus optional semantic search: pointrouting.semanticat any OpenAI-compatible embeddings endpoint (cloud, or fully-local via Ollama) — embeddings are batched, cached in SQLite, and the system falls back to lexical automatically when the endpoint is down (a circuit breaker opens after two consecutive failures and suppresses calls for 60s before probing again). Search queries are sent to that endpoint too — see Privacy.Risk policies and optional tool promotion. Deny or flag capabilities by risk class, and (opt-in,
routing.promotion: "session") expose discovered tools directly asnexus__<server>__<tool>after discovery (argument schemas are reconstructed from the downstream JSON schema; exotic keywords are simplified). Risk classes come from a keyword heuristic over each tool's own name and description, so treat policies as a workflow guardrail against accidents, not as a security boundary against a hostile server. See risk classification.Adaptive ranking with explanations. Every result carries its signal breakdown; pinned capabilities outrank learned popularity; blocked capabilities are never suggested.
Sequence prediction. Repeated tool transitions are learned locally and used to boost likely-next capabilities — prediction never auto-executes.
Zero native dependencies. Storage uses Node's built-in
node:sqlite; installing this package never compiles anything.Context reduction, measured.
npm run benchbuilds a synthetic ecosystem and measures the real numbers: at 2,000 capabilities the full downstream schema payload is ~130k tokens versus ~540 tokens for the Nexus control plane (≈99.6% estimated reduction), with index-level search p95 at 0.05ms against the spec's 50ms budget (full router path adds policy and stats lookups).Harness-agnostic. Anything that speaks MCP stdio can sit in front of Nexus.
Requirements
Node.js >= 22.13 (24 LTS recommended;
node:sqlitemust be available unflagged)
Documentation
Configuration reference — every field, resolution order, env substitution
CLI reference — all commands and flags
Architecture — modules, scoring model, storage schema
Harness setup — Claude Code, Cursor, Codex, generic MCP clients
examples/project-mcp.json— annotated starter configControl plane reference — the 4 tools and the status resource, with full input schemas, generated from the running server by
@fyrlabs/mcp-docsand drift-checked in CI
Development
git clone https://github.com/fyrlabs/mcp-nexus && cd mcp-nexus
npm install
npm run build # tsc -> dist/
npm run test # vitest (unit + integration, mirrors src/ structure under src/tests/)
npm run typecheck # strict tsc, no emit
npm run lint # eslintIntegration tests spin up the real @modelcontextprotocol/server-everything package as a downstream stdio server and route executions through a full runtime — they skip automatically if the package cannot be resolved.
See AGENTS.md for contribution conventions (commits, versioning, structure).
Privacy
Nexus stores configuration caches, indexes, and analytics in .mcp-nexus/ (or your XDG data dir). Raw tool arguments are never persisted. With the default settings (routing.semantic.provider: "null") the router makes no network requests at all.
Semantic search is the one feature that sends data off the machine, and only if you turn it on. Pointing routing.semantic at an OpenAI-compatible endpoint sends two kinds of text there:
Capability text (titles, descriptions, keywords) at index time, once per tool.
Your search query on every search, to embed it for comparison. Queries are written by the agent from your conversation, so treat them as conversation content.
Tool arguments, tool results, secrets, and analytics are never sent. If the query text matters to you, use provider: "hash" (fully local, no network) or point baseUrl at a local Ollama instance.
License
Available Tools
4 toolsdescribe_capabilitiesDescribe capabilitiesB
Return the full metadata and input schemas for the given capability IDs.
Inputs: capabilityIds (required).
execute_capabilityExecute capabilityA
Execute a downstream MCP capability by ID. The underlying server is started on demand and the arguments are forwarded verbatim.
Inputs: capabilityId (required), arguments.
search_capabilitiesSearch capabilitiesA
Search every indexed downstream MCP capability by natural language, keywords, tags, server id, or capability id. Returns lightweight metadata only.
Inputs: query (required), limit.
search_serversSearch serversA
Rank configured downstream MCP servers against a domain-level query. Useful before drilling into capability search.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clear operational role: searching servers, searching capabilities, describing schemas, and executing. search_servers and search_capabilities are adjacent but their descriptions clearly separate domain-level server ranking from capability-level search.
All tool names follow a consistent verb_noun snake_case pattern. The only minor inconsistency is 'capabilities' being plural in search/describe but singular in execute_capability.
Four tools is well-scoped for a gateway or meta-server: discover servers, discover capabilities, inspect schemas, and execute. There is no redundancy or unnecessary bloat.
The discover → describe → execute workflow is covered end-to-end. Minor gaps such as explicit list-all-server or dedicated server metadata retrieval are missing, but search_servers can largely cover discovery needs.
Maintenance
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Every service you connect, one MCP endpoint for all your AI tools. Sign in once.
MCP federation gateway: route, govern and observe agent tools across clouds and MCP servers.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA unified hub for centrally managing and dynamically orchestrating multiple MCP servers/APIs into separate endpoints with flexible routing strategies.2,088 npm2,686Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables dynamic aggregation of multiple MCP servers into a unified endpoint with middleware, orchestration, and gateway capabilities.MIT
- AlicenseNot gradedqualityCmaintenanceEnables clients to connect once and access the union of multiple backend MCP servers' tools through a single unified interface, with namespaced tool routing, capability search, and health isolation.MIT
- AlicenseNot gradedqualityAmaintenanceEnables clients to connect through a unified MCP endpoint that aggregates and routes requests to multiple backend MCP resource servers, exposing their combined tools and resources with optional authentication and management.120 npmMIT