Skip to main content
Feedback

Configuring MCP Gateway with mcp.json

The mcp.json file configures the target MCP servers that MCP Gateway launches and manages dynamically. MCP Gateway reads this file at startup to determine which MCP servers to load within its process. By default, it's located in the config file created during set up, and populates automatically as you connect additional servers.

You can configure multiple MCP servers in a single file, such as Time or Memory, so MCP Gateway can orchestrate them seamlessly.

Parameters

ParameterRequiredDescription
mcpServerstrueA top-level object containing named MCP server entries.
nametrueThe unique identifier or display name for the MCP server. This helps distinguish it in the MCP Gateway UI.
commandtrueSpecifies the CLI or executable to start the MCP server (for example, uvx, npx).
argstrueAn array of strings passed as arguments to the command.
envfalseA map of environment variables scoped to that MCP server process.
iconfalseA visual emoji label used to help identify the server in the UI.

Example

mcp.json
{
"mcpServers": {
"memory": {
"args": [
"-y",
"@modelcontextprotocol/server-memory"
],
"command": "npx",
"env": {
"MEMORY_FILE_PATH": "/path/to/custom/memory.json"
},
"icon": "📝"
},
"time": {
"args": [
"mcp_server_time",
"--local-timezone=America/New_York"
],
"command": "uvx",
"env": {},
"icon": "⏰"
}
}
}
On this Page