mcpx is a local MCP gateway that lets you install upstream MCP servers once, authorize them once, and expose them to multiple AI clients through managed gateway entries.
This is a monorepo containing:
cli/— ThemcpxCLI and core libraryapp/— The macOS desktop app (Electron + React)
- Stores upstream servers in a central config (
~/.config/mcpx/config.json) - Stores upstream auth in one consolidated secure store so each MCP auth flow is done once and reused across all synced clients
- Runs a local MCP gateway daemon (
http://127.0.0.1:<port>/mcp) - Syncs managed gateway entries into supported clients (one per upstream):
- Claude
- Codex
- Cursor
- Cline
- OpenCode
- Kiro
- VS Code
- Gives each upstream a top-level client entry (
/vercel,/next-devtools, etc.) while routing through one local daemon. - Uses local gateway-token auth for client -> gateway (
x-mcpx-local-token) - Supports keychain-backed secret references for upstream headers
- Passes upstream OAuth challenges (
401/403+WWW-Authenticate) through to compatible clients - Proxies OAuth well-known metadata endpoints in single-upstream mode (
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server)
Prerequisite: Node.js >=20
npm install -g @kwonye/mcpx@latestmcpx add vercel https://example.com/mcp
mcpx add next-devtools npx next-devtools-mcp@latestmcpx add and mcpx remove auto-sync by default. Run mcpx sync when you want a manual re-sync or to target specific clients.
For convenience, mcpx also accepts client-native install commands and translates them to the canonical mcpx add flow:
# Claude Code
mcpx claude mcp add vercel https://example.com/mcp
mcpx claude mcp add next-devtools --env FOO=bar -- npx next-devtools-mcp@latest
# Codex
mcpx codex mcp add next-devtools --env FOO=bar -- npx next-devtools-mcp@latest
# VS Code
mcpx code --add-mcp '{"name":"vercel","url":"https://example.com/mcp"}'
mcpx code --add-mcp '{"name":"next-devtools","command":"npx","args":["next-devtools-mcp@latest"]}'
# Qwen CLI
mcpx qwen mcp add vercel https://example.com/mcp
mcpx qwen mcp add next-devtools --env FOO=bar -- python -m my_mcp_serverUnsupported client-native commands (e.g., cursor-agent, cline, kiro, opencode) will fail with guidance to use mcpx add directly.
Edit ~/.config/mcpx/config.json and add entries under servers:
{
"servers": {
"vercel": {
"transport": "http",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "secret://vercel_auth_header"
}
},
"next-devtools": {
"transport": "stdio",
"command": "npx",
"args": ["next-devtools-mcp@latest"],
"env": {
"FOO": "bar"
},
"cwd": "/path/to/project"
}
}
}After manual edits, you must run:
mcpx syncManual config changes do not update client configs until mcpx sync runs.
The desktop app provides a visual interface for managing MCP servers:
- Menubar tray icon with quick-status popover
- Dashboard with server list, detail view, and daemon controls
- Browse tab to discover and one-click install servers from the official MCP Registry
- Tab navigation: Servers, Browse, Settings
cd app
npm install
npm run dev # Start Electron dev server
npm test # Run unit tests
npm run e2e # Run Playwright E2E tests- Claude
- Codex
- Cursor
- Cline
- VS Code
mcpx follows Claude-style MCP server conventions by syncing per-upstream entries keyed by server name under mcpServers in Claude config. Each entry is an HTTP endpoint to the local gateway (/mcp?upstream=<name>) and includes the required local auth header.
- Define upstream servers in central
mcpxconfig. mcpxensures local gateway auth and daemon state.mcpx syncwrites managed client entries that point to the local gateway.
mcpx secret set vercel_auth_header --value "Bearer <token>"
mcpx secret ls
mcpx secret rm vercel_auth_header
mcpx auth set vercel --header Authorization --value "Bearer <token>"
mcpx auth set next-devtools --env NEXT_DEVTOOLS_TOKEN --value "<token>"
mcpx auth show
mcpx auth rm vercel --header Authorization --delete-secret
mcpx auth rotate-local-tokenmcpx daemon start
mcpx daemon status
mcpx daemon logs
mcpx daemon stopmcpx sync
mcpx sync claude
mcpx sync --client claude --client codexMCPX_CONFIG_HOMEMCPX_DATA_HOMEMCPX_STATE_HOME
mcpx doctor
mcpx status
mcpx daemon logs
mcpx sync --jsonmcpx status now opens an interactive MCP inventory menu in TTY sessions:
- Shows each configured upstream MCP
- Shows which client config files currently have that MCP synced
- Lets you open a specific MCP and run actions (configure auth, re-authenticate, clear auth, reconnect, disable)
# CLI
cd cli
npm install
npm run build
npm test
# Desktop app
cd app
npm install
npm run build
npm testTop-level GitHub Actions workflows are split by release target:
-
CLI release (
.github/workflows/cli-release.yml)- Trigger: push to
mainwhen files incli/**change. - Runs CLI install/build/test, computes the next shared release version, syncs CLI runtime version, conditionally syncs desktop version for mixed releases, tags release, publishes npm package, and creates/updates the GitHub Release body.
- CLI creates
v*tags forcli-onlyand mixed (cli/**+app/**) releases.
- Trigger: push to
-
Desktop release/build (
.github/workflows/desktop-release.yml)- Triggers:
- Push to
mainwhen files inapp/**orcli/**change. - Push of tags matching
v*. - Manual run (
workflow_dispatch) with requiredrelease_taginput.
- Push to
- Uses annotated tag metadata (
mcpx-release-v1) to determine whether desktop artifacts are included for a tag. - If signing/notarization secrets are present, it produces signed/notarized builds.
- If signing secrets are missing, it falls back to unsigned builds (
CSC_IDENTITY_AUTO_DISCOVERY=false) instead of skipping. - Publishing behavior:
mainpush withapp/**changes and nocli/**changes: desktop workflow creates the next sharedv*tag (desktop-only).mainpush includingcli/**changes: CLI workflow owns tag creation.- tag push (
v*) withinclude_desktop=true: build and upload desktop assets to that GitHub Release tag. - tag push (
v*) withinclude_desktop=false: skip desktop artifacts (cli-only release). - manual run: upload artifacts to the provided
release_tag.
- Single monotonic version stream:
- every qualifying
mainpush increments one shared patch version. - each version can include
CLI,Desktop, or both, with component-scoped release notes.
- every qualifying
- Triggers:
- Client connectivity is HTTP-first.
- Upstreams can be HTTP or stdio.
- macOS keychain is the secure secret backend.
- In CI/headless environments,
MCPX_SECRET_<name>env vars can override keychain lookups.