Skip to content

Setup

Terminal window
npx muxed init

That’s the entire setup. Also works with bunx muxed init or pnpx muxed init.

init scans config files from every major agent and editor — Claude Desktop, Cursor, VS Code, Windsurf, Cline, Roo Code, and Amazon Q. It finds every MCP server you already have configured.

All discovered servers go into a single muxed.config.json. Identical servers that appear in multiple agents get deduplicated. Conflicts (same name, different config) get resolved interactively or by priority.

init writes CLI usage instructions directly into your agent’s instruction files:

AgentInstruction file
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md
Cursor.cursor/rules/muxed.mdc (if .cursor/ exists)

Use --local to also inject into project-level CLAUDE.md and AGENTS.md.

After init, your coding agent reads the injected instructions and uses the CLI to discover and call tools on demand. No tool schemas enter the context window.

Terminal window
# 1. Find tools by searching names and descriptions
muxed grep "database"
# 2. Inspect the schema before calling (mandatory — schemas can't be guessed)
muxed info postgres/query
# 3. Call with correct parameters
muxed call postgres/query '{"sql": "SELECT * FROM users LIMIT 10"}'

The agent follows this pattern for every tool interaction. It pulls in only what it needs for the current step instead of loading everything up front.

When an agent needs multiple MCP calls, data processing, or conditional logic, it writes and executes a TypeScript script instead of making individual CLI calls:

import { createClient } from 'muxed/client';
const client = await createClient();
const tools = await client.tools();
const result = await client.call('server/tool', { param: 'value' });
const data = await client.call('db/query', { sql: 'SELECT ...' });
console.log(JSON.stringify({ tools: tools.length, result, data }));

A single script execution replaces many sequential CLI invocations — fewer round-trips, less token usage.

There is no explicit start command. The muxed daemon starts automatically the first time you run any command. Servers stay warm between calls — no cold starts, no repeated connection negotiation. After 5 minutes of inactivity, the daemon shuts itself down. The idle timeout is configurable.

FlagDescription
--dry-runShow what would be done without writing files
-y, --yesSkip prompts; resolve conflicts by priority
--deleteRemove imported servers from original agent configs
--no-replaceDon’t add muxed entry to agent configs
--localAlso inject instructions into local agent files
--no-instructionsSkip injecting CLI instructions
  • Node.js 18 or later — check with node --version

If you don’t have any MCP servers configured in other agents yet, create a config manually:

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
}
}
}

Save this as muxed.config.json in your project root, then run muxed init to inject the agent instructions.

See Configuration for full config options including HTTP servers, OAuth, and daemon settings.