Muxed
MCP server daemon and aggregator CLI β aggregate all your Model Context Protocol servers behind a single background daemon with lazy start, auto-reconnect, and idle shutdown
Ask AI about Muxed
Powered by Claude Β· Grounded in docs
I know everything about Muxed. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
muxed
MCP tools don't belong in your model's context window.
Offload them to a CLI. Let your agents call tools through shell commands and scripts instead.
Every MCP server you connect dumps its full tool schema into the model's context window. A standard setup with 3-4 servers can consume 20-30% of the context before the agent even starts working. More tools in context means worse tool selection, less room for reasoning, and your carefully crafted instructions get drowned out by thousands of tokens of schema JSON. This isn't a model problem. It's an architecture problem.
muxed fixes this by moving tool management out of the harness and into a CLI. Tools stay in the CLI β agents discover and call them on-demand through shell commands. No schemas in context. Chain tool calls in bash scripts without intermediate results flowing through the LLM. The CLI auto-starts a background process on first command and shuts down after 5 minutes idle.
Use with agents
# Use directly β no install needed
bunx muxed init # or: pnpx muxed init / npx muxed init
# Or install globally
bun install -g muxed # or: pnpm install -g muxed / npm install -g muxed
|
CLI β for Claude Code, Cursor, Codex, any agent that runs shell
Auto-discovers MCP servers and writes usage instructions to the agent's instructions file. Agents run |
MCP proxy β for Claude Desktop, any MCP client
Exposes all aggregated servers as a single MCP server on stdio. Point your client at |
Quick start
# List all servers and their status
npx muxed servers
# Search tools by name or description
npx muxed grep "search"
# Get a tool's schema
npx muxed info slack/search_messages
# Call a tool
npx muxed call filesystem/read_file '{"path": "/tmp/hello.txt"}'
Configuration
Create muxed.config.json in your project root (or ~/.config/muxed/config.json globally):
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
},
"remote-api": {
"url": "https://mcp.example.com/mcp",
"transport": "streamable-http"
}
}
}
The format is compatible with the mcpServers section of claude_desktop_config.json β reuse your existing config.
Node.js API
import { createClient } from 'muxed';
const client = await createClient();
const tools = await client.grep('search');
const result = await client.call('filesystem/read_file', { path: '/tmp/config.json' });
Install as a dependency: bun add muxed / pnpm add muxed / npm install muxed
How it works
Agent (Claude Code, Cursor, etc.)
|
shell commands
|
ββββββββ΄βββββββ
β muxed daemon β β background process, auto-start/stop
β β
β ServerPool β
β βββ fs ββββΊ [stdio: filesystem server]
β βββ pg ββββΊ [stdio: postgres server]
β βββ api ββββΊ [HTTP: remote server]
ββββββββββββββββ
Development
pnpm install && pnpm build
pnpm dev # run from source
pnpm test # vitest
License
MIT Β© Georgiy Tarasov
