roxy-mcp
v0.2.2
Published
Roxy — Local Open-Source MCP Hub with Code Mode
Maintainers
Readme
Roxy — Open-Source MCP Hub with Code Mode
Roxy connects local (stdio) and remote (streamable-http / sse) MCP servers through a single MCP endpoint. Code Mode (search + execute) lets clients discover tool schemas on demand and call several tools in one script.
Connect your servers in Roxy and configure your AI client with http://localhost:4123/mcp.
Estimated tool context
Clients may load tool definitions into the model's context up front. Roxy exposes two Code Mode tools and returns compact signatures for the tools a client searches for.
The admin panel estimates the cost of tool definitions from their UTF-8 size. The table gives an illustrative comparison. Actual token use depends on the tool schemas, client, model tokenizer, and tool results.
| Setup (5 MCP servers, about 120 tools) | Tool definitions exposed | Estimated upfront context | Multi-tool chaining |
| :--- | :--- | :--- | :--- |
| Direct MCP connections | About 120 JSON Schemas | About 45,000 tokens | Each call and result is handled by the client |
| Roxy Code Mode | search and execute | About 480 tokens | One script can run calls in parallel and filter results |
Key Features (Local Open-Source Edition)
- 1 Unified MCP URL (
/mcp+/sse): Works with OpenCode, Claude Code, Cursor, Claude Desktop, Windsurf, and any standard MCP client. - Code Mode Engine (QuickJS WASM Sandbox):
search({ query, namespace })— Searches enabled tools across all connected MCPs and returns compact TypeScript signatures generated automatically from JSON Schema.execute({ code })— Runs LLM-written JavaScript in a confined QuickJS WASM sandbox (64MBmemory cap, CPU interrupt timeout, zero filesystem/env access) withawait tools.<namespace>.<tool>(args)andPromise.allSettledconcurrency.
- Official MCP Registry Store (
registry.modelcontextprotocol.io):- Live-search, filter with quick-topic chips, and install thousands of remote (
streamable-http/sse) and local (npx/uvx/docker) MCP servers directly from the Official MCP Registry.
- Live-search, filter with quick-topic chips, and install thousands of remote (
- Auto-Detect Local AI Apps & 1-Click Setup:
- Automatically scans existing MCP configs on disk (OpenCode, Cursor, Claude Code, Claude Desktop, Windsurf, and VS Code) to import your servers & credentials into Roxy in one click, and writes Roxy's
/mcpURL back into your apps with automatic.roxy.bakbackups.
- Automatically scans existing MCP configs on disk (OpenCode, Cursor, Claude Code, Claude Desktop, Windsurf, and VS Code) to import your servers & credentials into Roxy in one click, and writes Roxy's
- Custom MCPs &
mcpServersJSON Import: Add any customstdio,streamable-http, orsseMCP server, or paste an existingmcpServersJSON block. - Built-in Upstream Auth Vault:
- Environment Variables for
stdiosubprocesses - Bearer Token / API Key & Custom Headers for remote HTTP/SSE MCPs
- OAuth 2.1 (MCP OAuth discovery + Dynamic Client Registration RFC 7591 + PKCE + automatic token refresh)
- Encrypted at rest locally in
~/.roxy/roxy.dbusingAES-256-GCM.
- Environment Variables for
- Local Admin Panel:
- Context estimates for direct tool definitions and Code Mode
- Per-server & per-tool enable/disable toggles
- Built-in Code Mode Playground (
search+execute) - Live Call Inspector streaming real-time
search,execute, and upstream MCP tool calls over SSE
Quickstart
Use Node.js 22.13 or newer in the Node 22 series, or 23.4 or newer. Roxy uses built-in SQLite.
Option 1: Run from Source (Git Clone)
git clone https://github.com/roxy-tools/roxy-mcp.git
cd roxy-mcp
npm install
npm run build
npm startFor hot-reloading development:
npm run devOption 2: Run via CLI / npx
npx roxy-mcpCLI flags:
-p, --port <number> Port to listen on (default: 4123, env: ROXY_PORT)
-H, --host <string> Host interface (default: 127.0.0.1, env: ROXY_HOST)
-d, --data-dir <path> Data directory (default: ~/.roxy, env: ROXY_DATA_DIR)
--no-open Do not automatically open browser on startupOption 3: Docker Compose
Pre-bundles Node/npx and Python/uvx so 1-click stdio MCPs work inside Docker out of the box:
docker compose up --build -d --waitThen open http://localhost:4123.
Local deployment and config backups
Run Roxy on your own machine. The CLI listens on 127.0.0.1 by default, and Docker Compose publishes to host loopback. The admin API and MCP gateway share access to your configured tools without inbound authentication. Keep both endpoints off public and shared networks. Use trusted sources for local MCP commands, which run with the permissions of the Roxy process.
Roxy backs up an existing client config before changing it. The first backup uses .roxy.bak, and later changes create numbered backups. To roll back, copy the backup you want over the client config and restart the client. Backups may contain credentials from the original config.
Connect Your AI Client
OpenCode (opencode.json)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"roxy": {
"type": "remote",
"url": "http://localhost:4123/mcp",
"enabled": true
}
}
}Claude Code
claude mcp add --transport http roxy http://localhost:4123/mcpCursor (.cursor/mcp.json)
{
"mcpServers": {
"roxy": {
"url": "http://localhost:4123/mcp"
}
}
}Contributing & License
Contributions and pull requests are welcome — see CONTRIBUTING.md.
Licensed under the MIT License.
