One config to rule them all. Configure your MCP servers once, deploy to every AI CLI automatically.
Each AI CLI tool uses a different file format for configuring MCP (Model Context Protocol) servers:
| AI CLI | Config File | Format |
|---|---|---|
| Claude Code | .mcp.json |
JSON |
| Gemini CLI | .gemini/settings.json |
JSON |
| Kimi CLI | ~/.kimi/mcp.json |
JSON |
| OpenAI Codex | .codex/config.toml |
TOML |
| OpenCode | opencode.json |
JSON |
| GitHub Copilot CLI | .copilot/mcp-config.json |
JSON |
| VS Code | .vscode/mcp.json |
JSON |
| IntelliJ IDEA | .idea/mcp.json |
JSON |
If you use multiple AI tools (and you probably do), you need to manually maintain 8 different config files with different structures, field names, and quirks. For every single project.
MCPX maintains a single canonical config file (.mcpx.json) per project and automatically generates the correct config file for each AI CLI provider you use.
.mcpx.json βββββββΊ .mcp.json (Claude Code)
β βββββββΊ .gemini/settings.json (Gemini CLI)
β βββββββΊ ~/.kimi/mcp.json (Kimi CLI)
β βββββββΊ .codex/config.toml (OpenAI Codex)
β βββββββΊ opencode.json (OpenCode)
β βββββββΊ .copilot/mcp-config.json (Copilot CLI)
β βββββββΊ .vscode/mcp.json (VS Code)
ββββββ βββββββΊ .idea/mcp.json (IntelliJ IDEA)
npm install -g mcpx-cliNavigate to your project directory and run:
mcpxThe interactive wizard will guide you through:
- π Detection β Automatically detects existing MCP configs in your project
- π₯ Import β Offers to import servers from detected configs
- β Add servers β Interactive wizard to configure new MCP servers
- π― Select providers β Choose which AI CLIs you want to generate configs for
- βοΈ Generate β Creates
.mcpx.jsonand all provider config files
| Command | Description |
|---|---|
mcpx or mcpx init |
π§ Interactive setup wizard |
mcpx add [name] |
β Add a new MCP server |
mcpx remove [name] |
β Remove an MCP server |
mcpx list |
π List configured MCP servers |
mcpx sync |
π Regenerate all provider config files |
mcpx import [provider] |
π₯ Import config from an existing provider |
mcpx status |
π Show sync status of all providers |
| Flag | Description |
|---|---|
--dir, -d <path> |
π Project directory (defaults to current) |
--verbose |
π Show detailed logs |
--version, -V |
π·οΈ Show version |
--help, -h |
β Show help |
MCPX uses a single .mcpx.json file as the source of truth:
{
"version": 1,
"providers": ["claude-code", "gemini-cli", "openai-codex", "copilot-cli"],
"servers": {
"jira": {
"description": "Jira Atlassian",
"transport": "stdio",
"command": "uvx",
"args": ["mcp-atlassian"],
"env": {
"JIRA_URL": "https://myorg.atlassian.net",
"JIRA_USERNAME": "user@example.com",
"JIRA_API_TOKEN": "your-token"
}
},
"github": {
"description": "GitHub MCP Server",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-github-server"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
}
}
}
}| Field | Type | Required | Description |
|---|---|---|---|
transport |
"stdio" | "http" |
β Yes | Transport protocol |
command |
string |
stdio | Executable command |
args |
string[] |
β | Command arguments |
env |
Record<string, string> |
β | Environment variables |
cwd |
string |
β | Working directory |
url |
string |
http | Server URL |
headers |
Record<string, string> |
β | HTTP headers |
description |
string |
β | Human-readable description |
enabled |
boolean |
β | Enable/disable (default: true) |
These providers generate config files inside your project directory. Each project has its own independent config.
| Aspect | Detail |
|---|---|
| File | .mcp.json |
| Format | JSON |
| Root key | mcpServers |
Requires type |
Yes "stdio" |
| Aspect | Detail |
|---|---|
| File | .gemini/settings.json |
| Format | JSON |
| Root key | mcpServers |
Requires type |
No |
| Aspect | Detail |
|---|---|
| File | .codex/config.toml |
| Format | TOML |
| Root key | mcp_servers |
| Smart merge | Yes β Preserves existing Codex settings (model, approval_mode, etc.) |
| Aspect | Detail |
|---|---|
| File | opencode.json |
| Format | JSON |
| Root key | mcp |
| Quirks | command is an array (command + args merged), uses environment instead of env, type: "local" |
| Aspect | Detail |
|---|---|
| File | .copilot/mcp-config.json |
| Format | JSON |
| Root key | mcpServers |
| Quirks | Requires tools: ["*"] field, needs shell alias for project-level config |
π Note: Copilot CLI does not natively auto-discover project-level MCP configs. MCPX automatically configures a shell alias (
copilot='copilot --additional-mcp-config @.copilot/mcp-config.json') in your.zshrc,.bashrc, orconfig.fishso the project config is loaded automatically when you runcopilot.
| Aspect | Detail |
|---|---|
| File | .vscode/mcp.json |
| Format | JSON |
| Root key | servers |
| Quirks | type field required ("stdio" or "sse"), HTTP mapped as "sse" |
| Aspect | Detail |
|---|---|
| File | .idea/mcp.json |
| Format | JSON |
| Root key | mcpServers |
| Quirks | No type field, infers from command vs url |
These providers use a single global config file shared across all projects. Running mcpx sync overwrites the global file with the current project's servers.
| Aspect | Detail |
|---|---|
| File | ~/.kimi/mcp.json |
| Format | JSON |
| Root key | mcpServers |
| Scope | Global β affects all projects |
After modifying .mcpx.json (manually or via commands), regenerate all provider configs:
mcpx syncUse the interactive wizard to add or remove providers:
mcpx init
# Select "Alterar providers"When a provider is removed, MCPX deletes the corresponding config file. For global providers, legacy project-level files are also cleaned up.
Already have MCP servers configured in one of your AI tools? Import them:
mcpx importMCPX detects existing project-level configs (.mcp.json, .gemini/settings.json, etc.) and lets you select which servers to import into .mcpx.json.
src/
βββ cli.ts # Commander setup & routing
βββ types/
β βββ canonical.ts # McpConfigFile, McpServerConfig (Zod schemas)
β βββ providers.ts # Provider interface
β βββ common.ts # CommandContext, SyncResult
βββ commands/
β βββ init.ts # Interactive wizard
β βββ add.ts / remove.ts # Server management
β βββ list.ts / status.ts # Display info
β βββ sync.ts # Regenerate configs
β βββ import.ts # Import from providers
βββ providers/
β βββ base.ts # Provider interface
β βββ registry.ts # Provider registry (factory)
β βββ claude-code.ts # .mcp.json
β βββ gemini-cli.ts # .gemini/settings.json
β βββ kimi-cli.ts # ~/.kimi/mcp.json
β βββ openai-codex.ts # .codex/config.toml
β βββ opencode.ts # opencode.json
β βββ copilot-cli.ts # .copilot/mcp-config.json
β βββ vscode.ts # .vscode/mcp.json
β βββ intellij.ts # .idea/mcp.json
βββ core/
β βββ config-store.ts # .mcpx.json read/write
β βββ detector.ts # Detect existing configs
β βββ merger.ts # Smart sync with merge support
βββ wizard/
β βββ main-wizard.ts # Main interactive flow
β βββ server-wizard.ts # Server creation wizard
β βββ provider-wizard.ts # Provider selection
β βββ step-runner.ts # Step navigation (back support)
βββ utils/
βββ fs.ts # File system helpers
βββ logger.ts # Logger with colors
βββ validation.ts # Zod validation
# Run all tests
npm test
# Run once (CI)
npm run test:run
# Type checking
npm run typecheck| Category | Library |
|---|---|
| π» Language | TypeScript 5.x (ESM) |
| π¦ Build | tsup (esbuild) |
| β¨οΈ CLI Framework | commander |
| π¬ Interactive Prompts | @clack/prompts |
| π¨ Colors | picocolors |
| π TOML | smol-toml |
| β Validation | zod |
| π§ͺ Tests | vitest |
| π’ Min Node | >= 20 |
MIT