Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davidpastorvicente/mcpx-cli/llms.txt

Use this file to discover all available pages before exploring further.

mcpx init is the entry point for MCPX. It launches a step-by-step interactive wizard that creates or updates your canonical configuration file (.agents/mcp.json for a project, or ~/.agents/mcp.json globally) and regenerates every configured provider config file in one pass. Running mcpx with no arguments is identical — the bare command defaults to init.
mcpx init [--dir <path>] [--verbose]

Wizard phases

1

Scope selection

MCPX first asks where to store the configuration. Choose Project to write .agents/mcp.json inside the current directory, or Global to write ~/.agents/mcp.json in your home directory and share it across all projects. If you run mcpx init from your home directory, MCPX automatically selects the global scope and skips this prompt.
2

Detection

MCPX scans the target directory for existing provider config files — .mcp.json, .gemini/config/mcp_config.json, .codex/config.toml, and so on — and reports which files were found along with the number of servers they contain.
3

Import offer

If any existing provider configs are detected, the wizard asks whether you want to import them. Confirming imports all detected servers in bulk into the canonical config. If you need per-server selection, use mcpx import instead.
4

Server management

Add new MCP servers one at a time using the interactive server wizard. For each server you provide:
  • Name — a unique identifier (letters, numbers, dots, hyphens, underscores)
  • Transportstdio for a local command or http for a remote server
  • Command / URL — the executable (stdio) or endpoint (http)
  • Arguments — comma-separated args passed to the command (stdio only)
  • Environment variables — key/value pairs injected at runtime (stdio only)
You can add as many servers as you like, and navigate back to correct earlier entries.
5

Provider selection

Choose which AI providers should receive generated config files. MCPX supports eight providers; any combination can be selected. Previously selected providers are pre-checked when re-running mcpx init on an existing config.
6

Generation

MCPX writes .agents/mcp.json (or ~/.agents/mcp.json) with version, providers list, and all server definitions. It then generates or updates every selected provider config file — creating directories as needed. For providers such as OpenAI Codex that mix MCP settings with other settings in the same file, only the MCP section is replaced.

Global flags

FlagDescription
-d, --dir <path>Project directory (defaults to current working directory)
--verboseShow detailed logs (default: false)
-V, --versionShow version
-h, --helpShow help
Running mcpx with no arguments is exactly equivalent to running mcpx init. The bare command is intentionally the default action so that first-time setup requires no subcommand to remember.
Use --dir to target a project directory other than your current working directory. For example, mcpx init --dir ~/projects/my-app sets up MCPX for my-app without cd-ing into it first.

Build docs developers (and LLMs) love