Security¶
Contio's hosted MCP gateway and User API are designed so your credentials stay yours. The gateway is a thin transport layer: it authenticates, forwards, and traces requests, but it does not store or mint tokens.
Authentication¶
The User API and MCP gateway support three first-party credential types:
- OAuth 2.1 + PKCE — access tokens (
cto_at_v1_...) and rotating refresh tokens (cto_rt_v1_...) for interactive apps and agents. - Personal Access Tokens — long-lived tokens (
cto_pat_v1_...) for scripts and unattended automation. - Short-lived access tokens — temporary tokens (
cto_slt_v1_...) for quick scripts, experimentation, and ad hoc automation. Available on all plans.
All tokens are bearer credentials sent in the Authorization header. The browser session JWT is intentionally not accepted on the /v1 resource surface.
Credential handling in the MCP gateway¶
The public MCP gateway does not store, mint, or persist your tokens.
- Tokens are forwarded to the upstream Contio API unchanged.
- The gateway hashes tokens with SHA-256 before using them as cache keys; the raw token is never kept in cache.
- Logs redact the bearer value. Only the token type and request metadata are logged.
- Session state contains only a hashed reference, not the plaintext credential.
- The
Authorizationheader is required on every request to the MCP endpoint.
Authorization and workspace isolation¶
Every request is made on behalf of an authenticated principal:
- Workspace role and scopes are resolved from the token.
- Admin tools are only exposed to workspace owners, admins, or tokens with
workspace:write. - The gateway builds a separate
McpServerper session, scoped to the calling principal's visibility. - Plan-based gates are enforced upstream by the Contio API.
Transport and discovery¶
- All traffic uses TLS.
- The MCP endpoint speaks MCP 2024-11-05
streamable-http. - OAuth discovery endpoints follow RFC 8414 (
/.well-known/oauth-authorization-server) and OAuth Resource Indicators (/.well-known/oauth-protected-resource).
Observability and tracing¶
- Every request is assigned or sanitized an
X-Request-IDand that same ID is propagated to the Contio API for end-to-end tracing. - The
X-Contio-Source: mcp-publicheader identifies public MCP traffic so the API can apply the correct plan and rate-limit policies. - Structured JSON logging records method, path, status, duration, and user agent, with credentials redacted.
Operational controls¶
- The gateway validates its runtime configuration at startup and fails fast on misconfiguration.
trust proxyis restricted to loopback, link-local, and unique-local ranges.- Session state expires after 30 minutes of inactivity and is cleaned up on a one-minute interval.
Reporting issues¶
If you discover a security issue, email support@contio.ai. Please do not post security concerns in public forums.