Skip to main content
Version: Next

mcp.json (Dynamic MCP Server Loading)

The mcp.json file configures the target MCP servers that MCPX will launch and manage dynamically. MCPX reads this file at startup to determine which MCP servers to load within its process. By default, it's located at config/mcp.json within the mcpx-server directory, but this path can be overridden using the SERVERS_CONFIG_PATH environment variable.

You can configure multiple MCP servers in a single file, such as time, Google Maps, or Slack, so MCPX can orchestrate them seamlessly.

Parameters

mcpServers

required: true
description: A top-level object containing named MCP server entries.

name

required: true
description: The unique identifier or display name for the MCP server. This helps distinguish it from others when listed in the MCPX UI.

command

required: true
description: Specifies the CLI or executable to start the MCP server (e.g., uvx, npx).

args

required: true
description: An array of strings passed as arguments to the command.

env

required: false
description: A map of environment variables scoped to that MCP server process.

Template

{
"mcpServers": {
"mcpx": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:9000/sse",
"--header",
"x-lunar-consumer-tag: consumer_tag",
"--header",
"x-lunar-api-key: lunar_api_key"
]
}
}
}