Dapr MCP server configuration reference

Every command-line flag and environment variable the Dapr MCP server reads, with defaults

The Dapr MCP server takes a few command-line flags and reads everything else from environment variables. The server checks authentication settings at startup and exits with an error if they are invalid or incomplete, rather than starting without protection.

Command-line flags

FlagDefaultDescription
--http <addr>Not set (stdio)Serve streamable HTTP on this address, for example localhost:8080 or 0.0.0.0:8080, instead of stdio. The health endpoints are served on the same address.
--versionfalsePrint the version and exit.
--health-checkfalseRequest /livez from a running server and exit with 0 on a 200 response, 1 otherwise. The container image uses this for its HEALTHCHECK.
--health-check-addr <host:port>From --http, else localhost:8080Address that --health-check probes. A wildcard host such as 0.0.0.0 is probed as localhost.

Server and Dapr connection

VariableDefaultDescription
DAPR_GRPC_PORT50001Port of the Dapr sidecar’s gRPC API on 127.0.0.1. dapr run and the Kubernetes sidecar injector set this for you.
DAPR_GRPC_ENDPOINTNot setFull address of the sidecar’s gRPC API. Takes precedence over DAPR_GRPC_PORT.
DAPR_API_TOKENNot setToken sent to the sidecar when it requires API token authentication.
DAPR_CLIENT_TIMEOUT_SECONDS5Timeout for each attempt to connect to the sidecar. The server makes up to five attempts, two seconds apart, then exits.
DAPR_MCP_SERVER_LOG_LEVELinfoLog level: debug, info, warn, or error. Logs are JSON on stderr. At debug, request headers are logged with credential headers redacted.

The DAPR_* connection variables are read by the Dapr Go SDK that the server uses.

HTTP transport

These settings apply only when the server runs with --http.

VariableDefaultDescription
DAPR_MCP_CORS_ORIGINNot setOrigin allowed to call the server from a browser, for example https://app.example.com. When set, the server adds CORS headers to every response and answers OPTIONS preflight requests. When not set, no CORS headers are sent and browsers on other origins are refused. Set it only for a browser-based MCP client on another origin.

The server always serves /livez, /readyz, and /startupz without authentication; see Health endpoints. MCP requests are served on every other path, so http://<host>:<port>/ is the MCP endpoint. The one exception is /dapr/subscribe, which returns an empty subscription list for the Dapr sidecar and also needs no authentication.

Authentication

Authentication applies to the HTTP transport. See Authentication for how the modes work and for examples.

VariableDefaultDescription
AUTH_MODENot set (disabled)oidc, spiffe, dapr-sentry, or hybrid turns authentication on. Not set, or disabled, turns it off.
OIDC_ENABLEDfalseIn hybrid mode, accept OIDC tokens. Ignored in other modes.
OIDC_ISSUER_URLNot setOIDC issuer URL. Required when OIDC is on.
OIDC_CLIENT_IDNot setExpected aud claim. Required when OIDC is on.
OIDC_ALLOWED_ALGORITHMSRS256,ES256Comma-separated signing algorithms to accept.
OIDC_SKIP_ISSUER_CHECKfalseSkip the iss check. For development only.
SPIFFE_ENABLEDfalseIn hybrid mode, accept SPIFFE JWT-SVIDs. Ignored in other modes.
SPIFFE_TRUST_DOMAINNot setTrust domain that callers must belong to. Required when SPIFFE is on.
SPIFFE_SERVER_IDNot setThis server’s SPIFFE ID, which callers’ JWT-SVIDs must use as their audience. Required when SPIFFE is on.
SPIFFE_ENDPOINT_SOCKETNot setAddress of the SPIFFE Workload API, for example unix:///run/spire/sockets/agent.sock.
SPIFFE_ALLOWED_CLIENTSNot set (any workload in the trust domain)Comma-separated SPIFFE IDs allowed to call the server.
DAPR_SENTRY_ENABLEDfalseIn hybrid mode, accept Dapr Sentry JWTs. Ignored in other modes.
DAPR_SENTRY_JWKS_URLNot setURL of the Sentry JWKS. Required when Dapr Sentry is on.
DAPR_SENTRY_TRUST_DOMAINNot setTrust domain of the SPIFFE ID in the token’s sub claim. Required when Dapr Sentry is on.
DAPR_SENTRY_AUDIENCENot setExpected aud claim. Required when Dapr Sentry is on.
DAPR_SENTRY_ISSUERNot setExpected iss claim. Checked only when set.
DAPR_SENTRY_TOKEN_HEADERAuthorizationHeader to read the token from. Despite its name, it applies in every auth mode, not only Dapr Sentry. A custom header carries the raw token, without a Bearer prefix.
DAPR_SENTRY_JWKS_REFRESH_INTERVAL5mHow often to refresh the JWKS, as a Go duration. Minimum 30s.

Telemetry

Telemetry is off until an OTLP endpoint is set. See Observability for what the server emits.

VariableDefaultDescription
OTEL_EXPORTER_OTLP_ENDPOINTNot setOTLP collector endpoint for all signals, for example http://otel-collector:4317. An endpoint without a scheme uses TLS.
OTEL_EXPORTER_OTLP_PROTOCOLgrpcgrpc or http/protobuf. http/json falls back to http/protobuf.
OTEL_EXPORTER_OTLP_INSECUREfalseUse plaintext for an endpoint given without a scheme. An explicit http:// or https:// scheme always wins.
OTEL_EXPORTER_OTLP_HEADERSNot setComma-separated key=value headers sent with every export, such as an API key. Values are percent-decoded.
OTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_ENDPOINTNot setPer-signal endpoint, overriding the generic one. For HTTP, used as given unless it has no path, in which case /v1/traces, /v1/metrics, or /v1/logs is added.
OTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_PROTOCOLGeneric valuePer-signal protocol.
OTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_INSECUREGeneric valuePer-signal plaintext setting.
OTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_HEADERSNot setPer-signal headers, merged over the generic ones.
OTEL_SERVICE_NAMEdapr-mcp-serverservice.name resource attribute.
OTEL_SERVICE_VERSIONBinary versionservice.version resource attribute.
OTEL_METRIC_EXPORT_INTERVAL10000Metric export interval in milliseconds. Go durations such as 30s are also accepted.
OTEL_LOG_EXPORT_INTERVAL5000Log export interval in milliseconds. Go durations are also accepted.
DAPR_MCP_SERVER_METRICS_ENABLEDtrueSet to false to stop exporting metrics while keeping traces.
DAPR_MCP_SERVER_LOGS_OTEL_ENABLEDtrueSet to false to stop exporting logs over OTLP. Logs are still written to stderr.