Configuration Reference

May 12, 2026 · View on GitHub

Complete reference for MCPProxy configuration file (mcp_config.json). This document covers all configuration options, their defaults, and usage examples.

Table of Contents

  1. Configuration File Location
  2. Basic Configuration
  3. Server Configuration
  4. Security Settings
  5. Tokenizer Configuration
  6. TLS/HTTPS Configuration
  7. Logging Configuration
  8. Docker Isolation
  9. Docker Recovery
  10. Environment Configuration
  11. Code Execution
  12. Feature Flags
  13. Registries
  14. Complete Example

Configuration File Location

MCPProxy looks for configuration in these locations (in order):

OSConfig Location
macOS~/.mcpproxy/mcp_config.json
Windows%USERPROFILE%\.mcpproxy\mcp_config.json
Linux~/.mcpproxy/mcp_config.json

Note: At first launch, MCPProxy automatically generates a minimal configuration file if none exists.


Basic Configuration

Network Binding

{
  "listen": "127.0.0.1:8080"
}
FieldTypeDefaultDescription
listenstring"127.0.0.1:8080"Network address to bind to. Use :8080 for all interfaces, 127.0.0.1:8080 for localhost only (recommended for security)

Examples:

  • "127.0.0.1:8080" - Localhost only (default, secure)
  • ":8080" - All network interfaces (use with caution)
  • "0.0.0.0:9000" - All interfaces on port 9000

Data Directory

{
  "data_dir": "~/.mcpproxy"
}
FieldTypeDefaultDescription
data_dirstring"~/.mcpproxy"Directory for database and certificates. Supports ~ expansion for home directory. Logs use OS log directories unless log_dir is set

Tray Application

{
  "enable_socket": true,
  "tray_endpoint": ""
}
FieldTypeDefaultDescription
enable_socketbooleantrueEnable Unix socket (macOS/Linux) or named pipe (Windows) for secure local IPC between tray and core
tray_endpointstring""Override socket/pipe path (advanced, usually not needed)

Search & Tool Limits

{
  "tools_limit": 15,
  "tool_response_limit": 20000,
  "call_tool_timeout": "2m"
}
FieldTypeDefaultDescription
tools_limitinteger15Maximum number of tools to return per request (1-1000)
tool_response_limitinteger20000Maximum characters in tool responses (0 = unlimited)
call_tool_timeoutstring"2m"Timeout for tool calls (e.g., "30s", "2m", "5m"). Note: When using agents like Codex or Claude as MCP servers, you may need to increase this timeout significantly, even up to 10 minutes ("10m"), as these agents may require longer processing times for complex operations

Debug & Development

{
  "debug_search": false,
  "enable_prompts": true,
  "check_server_repo": true
}
FieldTypeDefaultDescription
debug_searchbooleanfalseEnable debug logging for search operations
enable_promptsbooleantrueEnable MCP prompts feature for workflow guidance and interactive assistance with common tasks (finding tools, debugging search, setting up servers, troubleshooting connections)
check_server_repobooleantrueEnable repository detection for MCP servers (shows install commands)

Server Configuration

Basic Server Structure

{
  "mcpServers": [
    {
      "name": "my-server",
      "protocol": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"],
      "working_dir": "/path/to/project",
      "env": {
        "API_KEY": "secret-value"
      },
      "enabled": true,
      "quarantined": false
    }
  ]
}

Server Fields

FieldTypeRequiredDescription
namestringYesUnique server identifier
protocolstringNoTransport protocol: stdio, http, sse, streamable-http, or auto (default: inferred from command/url)
commandstringYes*Command to execute (required for stdio protocol)
argsarrayNoCommand arguments
urlstringYes*Server URL (required for http/sse/streamable-http protocols)
headersobjectNoHTTP headers for HTTP-based protocols
working_dirstringNoWorking directory for stdio servers, or for the locally-launched child of an HTTP/SSE server (default: current directory)
envobjectNoEnvironment variables for stdio servers, or for the locally-launched child of an HTTP/SSE server
launcher_wait_timeoutdurationNoWhen command is set together with an HTTP/SSE url, how long mcpproxy waits for that URL to become reachable after spawning the child (e.g. "15s", default "30s")
oauthobjectNoOAuth configuration (see OAuth Configuration)
isolationobjectNoPer-server Docker isolation settings (see Docker Isolation)
enabledbooleanNoEnable/disable server (default: true)
quarantinedbooleanNoSecurity quarantine status (default: false for manually added servers, true for LLM-added servers)
reconnect_on_usebooleanNoWhen true, tool calls to a disconnected server trigger an immediate reconnect attempt (15s timeout) before failing (default: false)
createdstringNoISO 8601 timestamp (auto-generated)
updatedstringNoISO 8601 timestamp (auto-updated)

Protocol Types

stdio - Standard input/output (local processes):

{
  "name": "local-server",
  "protocol": "stdio",
  "command": "python",
  "args": ["-m", "my_mcp_server"],
  "working_dir": "/path/to/project"
}

http - HTTP transport:

{
  "name": "remote-server",
  "protocol": "http",
  "url": "https://api.example.com/mcp",
  "headers": {
    "Authorization": "Bearer token"
  }
}

sse - Server-Sent Events:

{
  "name": "sse-server",
  "protocol": "sse",
  "url": "https://api.example.com/mcp/sse"
}

streamable-http - Streamable HTTP (MCP standard):

{
  "name": "streamable-server",
  "protocol": "streamable-http",
  "url": "https://api.example.com/mcp"
}

auto - Auto-detect from command or url:

{
  "name": "auto-server",
  "protocol": "auto",
  "command": "npx",
  "args": ["-y", "my-server"]
}

Locally-launched HTTP / SSE servers

By default command is only used for stdio servers. When you set command together with an HTTP/SSE url and an explicit protocol of http, sse, or streamable-http, mcpproxy will:

  1. Spawn the command (with args, env, working_dir, and Docker isolation exactly like a stdio server).
  2. Wait up to launcher_wait_timeout (default 30s) for url to accept a TCP connection.
  3. Connect via the configured HTTP/SSE transport.
  4. Own the child's lifecycle — the process is stopped (SIGTERM, then SIGKILL after a grace period) on disconnect, restart, server-disable, or mcpproxy shutdown. Unexpected exits trigger an automatic disconnect, which the existing reconnect path picks up.
{
  "name": "local-http-mcp",
  "protocol": "http",
  "url": "http://127.0.0.1:9999/mcp",
  "command": "node",
  "args": ["./examples/echo-http-server.js", "--port", "9999"],
  "working_dir": "/path/to/repo",
  "launcher_wait_timeout": "15s",
  "enabled": true
}

stdout and stderr of the child are routed to the per-server log, so mcpproxy upstream logs <name> continues to work the same way it does for stdio servers.

Behaviour matrix when both command and url are set

protocolcommandurlBehaviour
stdio (explicit)setanyStdio transport, child via stdin/stdout — url ignored.
http / sse / streamable-http (explicit)setsetLocally-launched HTTP/SSE — spawn child, wait for URL, connect via network.
http / sse / streamable-http (explicit)unsetsetConnect to remote URL — no spawn.
auto or unsetsetanyStdio (command wins over url for back-compat — set protocol explicitly to opt into the launcher).
auto or unsetunsetsetHTTP/SSE remote — no spawn.

The "command wins" rule under auto is intentional: it preserves backwards compatibility with configurations written before the launcher feature existed. To launch a local HTTP/SSE server you must set protocol explicitly to one of http, sse, or streamable-http.

OAuth Configuration

{
  "oauth": {
    "client_id": "your-client-id",
    "client_secret": "secret-reference",
    "redirect_uri": "http://localhost:8080/oauth/callback",
    "scopes": ["repo", "user"],
    "pkce_enabled": true
  }
}
FieldTypeRequiredDescription
client_idstringNoOAuth client ID (uses Dynamic Client Registration if empty)
client_secretstringNoOAuth client secret (can reference secure storage)
redirect_uristringNoOAuth redirect URI (auto-generated if not provided)
scopesarrayNoOAuth scopes to request
pkce_enabledbooleanNoPKCE is always enabled for security; this flag is currently ignored

See OAuth Documentation for complete details.


Security Settings

{
  "api_key": "your-secret-api-key",
  "read_only_mode": false,
  "disable_management": false,
  "allow_server_add": true,
  "allow_server_remove": true
}
FieldTypeDefaultDescription
api_keystringAuto-generatedAPI key for REST API authentication. Required; if empty, one is auto-generated and enforced (logged on startup)
read_only_modebooleanfalsePrevent all configuration modifications
disable_managementbooleanfalseDisable server management operations (restart, enable, disable)
allow_server_addbooleantrueAllow adding new servers via API/tools
allow_server_removebooleantrueAllow removing servers via API/tools

Security Notes:

  • API Key: Set via --api-key flag, MCPPROXY_API_KEY environment variable, or config file
  • Empty API Key: Empty values are replaced with an auto-generated key; authentication is always enforced
  • Auto-Generation: If no API key is provided, one is generated and logged for easy access
  • Tray Integration: Tray app automatically manages API keys for core communication

Tokenizer Configuration

The tokenizer provides local token counting using the tiktoken library. It does not access LLMs or make API calls—it's purely for counting tokens in text locally.

Basic Configuration

{
  "tokenizer": {
    "enabled": true,
    "default_model": "gpt-4",
    "encoding": "cl100k_base"
  }
}
FieldTypeDefaultDescription
enabledbooleantrueEnable/disable token counting
default_modelstring"gpt-4"Default model name for tokenization (used to determine encoding when model not specified)
encodingstring"cl100k_base"Default tiktoken encoding to use

How Tokenizer Works

Important: The tokenizer does not access LLMs. It performs local token counting using the tiktoken algorithm:

  1. Local Processing: All token counting happens locally using the tiktoken library
  2. No Network Calls: No API requests or external services are used
  3. Model Mapping: The default_model field is used to look up the appropriate encoding via GetEncodingForModel()
  4. Encoding Selection: If a model isn't recognized, it falls back to the encoding field or cl100k_base

Supported Models & Encodings

The tokenizer automatically maps model names to encodings:

GPT-4o Series (uses o200k_base):

  • gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.5, gpt-4o-2024-05-13, gpt-4o-2024-08-06

GPT-4 & GPT-3.5 Series (uses cl100k_base):

  • gpt-4, gpt-4-turbo, gpt-3.5-turbo, gpt-3.5-turbo-16k, text-embedding-ada-002, etc.

Claude Models (uses cl100k_base as approximation):

  • claude-3-5-sonnet, claude-3-opus, claude-3-sonnet, claude-3-haiku, claude-2.1, claude-2.0, claude-instant
  • Note: Claude models use cl100k_base as an approximation. For accurate counts, use Anthropic's count_tokens API.

Codex Series (uses p50k_base):

  • code-davinci-002, code-davinci-001, code-cushman-002, code-cushman-001

Older GPT-3 Series (uses r50k_base):

  • text-davinci-003, text-davinci-002, davinci, curie, babbage, ada

Supported Encodings

EncodingModelsDescription
o200k_baseGPT-4o, GPT-4.5Latest OpenAI models
cl100k_baseGPT-4, GPT-3.5, Claude (approx)Most common encoding
p50k_baseCodexCode generation models
r50k_baseGPT-3Legacy models

Usage Examples

For GPT-4:

{
  "tokenizer": {
    "enabled": true,
    "default_model": "gpt-4",
    "encoding": "cl100k_base"
  }
}

For Claude Models:

{
  "tokenizer": {
    "enabled": true,
    "default_model": "claude-3-5-sonnet",
    "encoding": "cl100k_base"
  }
}

For GPT-4o:

{
  "tokenizer": {
    "enabled": true,
    "default_model": "gpt-4o",
    "encoding": "o200k_base"
  }
}

Disable Token Counting:

{
  "tokenizer": {
    "enabled": false
  }
}

What Tokenizer Is Used For

  • Token Usage Tracking: Counts tokens in MCP tool calls and responses
  • Token Savings Calculation: Calculates token savings from caching
  • Metrics & Monitoring: Provides token metrics for observability
  • Response Truncation: Helps determine when to truncate large responses

TLS/HTTPS Configuration

{
  "tls": {
    "enabled": false,
    "require_client_cert": false,
    "certs_dir": "",
    "hsts": true
  }
}
FieldTypeDefaultDescription
enabledbooleanfalseEnable HTTPS/TLS
require_client_certbooleanfalseEnable mutual TLS (mTLS) for client authentication
certs_dirstring""Custom certificate directory (defaults to ${data_dir}/certs)
hstsbooleantrueEnable HTTP Strict Transport Security headers

Quick Setup:

  1. Trust certificate: mcpproxy trust-cert
  2. Enable TLS: Set "enabled": true or MCPPROXY_TLS_ENABLED=true
  3. Update client URLs to use https://

See Setup Guide - HTTPS for complete details.


Logging Configuration

{
  "logging": {
    "level": "info",
    "enable_file": false,
    "enable_console": true,
    "filename": "main.log",
    "log_dir": "",
    "max_size": 10,
    "max_backups": 5,
    "max_age": 30,
    "compress": true,
    "json_format": false
  }
}
FieldTypeDefaultDescription
levelstring"info"Log level: trace, debug, info, warn, error
enable_filebooleanfalseEnable file logging
enable_consolebooleantrueEnable console logging
filenamestring"main.log"Log filename
log_dirstring""Custom log directory (defaults to OS log root; see below)
max_sizeinteger10Maximum log file size in MB before rotation
max_backupsinteger5Number of backup log files to keep
max_ageinteger30Maximum age of log files in days
compressbooleantrueCompress rotated log files
json_formatbooleanfalseUse JSON format (useful for log aggregation)

Log Locations (defaults):

  • macOS: ~/Library/Logs/mcpproxy/main.log
  • Linux: ~/.local/state/mcpproxy/logs/main.log (or /var/log/mcpproxy when running as root)
  • Windows: %LOCALAPPDATA%\mcpproxy\logs\main.log
  • Per-server logs: same directory, server-{name}.log
  • Custom: set log_dir to override (supports ~ expansion)

Behavior notes:

  • mcpproxy serve enables file logging by default unless --log-to-file is explicitly set to false

See Logging Documentation for complete details.


Docker Isolation

Global Docker Isolation Settings

{
  "docker_isolation": {
    "enabled": false,
    "default_images": {
      "python": "python:3.11",
      "node": "node:20",
      "npx": "node:20"
    },
    "registry": "docker.io",
    "network_mode": "bridge",
    "memory_limit": "512m",
    "cpu_limit": "1.0",
    "timeout": "30s",
    "extra_args": [],
    "log_driver": "",
    "log_max_size": "100m",
    "log_max_files": "3"
  }
}
FieldTypeDefaultDescription
enabledbooleanfalseEnable Docker isolation globally
default_imagesobjectSee belowMap of runtime type to Docker image
registrystring"docker.io"Docker registry to use
network_modestring"bridge"Docker network mode
memory_limitstring"512m"Memory limit for containers
cpu_limitstring"1.0"CPU limit (1 core)
timeoutstring"30s"Container startup timeout
extra_argsarray[]Additional docker run arguments
log_driverstring""Docker log driver (empty = system default)
log_max_sizestring"100m"Maximum log file size
log_max_filesstring"3"Maximum number of log files

Default Docker Images

{
  "python": "python:3.11",
  "python3": "python:3.11",
  "uvx": "python:3.11",
  "pip": "python:3.11",
  "pipx": "python:3.11",
  "node": "node:20",
  "npm": "node:20",
  "npx": "node:20",
  "yarn": "node:20",
  "go": "golang:1.21-alpine",
  "cargo": "rust:1.75-slim",
  "rustc": "rust:1.75-slim",
  "binary": "alpine:3.18",
  "sh": "alpine:3.18",
  "bash": "alpine:3.18",
  "ruby": "ruby:3.2-alpine",
  "gem": "ruby:3.2-alpine",
  "php": "php:8.2-cli-alpine",
  "composer": "php:8.2-cli-alpine"
}

Per-Server Isolation Settings

{
  "mcpServers": [
    {
      "name": "isolated-server",
      "isolation": {
        "enabled": true,
        "image": "custom-image:latest",
        "network_mode": "none",
        "extra_args": ["--cap-drop=ALL"],
        "working_dir": "/app",
        "log_driver": "json-file",
        "log_max_size": "50m",
        "log_max_files": "2"
      }
    }
  ]
}
FieldTypeDescription
enabledbooleanEnable Docker isolation for this server (overrides global setting)
imagestringCustom Docker image (overrides default)
network_modestringCustom network mode for this server
extra_argsarrayAdditional docker run arguments
working_dirstringWorking directory inside container
log_driverstringLog driver override
log_max_sizestringLog file size override
log_max_filesstringLog file count override

See Docker Isolation Documentation for complete details.


Docker Recovery

{
  "docker_recovery": {
    "enabled": true,
    "check_intervals": ["2s", "5s", "10s", "30s", "60s"],
    "max_retries": 0,
    "notify_on_start": true,
    "notify_on_success": true,
    "notify_on_failure": true,
    "notify_on_retry": false,
    "persistent_state": true
  }
}
FieldTypeDefaultDescription
enabledbooleantrueEnable Docker recovery monitoring
check_intervalsarray["2s", "5s", "10s", "30s", "60s"]Exponential backoff intervals for health checks
max_retriesinteger0Maximum retry attempts (0 = unlimited)
notify_on_startbooleantrueShow notification when recovery starts
notify_on_successbooleantrueShow notification on successful recovery
notify_on_failurebooleantrueShow notification on recovery failure
notify_on_retrybooleanfalseShow notification on each retry
persistent_statebooleantrueSave recovery state across restarts

See Docker Recovery Documentation for complete details.


Environment Configuration

{
  "environment": {
    "inherit_system_safe": true,
    "allowed_system_vars": [
      "PATH",
      "HOME",
      "TMPDIR",
      "NODE_PATH"
    ],
    "custom_vars": {
      "CUSTOM_VAR": "value"
    },
    "enhance_path": false
  }
}
FieldTypeDefaultDescription
inherit_system_safebooleantrueInherit safe system environment variables
allowed_system_varsarraySee belowList of system variables to allow
custom_varsobject{}Custom environment variables to set
enhance_pathbooleanfalseEnable PATH enhancement for Launchd scenarios

Default Allowed System Variables:

  • Core: PATH, HOME, TMPDIR, TEMP, TMP, SHELL, TERM, LANG, USER, USERNAME
  • Windows-specific: USERPROFILE, APPDATA, LOCALAPPDATA, PROGRAMFILES, SYSTEMROOT, COMSPEC
  • Unix/XDG: XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_CACHE_HOME, XDG_RUNTIME_DIR
  • Locale: all LC_* variables (e.g., LC_ALL, LC_CTYPE, …)
  • Custom additions: custom_vars merged on top

Routing Mode

Controls how upstream MCP tools are exposed to AI agents on the default /mcp endpoint.

{
  "routing_mode": "retrieve_tools"
}
FieldTypeDefaultDescription
routing_modestring"retrieve_tools"How tools are exposed: retrieve_tools, direct, or code_execution

Available modes:

ModeDescription
retrieve_toolsBM25 search via retrieve_tools + call_tool_read/write/destructive (default, most token-efficient)
directAll upstream tools exposed directly as serverName__toolName
code_executionJavaScript orchestration via code_execution tool with tool catalog

All three modes are always available on dedicated endpoints regardless of config: /mcp/all (direct), /mcp/code (code_execution), /mcp/call (retrieve_tools).

See Routing Modes for complete details.


Tool-Level Quarantine

SHA256 hash-based tool approval system that detects changes to tool descriptions and schemas.

{
  "quarantine_enabled": true
}
FieldTypeDefaultDescription
quarantine_enabledbooleantrueEnable tool-level quarantine globally

Per-server quarantine skip is configured on the server entry:

{
  "mcpServers": [
    {
      "name": "trusted-server",
      "command": "my-server",
      "skip_quarantine": true
    }
  ]
}
FieldTypeDefaultDescription
skip_quarantinebooleanfalseSkip tool-level quarantine for this server (auto-approve new tools)

See Tool Quarantine for complete details.


Code Execution

{
  "enable_code_execution": false,
  "code_execution_timeout_ms": 120000,
  "code_execution_max_tool_calls": 0,
  "code_execution_pool_size": 10
}
FieldTypeDefaultDescription
enable_code_executionbooleanfalseEnable JavaScript/TypeScript code execution tool (disabled by default for security)
code_execution_timeout_msinteger120000Default timeout in milliseconds (1-600000, max 10 minutes)
code_execution_max_tool_callsinteger0Maximum tool calls per execution (0 = unlimited)
code_execution_pool_sizeinteger10Number of JavaScript VM instances in pool (1-100)

Code execution supports both JavaScript (ES2020+) and TypeScript. TypeScript code is automatically transpiled via esbuild before execution.

See Code Execution Documentation for complete details.


Feature Flags

{
  "features": {
    "enable_runtime": true,
    "enable_event_bus": true,
    "enable_sse": true,
    "enable_observability": true,
    "enable_health_checks": true,
    "enable_metrics": true,
    "enable_tracing": false,
    "enable_oauth": true,
    "enable_quarantine": true,
    "enable_docker_isolation": false,
    "enable_search": true,
    "enable_caching": true,
    "enable_async_storage": true,
    "enable_web_ui": true,
    "enable_debug_logging": false,
    "enable_contract_tests": false
  }
}

Note: Feature flags are typically managed internally. Most users don't need to modify these settings.


Registries

{
  "registries": [
    {
      "id": "pulse",
      "name": "Pulse MCP",
      "description": "Browse and discover MCP use-cases, servers, clients, and news",
      "url": "https://www.pulsemcp.com/",
      "servers_url": "https://api.pulsemcp.com/v0beta/servers",
      "tags": ["verified"],
      "protocol": "custom/pulse"
    }
  ]
}
FieldTypeDescription
idstringUnique registry identifier
namestringDisplay name
descriptionstringRegistry description
urlstringRegistry homepage
servers_urlstringAPI endpoint for server listings
tagsarrayRegistry tags (e.g., ["verified"])
protocolstringRegistry protocol type
countnumber/stringNumber of servers in registry (auto-populated)

Default Registries:

  • Pulse MCP
  • Docker MCP Catalog
  • Fleur
  • Azure MCP Registry Demo
  • Remote MCP Servers

See Search Servers Documentation for complete details.


Complete Example

Here's a complete configuration example with all major sections:

Note: Leaving api_key empty will cause MCPProxy to generate and enforce a new key on startup.

{
  "listen": "127.0.0.1:8080",
  "data_dir": "~/.mcpproxy",
  "enable_socket": true,
  "api_key": "",
  "tools_limit": 15,
  "tool_response_limit": 20000,
  "call_tool_timeout": "2m",
  "debug_search": false,
  "enable_prompts": true,
  "check_server_repo": true,

  "tokenizer": {
    "enabled": true,
    "default_model": "gpt-4",
    "encoding": "cl100k_base"
  },

  "tls": {
    "enabled": false,
    "require_client_cert": false,
    "hsts": true
  },

  "logging": {
    "level": "info",
    "enable_file": false,
    "enable_console": true,
    "filename": "main.log",
    "max_size": 10,
    "max_backups": 5,
    "max_age": 30,
    "compress": true,
    "json_format": false
  },

  "mcpServers": [
    {
      "name": "everything",
      "protocol": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"],
      "enabled": true,
      "quarantined": false
    },
    {
      "name": "github",
      "protocol": "http",
      "url": "https://api.github.com/mcp",
      "oauth": {
        "scopes": ["repo", "user"],
        "pkce_enabled": true
      },
      "enabled": true
    }
  ],

  "docker_isolation": {
    "enabled": false
  },

  "docker_recovery": {
    "enabled": true,
    "notify_on_start": true,
    "notify_on_success": true,
    "notify_on_failure": true
  },

  "environment": {
    "inherit_system_safe": true,
    "allowed_system_vars": ["PATH", "HOME", "TMPDIR"],
    "custom_vars": {},
    "enhance_path": false
  },

  "enable_code_execution": false,
  "code_execution_timeout_ms": 120000,
  "code_execution_max_tool_calls": 0,
  "code_execution_pool_size": 10,

  "read_only_mode": false,
  "disable_management": false,
  "allow_server_add": true,
  "allow_server_remove": true
}

Environment Variables

Many configuration options can be overridden via environment variables:

Environment VariableConfig FieldDescription
MCPPROXY_LISTEN / MCPP_LISTENlistenNetwork binding address
MCPPROXY_API_KEYapi_keyAPI key for authentication (empty values trigger auto-generation; auth remains enabled)
MCPPROXY_TLS_ENABLEDtls.enabledEnable HTTPS/TLS
MCPPROXY_TLS_REQUIRE_CLIENT_CERTtls.require_client_certEnable mTLS
MCPPROXY_CERTS_DIRtls.certs_dirCustom certificates directory
MCPPROXY_DATAdata_dirOverride data directory
MCPPROXY_DISABLE_OAUTH-Disable OAuth for testing
HEADLESS-Run in headless mode

Prefix rules:

  • General settings also accept the MCPP_ prefix (hyphens become underscores), e.g., MCPP_TOOLS_LIMIT, MCPP_ENABLE_PROMPTS.
  • TLS/listen/data have additional convenience overrides with the MCPPROXY_ prefix as listed above.

Priority: Environment variables > Config file > Defaults


Validation

MCPProxy validates configuration on startup. Common validation errors:

  • Invalid listen address: Must be host:port or :port format
  • Invalid tools_limit: Must be between 1 and 1000
  • Missing server name: Each server must have a unique name
  • Invalid protocol: Must be stdio, http, sse, streamable-http, or auto
  • Missing command: stdio servers require command field
  • Missing url: HTTP-based servers require url field
  • Invalid timeout: Must be a valid duration string (e.g., "30s", "2m")

Run mcpproxy doctor to check configuration health.