Skip to content

MCP Identity Gateway reference

Operational reference for the Aembit-operated MCP Identity Gateway.

For Tenant-side configuration, see Set up the MCP Identity Gateway.

The tokens and credentials used in each hop have different formats and purposes:

Token / CredentialFormatSource
Agent-to-GatewayAembit-issued access token (typically JWT)Issued by the Aembit Authorization Server after the user authenticates via a configured IdP
Gateway-to-ServerVaries by MCP serverDetermined by the Credential Provider configuration (for example, OAuth 2.0 access token via Authorization Code flow)
  • Agent-to-Gateway tokens - The Aembit Authorization Server issues these tokens after it authenticates the user via an external identity provider (such as Google, Okta, or Microsoft Entra ID). The MCP Gateway validates these tokens using Aembit’s signing keys.
  • Gateway-to-Server credentials - Aembit manages these via Credential Providers. For modern SaaS MCP servers, these are typically OAuth 2.0 access tokens obtained via the Authorization Code (3-legged OAuth) flow. Aembit may support other methods depending on how the MCP server authenticates.
  • Credential caching - The MCP Gateway caches downstream MCP server credentials and configuration in memory to reduce latency. Cached credentials are short-lived and refreshed as needed; the Gateway doesn’t persist them to disk.

The MCP Identity Gateway proxies the following MCP protocol methods to downstream MCP servers. All methods go through the same token validation, policy evaluation, and credential injection flow.

MethodDescription
tools/listDiscovers available tools across all assigned MCP servers. The Gateway adds prefixes to prevent tool name collisions across servers. The response includes tool annotations from upstream servers when those servers send them.
tools/callInvokes a tool on the appropriate MCP server.
MethodDescription
resources/listDiscovers available resources across all assigned MCP servers. The Gateway fans out the request to all servers and aggregates the results.
resources/readRetrieves a specific resource by URI from the appropriate MCP server.

The MCP Identity Gateway uses streamable HTTP transport, not Server-Sent Events (SSE). HTTP GET requests to the /mcp endpoint return 405 Method Not Allowed, per the MCP specification.

MCP clients can end their session with the Gateway by sending an HTTP DELETE request to the /mcp endpoint with the mcp-session-id header set to the session identifier. The Gateway returns 204 No Content on success. Subsequent requests that reuse the deleted session ID return 404 Not Found.

Terminal window
curl -X DELETE "https://<gateway-host>/mcp" \
-H "Authorization: Bearer <token>" \
-H "mcp-session-id: <session-id>"
# Expected: 204 No Content

This behavior implements MCP specification section 2.5.5.

Aembit operates the Gateway endpoint at https://<tenantId>.mcpgateway.aembit.io (replace <tenantId> with your Aembit Tenant ID). For MCP clients to reach the Gateway, the network paths from your AI agent hosts must allow outbound HTTPS on port 443 to this hostname.

SourceDestinationPortPurpose
MCP clients / AI agentshttps://<tenantId>.mcpgateway.aembit.io443MCP requests over TLS
MCP clients / AI agentsYour IdP (Okta, Google, Entra ID, etc.)443User authentication during the initial OAuth flow

MCP clients authenticate using access tokens (JWTs) issued by the Aembit Authorization Server after the user authenticates through your configured IdP. The Gateway validates tokens against the configured Trust Provider and uses streamable HTTP transport for server-to-client streaming.

Aembit manages the Gateway’s outbound paths to the Aembit Cloud control plane, MCP servers, and IdP discovery endpoints, so these don’t require customer configuration.

Because Aembit operates the Gateway, the Aembit operations team manages runtime logs—customers don’t access them directly. For customer-facing visibility into MCP activity, use workload events in Aembit Cloud (see the next section) and forward them via Log Streams to your SIEM or observability tooling.

Workload events in Aembit Cloud: Aembit Cloud serves as both the central control plane and management plane, making authorization decisions, evaluating policies, coordinating credential issuance, and providing administrative interfaces for configuration.Learn more capture access patterns for audit and observability. See Audit and report on Workload activity for details.

When an identity provider authenticates the MCP client, mcp.request and mcp.response workload events include a userId field containing the subject of the user’s OAuth or OIDC access token. This lets you attribute MCP activity to the specific authenticated user in audit reports.

The userId field is absent when Aembit can’t identify the MCP client, such as when client workload identification fails.

The MCP Identity Gateway produces structured JSON logs that help you:

  • Answer “who did what” questions—which user and AI agent accessed which MCP server and tools, and when
  • Trace policy decisions—which policy allowed or denied a given request
  • Monitor behavior—connection patterns and error rates between AI agents and MCP servers

Forward these logs to Log Streams to integrate with your existing observability and Security Information and Event Management (SIEM) tooling.

  • Policy management - Configure access policies through the Aembit Tenant, Terraform provider, or API.
  • Service management - Aembit operates the Gateway as a managed service. The Aembit operations team handles provisioning, upgrades, TLS certificate management, and runtime health.
  • Customer-facing observability - Use workload events in Aembit Cloud and forward via Log Streams for visibility into MCP activity.

To verify your Tenant configuration is working correctly, see Verify the connection in the setup guide.

Aembit operates the MCP Identity Gateway as a managed service. Each Aembit Tenant has a per-Tenant Gateway endpoint at https://<tenantId>.mcpgateway.aembit.io.

  • Aembit provisions, operates, and upgrades the Gateway.
  • Aembit handles TLS termination, certificate management, and runtime operations.
  • Customers configure only Aembit Tenant resources (Identity Provider, Trust Provider, Access Policies, Credential Providers).

To request a Gateway endpoint for your Tenant, contact your Aembit representative.

The Gateway supports both third-party SaaS MCP providers and customer-built MCP servers, subject to compatibility and configuration.

Aembit has validated the Gateway with a small set of MCP servers. Additional MCP servers may work but Aembit considers them best-effort until explicitly documented.

Guarantees:

  • The Identity Gateway authenticates every request before any processing—unauthenticated requests receive 401 immediately and are never forwarded to MCP servers
  • AI agents never receive downstream credentials for MCP servers
  • Centrally managed Aembit policies govern all access
  • Aembit enforces TLS end-to-end: the Gateway terminates TLS at its endpoint and initiates new TLS connections to MCP servers

Non-goals:

  • The Gateway doesn’t replace the MCP server’s internal authorization logic
  • The Gateway doesn’t inspect or filter prompt content beyond what policy evaluation requires