Skip to main content
Version: 1.67

MCP server configuration

Private cloud only.

The Deeploy cloud MCP server at https://mcp.app.deeploy.ml/mcp needs no configuration; this page covers the private cloud deployment.

The MCP server takes its configuration from environment variables. In the Helm chart, everything is passed through mcp.env:

mcp:
enabled: true
env:
- name: MCP_TOKEN_ENCRYPTION_KEY
value: pf...

env is a plain list of Kubernetes name/value pairs, so any variable below can be set this way. For identity provider login there is a separate block with its own values — see Identity provider configuration.

Encryption key​

VariableRequiredDescription
MCP_TOKEN_ENCRYPTION_KEYYesA Fernet key used to encrypt the OAuth tokens and authorization codes the server issues. The server will not start without it. Must be identical across every replica — if it differs, tokens minted by one replica are rejected by another and logins fail intermittently.

Generate a key with:

python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

The value must be a valid Fernet key. Rotating it invalidates all outstanding tokens, so users simply re-authenticate.

Workspace​

VariableRequiredDescription
DEEPLOY_WORKSPACE_IDNoThe Deeploy workspace the server operates in. Every registered agent and every piece of tracing data is recorded in this workspace, so set it to the workspace you want MCP activity attributed to. When omitted, the server discovers the workspaces your credential can reach: if there is exactly one it is selected automatically, and if there are several the user is asked to choose one on first use.

Setting this explicitly is recommended when your credential can reach more than one workspace, so that activity lands in the intended place rather than in whichever workspace happens to be discovered first.

Deeploy credential​

VariableRequiredDescription
DEEPLOY_CLIENT_IDNoA Deeploy credential (access key) the server can use on behalf of every user.
DEEPLOY_CLIENT_SECRETNoThe matching secret key.

These are optional, and change how users authenticate rather than what the server can do.

Setting these removes the login step entirely

When both are set, the server authorizes every request with this credential and skips authentication — it supersedes both the Deeploy credential form and identity provider login. Anyone who can reach the server is then acting as this credential, with its permissions.

Only use it in a trusted environment, such as a private deployment with no untrusted users, and give the credential the least privilege that covers what the server needs. Leave both unset to require each user to authenticate as themselves.

Token lifetimes​

Issued tokens are self-contained — there is no server-side store and therefore no refresh tokens. Clients re-authenticate once a token expires.

VariableRequiredDescription
MCP_ACCESS_TOKEN_TTL_SECONDSNoLifetime of an issued access token. Defaults to 28800 (8 hours). Raise it to reduce re-authentication prompts; lower it for tighter security.
MCP_AUTH_CODE_TTL_SECONDSNoLifetime of a single-use authorization code. Defaults to 300 (5 minutes).

Client registration​

MCP clients identify themselves during the OAuth flow. The server resolves a client through a preference ladder, trying each rung in order:

  1. Known clients — client_ids you have vouched for out-of-band. Accepted as-is, with no network fetch.
  2. CIMD (Client ID Metadata Documents) — the client's client_id is an https:// URL, which the server fetches to read that client's metadata. This is the preferred mechanism in the MCP 2026-07-28 specification.
  3. DCR (Dynamic Client Registration) — retained only as a compatibility fallback while it is being deprecated.
VariableRequiredDescription
MCP_KNOWN_CLIENTSNoJSON map of client_id → metadata, for clients you trust. See below.
MCP_CIMD_ALLOWED_HOSTSNoOptional comma-separated host allow-list for CIMD (for example claude.ai,copilot.microsoft.com). When set, metadata documents are only fetched from these hosts and their subdomains, which rejects everything else before any network request. Unset allows any public https host.
MCP_CIMD_CACHE_TTL_SECONDSNoHow long a fetched CIMD metadata document is trusted before it is fetched again. Defaults to 3600.
MCP_CIMD_FETCH_TIMEOUT_SECONDSNoTimeout for fetching a CIMD document. Defaults to 5.
MCP_ALLOW_DCRNoAccept legacy DCR-minted client_ids. Defaults to enabled; set to 0 to require known or CIMD clients.

MCP_KNOWN_CLIENTS takes a JSON object of client IDs to their metadata:

{"client-abc": {"redirect_uris": ["https://app.example.com/cb"]}}
A known-client list is not an allow-list

Listing clients in MCP_KNOWN_CLIENTS does not restrict who can connect. Clients you have not listed still resolve through CIMD, and through DCR while MCP_ALLOW_DCR is enabled. To limit access, either set MCP_CIMD_ALLOWED_HOSTS and disable DCR, or restrict who can authenticate in the first place.