MCP Tunnels

MCP tunnels connect Allternit to externally hosted MCP servers over HTTPS. Each tunnel has a unique token that the MCP server uses to authenticate inbound connections, plus optional mTLS client certificates and OAuth issuer/audience validation enforced by mcp_tunnel_auth.

Base URL

Endpoints

Create a tunnel

Request body

Response

Save the tunnel_token immediately. It can be revealed later, but treat it as a secret.

List tunnels

Response

Update a tunnel

Response

Rotate the tunnel token

Response

Reveal the tunnel token

Response

Delete a tunnel

Response

Authentication policy

Tunnels support three layers of security:
  1. Tunnel token — a shared secret presented by the MCP server.
  2. mTLS client certificateclient_cert_pem can be provided for mutual TLS.
  3. OAuth issuer and audience — JWT bearer tokens from the configured issuer are validated for the given audience.

Error codes

  • Tools / MCP — attaching MCP servers and server-side execution
  • Workspaces — scope tunnels to workspaces