MCP Gateway
Authenticated entry point for Model Context Protocol traffic.
Component Category
AI tools / MCP traffic gateway
Component Description
The MCP Gateway is the single entry point through which every Model Context Protocol call passes. It authenticates the caller, confirms the target server belongs to their organization, removes the caller's platform credential, applies the server's tool allowlist, and forwards the request over Streamable HTTP. What replaces the removed platform credential is the server's credential mode: the User Credential the caller linked, or no Authorization header at all for a server whose upstream system needs none.
It runs as its own workload with its own address, separate from the BSQAI API. MCP sessions stay open for the life of the client connection, and isolating them keeps long-lived streams from competing with chat traffic.
Managed Servers are run by MCP Lifecycle Operator, which reconciles MCPServer custom resources in the mcp.x-k8s.io/v1alpha1 API group. The BSQAI API records an administrator's intent as a custom resource; the operator creates the workload and reports readiness back. Remote Servers involve no operator because the platform runs nothing for them.
Why It Is Used
In BullSequana AI, MCP Gateway gives an organization one governed surface for tool access. Administrators decide which MCP Servers exist, which of their tools may be called, and how each server reaches the system behind it. Where that system holds accounts, each user authenticates to it with their own credential. No platform token reaches a third-party system, and no user's credential is used on another user's request. An unauthenticated upstream system changes none of the platform-side checks: authentication, organization ownership, permission, and the tool allowlist all still apply.
Learn More
Deployment notes
The Gateway runs as a separate workload in the BSQAI API release. Its internal address carries platform chat and Agent traffic. External MCP clients reach it on its own hostname, by default mcp-gateway.<platform-domain>, separate from the BSQAI API. The BSQAI API advertises that address through gateway_url, as https://mcp-gateway.<platform-domain>/servers/<server-id>/mcp.
The Gateway's route attaches to the HTTPS listener of the platform's shared Gateway, which terminates TLS with the wildcard certificate for the base domain. The hostname needs no certificate of its own. Where the platform manages DNS automatically, it also creates the hostname's DNS record. The route sets no request timeout and no stream idle timeout, because a Streamable HTTP session can remain open, and idle, for the life of the client connection.
User Credentials are encrypted at rest with a deployment-held key derived separately per user and per server. OAuth linking returns the browser to the Portal page /app/mcp/oauth/callback on the Portal's hostname. The platform configures that return address on both the BSQAI API and the Gateway, which uses it to refresh a linked OAuth credential. Without a configured return address, users can link only pasted credentials, and the OAuth linking routes answer mcp_oauth_not_configured. A server registered as unauthenticated stores no User Credential and accepts neither linking route.
See Connect tools with MCP for administration and usage guidance.
Interacts With
BSQAI API, which stores MCP Server records, tool allowlists, and credentials.MCP Lifecycle Operator, which reconciles Managed Server workloads.AI Web Portal, where administrators manage servers and users link credentials.Keycloak, which authenticates the calling user and identifies the active tenant.PostgreSQL, which stores server records, allowlists, and encrypted User Credentials.External MCP clients, which connect to individual server URLs through the public Gateway.