The mcp-proxy can load multiple named MCP server configurations from a single JSON file. This allows you to manage several stdio servers with specific commands, arguments, and environment variables in one place.
JSON Configuration Format
The configuration file must be a JSON object containing an mcpServers key. Each entry under mcpServers represents a named server.
Required and Optional Fields per Server:
command (string, required): The executable command to run the server.args (array of strings, optional): Arguments to pass to the command. Defaults to an empty list [].env (object, optional): Environment variables specific to this server. These are merged with the base_env provided during loading.enabled (boolean, optional): If set to false, the server will be skipped. Defaults to true.
Example Configuration File
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {
"API_KEY": "your_key_here"
}
},
"sqlite": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite"],
"enabled": true
},
"disabled-server": {
"command": "echo",
"enabled": false
}
}
}