Deployment and configuration

Prepare the database, browser origin, secrets, object storage, and sandbox boundary before making MCPKite available to users.

Production checklist

Core configuration

Compose reads deployment settings from the root .env; the backend reads private settings from backend/.env; browser-visible Vite settings belong in frontend/.env. Never put secrets in frontend variables: Vite embeds VITE_* values into the browser bundle.

VariablePurpose
POSTGRES_PASSWORDDatabase password; replace the local development default.
AUTH_JWT_SECRETPersistent key for signing authentication tokens; use at least 32 bytes.
AUTH_COOKIE_SECURESet to true when serving over HTTPS.
CORS_ALLOWED_ORIGINSComma-separated exact browser origins allowed to make credentialed requests. Do not use a wildcard.
WORKSPACE_SECRET_ENCRYPTION_KEYBase64-encoded 32-byte key for workspace secrets; keep stable and backed up.
VITE_API_BASE_URLBrowser API prefix; defaults to same-origin /api/v1.
VITE_MCP_ENDPOINT_BASE_URLPublic MCP endpoint origin shown and copied by the UI. Set it to the externally reachable origin.
RESOURCE_STORAGE_PROVIDERs3 or azure_blob for binary resources.

When UI and API use different ports, include the UI's exact origin in CORS settings. The frontend uses credentialed requests. Cross-site cookie authentication is not supported.

Resource storage configuration

Choose one provider and keep its bucket or container private.

VariablePurpose
RESOURCE_S3_BUCKETPrivate S3-compatible bucket.
RESOURCE_S3_REGIONBucket region.
RESOURCE_S3_ENDPOINT_URLOptional S3-compatible endpoint; leave empty for Amazon S3.
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEYOptional paired credentials; when unset, the AWS SDK credential chain is used.
RESOURCE_AZURE_CONNECTION_STRINGRequired connection string when Azure Blob is selected.
RESOURCE_AZURE_CONTAINERPrivate Azure Blob container name.

Compose starts S3Mock and Azurite for local development only. For S3, configure the bucket and region; remove or empty the endpoint URL for Amazon S3. For Azure, provide the production connection string and container outside the Compose defaults.

Sandbox limits

All execution and proxy limits are operator settings in the root .env; workspace members cannot change them.

SettingLocal defaultWhat it limits
TOOL_SANDBOX_CPU_LIMIT1CPU quota per sandbox and proxy container.
TOOL_SANDBOX_MEMORY_MIB256Sandbox memory in MiB.
TOOL_SANDBOX_PIDS_LIMIT32Maximum sandbox processes and threads.
TOOL_SANDBOX_TIMEOUT_SECONDS10Maximum duration of a tool call.
TOOL_SANDBOX_TMPFS_MIB32Temporary filesystem size in MiB.
TOOL_SANDBOX_MAX_CONCURRENT_RUNS4Maximum simultaneous tool calls.
TOOL_SANDBOX_QUEUE_TIMEOUT_SECONDS2Maximum time waiting for a runner slot.
TOOL_SANDBOX_MAX_SOURCE_BYTES20000Maximum saved function source size in UTF-8 bytes.
TOOL_SANDBOX_MAX_PARAMETERS64Maximum annotated function parameters.
TOOL_SANDBOX_MAX_INPUT_BYTES65536Maximum serialized arguments per call.
TOOL_SANDBOX_MAX_OUTPUT_BYTES262144Maximum serialized result per call.
TOOL_SANDBOX_PROXY_MAX_CONNECTIONS128Simultaneous proxy connections per invocation.
TOOL_SANDBOX_PROXY_IDLE_TIMEOUT_SECONDS15Proxy DNS, connection, and idle-read timeout.
TOOL_SANDBOX_PROXY_MAX_TUNNEL_BYTES10485760Bytes transferred through one proxy connection.
TOOL_SANDBOX_PROXY_MAX_HEADER_BYTES65536Maximum HTTP proxy request-header size.

Runtime trust boundaries

FastAPI uses one Uvicorn worker because mounted FastMCP apps and lifecycle tasks are process-local. Do not increase the worker count without changing the runtime architecture.

The trusted runner controls Docker and has access to the Docker daemon socket. It is not exposed as a host port and must only be run on a host you trust. Tool code runs in an ephemeral non-root sandbox with no Docker access, host mounts, or deployment credentials. The per-call network includes only the sandbox and its egress proxy; the proxy resolves destinations and rejects non-public IP addresses.

Use HTTPS, strong credentials, private database and storage networks, and carefully scoped access. Never share authenticated Inspector URLs, bearer tokens, workspace secrets, or redacted logs containing credentials.