MCP Hub
Back to servers

mcpx-cli

Interactive CLI to configure MCP servers for multiple AI providers

Stars
4
Forks
1
Updated
Feb 6, 2026
Validated
Feb 13, 2026

🔌 MCPX

One config to rule them all. Configure your MCP servers once, deploy to every AI CLI automatically.

Node.js TypeScript License: MIT


😩 The Problem

Each AI CLI tool uses a different file format for configuring MCP (Model Context Protocol) servers:

AI CLIConfig FileFormat
Claude Code.mcp.jsonJSON
Gemini CLI.gemini/settings.jsonJSON
Kimi CLI~/.kimi/mcp.jsonJSON
OpenAI Codex.codex/config.tomlTOML
OpenCodeopencode.jsonJSON
GitHub Copilot CLI.copilot/mcp-config.jsonJSON
VS Code.vscode/mcp.jsonJSON
IntelliJ IDEA.idea/mcp.jsonJSON

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.


✨ The Solution

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)

🚀 Quick Start

📦 Installation

npm install -g mcpx-cli

⚡ First Setup

Navigate to your project directory and run:

mcpx

The interactive wizard will guide you through:

  1. 🔍 Detection — Automatically detects existing MCP configs in your project
  2. 📥 Import — Offers to import servers from detected configs
  3. Add servers — Interactive wizard to configure new MCP servers
  4. 🎯 Select providers — Choose which AI CLIs you want to generate configs for
  5. ⚙️ Generate — Creates .mcpx.json and all provider config files

📋 Commands

CommandDescription
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

🏳️ Global Flags

FlagDescription
--dir, -d <path>📁 Project directory (defaults to current)
--verbose🔊 Show detailed logs
--version, -V🏷️ Show version
--help, -h❓ Show help

📐 Canonical Format

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"
      }
    }
  }
}

📝 Server Fields

FieldTypeRequiredDescription
transport"stdio" | "http"✅ YesTransport protocol
commandstringstdioExecutable command
argsstring[]Command arguments
envRecord<string, string>Environment variables
cwdstringWorking directory
urlstringhttpServer URL
headersRecord<string, string>HTTP headers
descriptionstringHuman-readable description
enabledbooleanEnable/disable (default: true)

🤖 Supported Providers

📁 Project-Scoped Providers

These providers generate config files inside your project directory. Each project has its own independent config.

🟣 Claude Code

AspectDetail
File.mcp.json
FormatJSON
Root keymcpServers
Requires typeYes "stdio"

🔵 Gemini CLI

AspectDetail
File.gemini/settings.json
FormatJSON
Root keymcpServers
Requires typeNo

🟢 OpenAI Codex

AspectDetail
File.codex/config.toml
FormatTOML
Root keymcp_servers
Smart mergeYes — Preserves existing Codex settings (model, approval_mode, etc.)

🟠 OpenCode

AspectDetail
Fileopencode.json
FormatJSON
Root keymcp
Quirkscommand is an array (command + args merged), uses environment instead of env, type: "local"

⚫ GitHub Copilot CLI

AspectDetail
File.copilot/mcp-config.json
FormatJSON
Root keymcpServers
QuirksRequires 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, or config.fish so the project config is loaded automatically when you run copilot.

🔷 VS Code

AspectDetail
File.vscode/mcp.json
FormatJSON
Root keyservers
Quirkstype field required ("stdio" or "sse"), HTTP mapped as "sse"

🟧 IntelliJ IDEA

AspectDetail
File.idea/mcp.json
FormatJSON
Root keymcpServers
QuirksNo type field, infers from command vs url

🌍 Global Providers

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.

🔴 Kimi CLI

AspectDetail
File~/.kimi/mcp.json
FormatJSON
Root keymcpServers
ScopeGlobal — affects all projects

🔄 Sync & Provider Management

🔁 Syncing

After modifying .mcpx.json (manually or via commands), regenerate all provider configs:

mcpx sync

🔀 Changing Providers

Use 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.

📥 Importing from Existing Configs

Already have MCP servers configured in one of your AI tools? Import them:

mcpx import

MCPX detects existing project-level configs (.mcp.json, .gemini/settings.json, etc.) and lets you select which servers to import into .mcpx.json.


🏗️ Architecture

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

🧪 Testing

# Run all tests
npm test

# Run once (CI)
npm run test:run

# Type checking
npm run typecheck

🛠️ Tech Stack

CategoryLibrary
💻 LanguageTypeScript 5.x (ESM)
📦 Buildtsup (esbuild)
⌨️ CLI Frameworkcommander
💬 Interactive Prompts@clack/prompts
🎨 Colorspicocolors
📄 TOMLsmol-toml
✅ Validationzod
🧪 Testsvitest
🟢 Min Node>= 20

📄 License

MIT


🇧🇷 Leia em Português (pt-BR)

Reviews

No reviews yet

Sign in to write a review