How it works Install
███╗   ███╗  ██████╗ ██████╗   ██████╗   ██████╗ ██╗  ██╗ ███████╗ ████████╗
████╗ ████║ ██╔════╝ ██╔══██╗ ██╔═══██╗ ██╔════╝ ██║ ██╔╝ ██╔════╝ ╚══██╔══╝
██╔████╔██║ ██║      ██████╔╝ ██║   ██║ ██║      █████╔╝  █████╗      ██║   
██║╚██╔╝██║ ██║      ██╔═══╝  ██║   ██║ ██║      ██╔═██╗  ██╔══╝      ██║   
██║ ╚═╝ ██║ ╚██████╗ ██║      ╚██████╔╝ ╚██████╗ ██║  ██╗ ███████╗    ██║   
╚═╝     ╚═╝  ╚═════╝ ╚═╝       ╚═════╝   ╚═════╝ ╚═╝  ╚═╝ ╚══════╝    ╚═╝   

One MCP gateway to rule them all.

mcpocket is an open-source Rust gateway that gives every AI client one local MCP server, then routes tool calls to the upstream MCPs you configure.

install.sh
$ curl -fsSL https://raw.githubusercontent.com/mutgarth/mcpocket/main/scripts/install.sh | bash
Download binary

What lives inside the pocket

mcpocket is a small surface area on purpose: route, scope, sync. Everything else stays in your existing MCP servers.

Stdio + HTTP Upstreams

Talks to local stdio MCP child processes and remote HTTP MCP endpoints behind one gateway.

Read-Only by Default

Tools annotated as destructive stay hidden until you explicitly allow-tool them.

Namespaced Tools

Every upstream tool is exposed as server__tool so names never collide between MCPs.

Client Sync

One mcpocket sync command updates Claude Code, Codex, and opencode configs together.

From zero to gateway in three commands

No daemons to babysit. No cloud account. Just a binary, a JSON config, and a sync command.

1
Install the binary

One curl command downloads the latest release for macOS/Linux and drops mcpocket into ~/.local/bin.

$ curl -fsSL https://raw.githubusercontent.com/mutgarth/mcpocket/main/scripts/install.sh | bash
$ mcpocket --help
mcpocket 0.1.0
A Rust MCP gateway.
2
Register your MCP upstreams

Add each MCP server once to ~/.mcpocket/config.json. Stdio commands and HTTP endpoints both supported.

$ mcpocket allow-tool memory-module__search_memories
{
  "version": 1,
  "servers": {
    "memory-module": {
      "enabled": true,
      "transport": "http",
      "url": "https://api.memorymodule.io/mcp",
      "headers": { "x-api-key": "..." }
    }
  }
}
3
Sync to every client

One command writes the single mcpocket entry into every AI client config. Restart the client and you're done.

$ mcpocket sync --gateway --to claude,codex,opencode
✓ Wrote claude:   ~/.claude/settings.json
✓ Wrote codex:    ~/.codex/config.toml
✓ Wrote opencode: ~/.opencode/config.json

Three commands you will run weekly

mcpocket has a tight CLI surface. Once it is wired up, you mostly check status, inspect tools, and run doctor when an agent misbehaves.

mcpocket status

See which upstream MCPs are healthy and how many tools each one exposes.

STATE  NAME           TYPE   TOOLS    LATENCY
OK     memory-module  http   5/11     430ms
FAIL   plane          http   -        5001ms
mcpocket tools

Inspect which tools are visible to your agent and why they were allowed or hidden.

POLICY   TOOL                              REASON
ALLOW    memory-module__search_memories    allowlist
ALLOW    memory-module__list_memories      allowlist
HIDE     memory-module__delete_memory      destructive
mcpocket doctor

Check that PATH, gateway config, and client wiring all line up before you debug deeper.

✓ mcpocket on PATH
✓ ~/.mcpocket/config.json loads
✓ claude routes via mcpocket
✗ codex still has a direct memory-module entry
Star on GitHub Read the docs