MCP Servers
LLM Proxy can host Model Context Protocol servers behind the gateway. Each configured server is exposed at a stable URL:
https://your-proxy/servers/<server-name>/mcpMCP clients (Claude Code, Codex, Cursor, custom agents) connect to that URL with a proxy API key and see the backend server's tools, resources, and prompts verbatim (tools/list, tools/call, resources/*, prompts/*). Tool names are not renamed.
Two kinds of traffic
/servers/* is an MCP endpoint; the proxy does not inject MCP tools into /v1/* model requests. Connect your MCP client to /servers/<name>/mcp and authorize it with API keys. The same keys, budgets, rate limits, and logs apply.

Adding a server
MCP Servers → Add Server:
| Field | Applies to | Notes |
|---|---|---|
| Name | both | Unique; becomes the URL path segment. May contain slashes |
| Type | both | stdio or streamableHttp |
| Command | stdio | Required. Must pass the security policy |
| Args | stdio | Free-form list; shell metacharacters (;, &&, ||, |, $(, backticks, >, <) are rejected |
| Env | stdio | Keys must be allowlisted; non-allowlisted keys are dropped |
| Base URL | streamableHttp | Required. Must be http/https and pass SSRF checks |
Enabled servers start immediately and auto-start on every proxy startup (failures are logged and do not abort startup).
No custom HTTP headers
Remote (streamableHttp) servers are contacted without extra headers. Use a network path you control, or a backend that authenticates by URL.
Who can manage servers
Because MCP servers execute processes and make outbound requests on the host, creating and managing servers is admin-only. Members cannot create, edit, start/stop, or delete servers.
Members use admin-created servers through the proxy and control which of their own API keys can reach which server via the per-key allowlist (see Restricting access).
Connecting a client
Point the MCP client at the proxy URL with an API key:
{
"mcpServers": {
"github": {
"type": "streamableHttp",
"url": "https://llm.example.com/servers/github/mcp",
"headers": { "Authorization": "Bearer sk-your-proxy-key" }
}
}
}- Auth accepts
Authorization: Bearer sk-…orx-api-key: sk-…; console login sessions are not accepted on/servers/*. - Requests go through the same protections as model traffic: IP lockout for invalid keys, per-key RPM limit, and budget caps (a budget check that cannot be confirmed returns 503, fail-closed).
Restricting access
Per-key allowlist (allowed_mcp_servers on the API key):
| Value | Meaning |
|---|---|
| Not set | All MCP servers allowed |
| Empty list | Deny all MCP servers |
| Names | Only those servers |
Every key owner can set this field on their own keys. Policy changes are cached for up to 60 seconds. Disabling Require key MCP permissions in Settings → General → MCP Security turns the check off so any valid key can use any server.
Security policy
MCP servers execute processes and make outbound HTTP requests on your behalf, so the proxy is deny-by-default. Configure in Settings → General → MCP Security:
| Setting | Default | Behavior |
|---|---|---|
| Require key MCP permissions | on | Off allows any valid key to use any server |
| Allowed commands | (empty) | Empty permits no stdio commands. Entries are a bare basename (npx) or an exact invocation (npx mcp-searxng) |
| Blocked commands | bash, sh, zsh, cmd.exe, powershell.exe, python, python3, node, perl, ruby | Always denied, even if allowlisted |
| Allowed env keys | (empty) | Empty passes no custom environment variables |
| Blocked env keys | PATH, LD_PRELOAD, DYLD_INSERT_LIBRARIES, PYTHONPATH, NODE_OPTIONS, SHELL, HOME, USER | Always stripped |
| Blocked URL hosts | (empty) | Hostname denylist for streamableHttp |
| Blocked URL IPs | loopback, RFC1918, link-local, 169.254.169.254, CGNAT, IPv6 equivalents | SSRF protection; hostnames are DNS-resolved and rejected if any resolved address is blocked |
A tool call, prompt, or resource response is capped at 8 MiB across its content blocks (MCP_MAX_RESULT_BYTES). Payloads past the cap are truncated and logged with truncated: true.
Policy checks run when a server is created or updated (returning HTTP 422 on violations) and again when the backend starts. Non-allowlisted environment keys are dropped rather than rejected, so the saved config shows only what survived.
Because the default allowlist is empty, a fresh install rejects every stdio server until a command is allowlisted. The server form validates commands, args, and env keys against the current policy as you type and links directly to MCP Security when something is blocked.
Typical allowlist entry
For a Node-based server, allow npx (or the exact npx @scope/server form) and add only the env vars the server needs. The container image includes bunx and uvx, so Python and Node MCP servers work without extra installs.
Lifecycle and limits
- Enable / disable: disabling stops the server process; enabling starts it.
- Editing a running server: changing command, args, env, or base URL restarts the server automatically so the new definition takes effect.
- Status: the server list shows
runningorstopped. There is no periodic health check; backends attempt a one-shot reconnect on connection errors. - Capabilities: click View Details on a server row to inspect the tools, prompts, and resources advertised by a running server.
- Timeout: every backend operation is capped at 30 seconds (not configurable). Slow tools fail with an MCP timeout error.
Observability
Every MCP operation is logged under Logs → MCP Calls: server, operation, resource type/name, status, duration, and arguments/results with sensitive fields masked. Server start and stop events are logged as well.