Everything is configured with environment variables. The server checks all of them at startup and refuses to start with a list of every problem it found, so a typo never leaves it half configured.
General rules:
An empty value counts as unset.
Every variable can also be read from a file by appending _FILE to its name, for example OAUTH_SIGNING_KEY_FILE=/run/secrets/oauth_signing_key. A value set directly wins over the file, and a trailing newline in the file is ignored. Use this for secrets with Docker or Kubernetes secrets.
Booleans accept true, false, 1, 0, yes, no, on and off, in any case.
Lists are comma separated; spaces around names are ignored.
Key that signs OAuth tokens and seals each person’s Twenty API key inside them, at least 32 bytes. Changing it signs everyone out
People sign in with their own Twenty API key, so there is no OAUTH_ADMIN_PASSWORD, and MCP_AUTH_TOKEN must not be set: the server refuses to start with it.
Your Twenty server’s address, without /rest. Must be https, or http to a loopback address only; no credentials, query or fragment. Leave it unset for Twenty Cloud. Changing it signs everyone out
TWENTY_DEFAULT_CURRENCY
no
USD
GBP
Three-letter ISO 4217 code for opportunity amounts given without one. Upper-cased; anything else stops startup
Log filter in tracing syntax. Targets: mcp_twenty_crm, mcp_twenty_crm_records, mcp_server_core. The audit target always stays on at info
LOG_FORMAT
no
json
pretty
json or pretty
DEBUG
no
false
true
Debug logging for mcp_twenty_crm* and mcp_server_core: the arguments of read tools (search words, filters), Twenty request paths with record ids, status codes, timings and tool error details. Never API keys or response bodies
DEBUG_UNSAFE_LOG_CONTENT
no
false
true
Also logs full tool results and Twenty response bodies, which puts your CRM records in the logs. Never in production. API keys are never logged
METRICS_ADDR
no
0.0.0.0:9090
Starts a separate plain-HTTP Prometheus listener. Keep it on an internal network
OTEL_EXPORTER_OTLP_ENDPOINT
no
https://otel.example.com
Exports traces over OTLP/HTTP. The standard OTEL_EXPORTER_OTLP_HEADERS is honoured. Nothing is exported unless it is set
AUDIT_LOG_PATH
no
/audit/audit.jsonl
File every write tool call is appended to as one JSON line (created with mode 0600). Audit lines are always logged too. See Security