Skip to content

Configure your Aembit Tenant: Aembit Tenants serve as isolated, dedicated environments within Aembit that provide complete separation of administrative domains and security configurations.Learn more for MCP Identity Gateway, which Aembit operates as a managed service for Model Context Protocol: A standard protocol for AI agent and server interactions that defines how AI assistants communicate with external tools and data sources.Learn more(opens in new tab) traffic.

Before you begin, ensure you have:

  • An Aembit Tenant with administrator access
  • A provisioned MCP Identity Gateway endpoint for your Aembit Tenant (https://<tenant-id>.mcpgateway.aembit.io). If you do not have one yet, contact your Aembit representative.
  • An identity provider (Okta, Google, Microsoft Entra ID, or similar) for user authentication
  • The OAuth redirect URLs of the MCP Client: An application (such as Claude Desktop, Claude Code, or Gemini CLI) that connects to MCP servers to access tools and resources on behalf of users.Learn more (AI agents) you plan to connect
  • The hostname and OAuth or API key configuration for each MCP Server: A server that implements the Model Context Protocol to provide tools, resources, or data to AI agents and MCP clients.Learn more(opens in new tab) you plan to proxy

Request your MCP Identity Gateway endpoint

Section titled “Request your MCP Identity Gateway endpoint”

Aembit operates MCP Identity Gateway as a managed service. Each Aembit Tenant has its own MCP Identity Gateway endpoint at https://<tenant-id>.mcpgateway.aembit.io (replace <tenant-id> with your Aembit Tenant ID, visible in your Aembit Tenant URL, for example, abc123 in https://abc123.aembit.io).

To get started, contact your Aembit representative to provision an MCP Identity Gateway endpoint for your Aembit Tenant. Aembit handles provisioning, TLS termination, certificate management, and runtime operations.

After Aembit provisions the endpoint, note the MCP Identity Gateway hostname. You reference it later in this guide when configuring the Server Workload and Credential Provider for the client-to-Gateway Access Policy.

Connect Aembit to your enterprise Identity Provider (IdP) to authenticate the humans behind MCP clients.

Unlike typical Aembit workload-to-workload scenarios, MCP requests involve two identities:

  • MCP client identity (workload) - The AI agent or application making the request, identified by its redirect URL.
  • User identity (human) - The person using the AI agent, identified by claims from your IdP (such as email address).

MCP Identity Gateway needs both: it validates which MCP client is connecting and who is using it. An MCP User-Based or Enterprise Managed Access Token Credential Provider then ties each user’s MCP server access to their own authorization.

In this model, you configure identity once at the Aembit Tenant level. Many users can share the same set of Access Policies, while per-user credentials from an MCP User-Based or Enterprise Managed Access Token Credential Provider isolate their individual access.

In your Aembit Tenant, go to Administration -> Identity Providers and configure your IdP using OIDC or SAML. The MCP Enterprise Managed Access Token Credential Provider requires an OIDC Identity Provider with the offline_access scope. See Prepare the Identity Provider for enterprise-managed access.

Create the client-to-gateway Access Policy

Section titled “Create the client-to-gateway Access Policy”

MCP Identity Gateway requires two Access Policies to function: one for the client-to-Gateway connection and one for the Gateway-to-server connection. You must create both Access Policies for MCP Identity Gateway to work.

Two Access Policies required for the MCP Identity Gateway: client-to-Gateway and Gateway-to-server

The first Access Policy governs which MCP clients and users can connect to MCP Identity Gateway. For step-by-step instructions on using the Access Policy Builder interface, see Create an Access Policy.

  1. While still in your Aembit Tenant, go to Access Policies and click + New.
  2. In the Name field, enter a name (for example, MCP Client to Gateway).

Create a Client Workload: Client Workloads represent AI agents, software applications, scripts, or automated processes that initiate access requests to Server Workloads. They can act on behalf of a user under blended identity or operate autonomously, as when one service calls another.Learn more that represents the MCP client connecting to MCP Identity Gateway.

  1. In the Client Workload card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Client Workload with the following settings:

    FieldValue
    NameA descriptive name (for example, Claude MCP Client)
    Client IdentificationSelect Redirect URL
    ValueThe MCP client’s OAuth callback URL (for example, https://claude.ai/api/mcp/auth_callback)
  4. Click Save.

The Redirect URL identifies which MCP client application is requesting access. Each MCP client (Claude, Gemini, etc.) has its own callback URL. See Client Workloads for additional configuration options.

Create a Server Workload: Server Workloads represent target services, APIs, databases, or applications that receive and respond to access requests from Client Workloads.Learn more that represents the MCP Identity Gateway endpoint.

  1. In the Server Workload card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Server Workload with the following settings:

    FieldValue
    NameA descriptive name (for example, MCP Identity Gateway)
    HostMCP Identity Gateway’s hostname for your Aembit Tenant (for example, <tenant-id>.mcpgateway.aembit.io)
    Application ProtocolSelect MCP
    Port443
    TLSEnabled
    URL Path/mcp
  4. Click Save.

See Server Workloads for additional configuration options.

Create a Trust Provider: Trust Providers verify identity claims from a workload's runtime environment or an Identity Provider instead of relying on pre-shared secrets. They support workload attestation and user identity validation for blended identity.Learn more that validates user tokens from your enterprise IdP.

  1. In the Trust Provider card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Trust Provider with the following settings:

    FieldValue
    NameA descriptive name (for example, Okta User Tokens)
    Trust ProviderSelect OIDC ID Token
    OIDC Discovery URLYour IdP’s discovery endpoint (for example, https://your-org.okta.com)
    Match RulesConfigure issuer validation
  4. Configure Match Rules to validate identity token claims:

    • Issuer (iss) - Your IdP’s URL (for example, https://your-org.okta.com). This must match the OIDC Discovery URL.
    • Audience (aud) - (Optional) The intended recipient identifier.
    • Subject (sub) - (Optional) User identifier pattern to match.
  5. Click Save.

Find your IdP’s OIDC discovery URL in your identity provider’s administrator console. Enter only the base URL (for example, https://your-org.okta.com). Aembit automatically appends /.well-known/openid-configuration to discover the provider’s configuration. See Trust Providers for additional configuration options.

Create a Credential Provider: Credential Providers obtain the specific access credentials—such as API keys, OAuth tokens, or temporary cloud credentials—that Client Workloads need to authenticate to Server Workloads.Learn more that issues tokens for MCP clients to authenticate to MCP Identity Gateway.

  1. In the Credential Provider card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Credential Provider with the following settings:

    FieldValue
    NameA descriptive name (for example, Gateway Access Token)
    Credential TypeSelect OIDC ID Token
    SubjectSelect Dynamic from the dropdown, then enter ${oidc.identityToken.decode.payload.<user-claim>} (see the following tip)
    AudienceThe MCP Identity Gateway URL (for example, https://mcp-gateway.example.com/); a trailing slash is optional
    Signing Algorithm TypeRS256 (recommended) or ES256
  4. Click Save.

The token contains the authenticated user’s identity (for example, an email claim) and targets only MCP Identity Gateway. See Credential Providers for additional configuration options.

  1. In the Access Policy status card on the left, verify each required component shows a green Configured status.
  2. In the header, click Save Policy & Activate.

Create the gateway-to-server Access Policy

Section titled “Create the gateway-to-server Access Policy”

The second Access Policy governs MCP Identity Gateway’s access to each MCP server.

  1. While still in your Aembit Tenant, go to Access Policies and click + New.
  2. In the Name field, enter a name (for example, Gateway to Finance MCP Server).

Create a Client Workload that represents MCP Identity Gateway as a client.

  1. In the Client Workload card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Client Workload with the following settings:

    FieldValue
    NameA descriptive name (for example, MCP Identity Gateway)
    Client IdentificationSelect OIDC ID Token Audience
    ValueThe same value as the Credential Provider’s Audience (for example, https://mcp-gateway.example.com/)

    This value must match the Audience of the Client-to-Gateway Access Policy’s Credential Provider exactly, including whether it ends in a trailing slash. Aembit matches this value against the token’s audience to recognize MCP Identity Gateway as the authenticated caller.

  4. Click Save.

MCP Identity Gateway acts as the client when accessing MCP servers. See Client Workloads for additional configuration options.

Create a Server Workload for each downstream MCP server.

  1. In the Server Workload card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Server Workload with the following settings:

    FieldValue
    NameA descriptive name (for example, Finance MCP Server)
    HostThe MCP server’s hostname (for example, mcp.example.com)
    Application ProtocolSelect MCP
    PortTypically 443 with TLS enabled
    URL PathThe MCP endpoint path (for example, /integrations/mcp)
    Authentication MethodAembit preselects HTTP Authentication. Change it to the method the MCP server expects
    Authentication SchemeAembit preselects Bearer. Change it to the scheme the MCP server expects
  4. Click Save.

Find the hostname, path, and port in your MCP server vendor’s documentation. See Server Workloads for additional configuration options.

Create a Trust Provider that validates Aembit-issued tokens.

  1. In the Trust Provider card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Trust Provider with the following settings:

    FieldValue
    NameA descriptive name (for example, Aembit MCP Tokens)
    Trust ProviderSelect OIDC ID Token
    OIDC Discovery URLYour Aembit Tenant’s base URL (for example, https://<tenant-id>.aembit.io)
  4. Configure Match Rules to validate Aembit-issued tokens:

    • Audience (aud) - MCP Identity Gateway’s identifier (for example, gateway).
    • Issuer (iss) - (Optional) Your Aembit Tenant URL (for example, https://<tenant-id>.aembit.io). If you configure this, this must match the OIDC Discovery URL.
  5. Click Save.

See Trust Providers for additional configuration options, including how to locate your Aembit Tenant’s OIDC discovery URL.

Create a Credential Provider that retrieves credentials for the MCP server. An MCP server that accepts only a static API key, such as the self-hosted CrowdStrike Falcon MCP server, uses an API Key Credential Provider. Its Server Workload sets Authentication Method to API Key and Authentication Scheme to Header. Every user shares that one key, so the Credential Provider does not enforce per-user access. For an MCP server that uses OAuth, MCP Identity Gateway supports the following Credential Provider types for this Access Policy, depending on how the MCP server issues credentials.

MCP User-Based Access TokenMCP Enterprise Managed Access TokenOAuth 2.0 Authorization Code
Token storagePer user. Aembit stores and refreshes each user’s tokens individually.Per user. Aembit stores each user’s SSO identity at sign-in and caches the exchanged MCP server token for up to five minutes.Per Credential Provider. One set of tokens, shared across all users.
Authorization flowEach user completes their own OAuth consent flow on first access through MCP Identity Gateway.None for the user. The corporate identity provider authorizes the exchange, and no consent prompt appears.An administrator clicks Authorize in the Aembit UI during setup.
Best forSaaS MCP servers that issue credentials scoped to individual users (most common).MCP servers that support Enterprise-Managed Authorization: An MCP authorization flow in which the corporate identity provider decides which users and AI agents can reach an MCP server, and a trusted party exchanges the user's single sign-on identity for an MCP server access token without a per-user consent prompt.Learn more, with an OIDC Identity Provider that supports token exchange. Okta is the only one Aembit has verified.MCP servers that accept a shared service account or administrator-authorized token.
DiscoveryMCP Server URL field with Discover auto-populates OAuth endpoints from server metadata.MCP Server URL field with Discover fills the OAuth endpoints and the Client ID from server metadata.OAuth URL field with URL Discovery auto-populates endpoints.

Most SaaS MCP servers require per-user credentials. Use MCP User-Based Access Token unless the MCP server explicitly accepts shared credentials. When the MCP server and your OIDC Identity Provider both support Enterprise-Managed Authorization, use MCP Enterprise Managed Access Token instead, so users never see a consent prompt.

  1. In the Credential Provider card in the right panel, click + Configure.

  2. Select the Add New tab.

  3. Configure the Credential Provider with the following settings:

    FieldValue
    NameA descriptive name (for example, Finance MCP User Token)
    Credential TypeSelect MCP User-Based Access Token
    MCP Server URLThe MCP server’s base URL (for example, https://mcp.example.com/mcp)
  4. Click Discover to auto-populate the Authorization URL, Token URL, and Scopes from the MCP server’s metadata.

    If the MCP server does not support discovery, enter the Authorization URL and Token URL manually using values from the MCP server vendor’s documentation.

  5. Enter the remaining OAuth client settings:

    FieldValue
    Client IDYour OAuth client ID for the MCP server
    Client SecretThe OAuth client secret, if required
    ScopesRequired scopes, which Discover might fill
    PKCE RequiredEnable if the MCP server requires Proof Key for Code Exchange (PKCE)
  6. Click Save.

For more information, see:

Access Conditions Optional

Section titled “Access Conditions ”

Use Access Condition: Access Conditions add dynamic, context-aware constraints to authorization by evaluating circumstances like time, location, or security posture to determine whether to grant access.Learn more to add contextual restrictions to the Access Policy. MCP Identity Gateway supports time-based and GeoIP-based conditions for MCP traffic.

To add Access Conditions, click + Configure in the Access Conditions card in the right panel. Then configure each condition. See Access Conditions for available condition types and configuration options.

Adding a Content Security: Content Security Providers govern the MCP tool traffic flowing through Aembit's MCP Identity Gateway. You add a provider to the Content Security component of an Access Policy.Learn more to this Access Policy makes MCP Identity Gateway apply that provider’s decision to each MCP tool message the Access Policy matches.

To add Content Security, in the Content Security card in the right panel, click + Configure. Then select an existing Content Security Provider or create a new one. See Add CrowdStrike AIDR to a policy for the full configuration steps.

For how inspection works in MCP Identity Gateway’s request path, see Content Security in MCP Identity Gateway.

  1. In the Access Policy status card on the left, verify each required component shows a green Configured status.
  2. In the header, click Save Policy & Activate.

When MCP Identity Gateway connects to the Aembit control plane, it automatically discovers which MCP servers are available based on the Access Policies that apply to it. This policy-driven discovery means you can add or remove MCP servers by updating your Aembit configuration without modifying MCP Identity Gateway itself.

For MCP servers that require user authorization (for example, via OAuth 2.0 flows), the first access triggers a consent flow:

  1. When a user first attempts to access a given MCP server via MCP Identity Gateway, Aembit detects that no credentials exist for that user and MCP server.
  2. Aembit starts an OAuth 2.0 authorization flow and directs the user to authenticate with your IdP and approve the MCP integration (for example, by opening a browser flow).
  3. After the user completes the flow, Aembit obtains credentials from the MCP server’s authorization infrastructure and associates those credentials with that user and MCP server.

Subsequent access for that user and server proceeds without repeated consent, subject to token expiration and revocation policies.

An application that uses embedded user authorization collects the person’s consent during its own flow, before its first request for that person through MCP Identity Gateway.

This consent flow applies to MCP User-Based Access Token. With MCP Enterprise Managed Access Token no consent flow runs, because Aembit exchanges the user’s SSO identity for the token.

After configuration is complete, verify the end-to-end flow:

  1. Verify the MCP Identity Gateway endpoint is reachable from a client host:

    Terminal window
    curl -I "https://<tenant-id>.mcpgateway.aembit.io/"

    Expected: TLS handshake succeeds (you get an HTTP response, possibly an error because this is not a valid MCP request). If this fails, check DNS resolution and confirm with your Aembit representative that the MCP Identity Gateway endpoint is active.

  2. Confirm the user can authenticate via the IdP and that MCP Identity Gateway receives a valid token. Use your MCP client to initiate a connection. The IdP / consent flow appears in the user’s browser.

    If this fails, check the Trust Provider configuration in Aembit and verify the IdP endpoints are correct.

  3. Verify MCP Identity Gateway can evaluate Access Policies and that permitted requests succeed. After authentication, the MCP client can list tools or resources.

    If this fails, check the Access Policy configuration in Aembit. Ensure both Client-to-Gateway and Gateway-to-Server Access Policies are active.

  4. Review MCP activity in Aembit Cloud:

    • Workload events - Check mcp.request and mcp.response events in Aembit Cloud for authentication, Access Policy evaluation, and MCP request handling. See Audit and report on Workload activity.
    • Log Streams - Forward workload events to your SIEM or observability tooling via Log Streams.

    If you need access to MCP Identity Gateway runtime logs (operated by Aembit), contact your Aembit representative.

Relationship to the MCP Authorization Server

Section titled “Relationship to the MCP Authorization Server”

MCP Identity Gateway uses Aembit’s existing authorization capabilities behind the scenes to:

  • Authenticate users via your configured Identity Provider (IdP),
  • Evaluate Aembit Access Policies, and
  • Orchestrate OAuth 2.0 Authorization Code (3LO) flows to MCP servers.

You do not need to deploy or configure the standalone Aembit MCP Authorization Server product to use MCP Identity Gateway.

  • The public MCP Authorization Server docs (Set up the MCP Authorization Server) describe a separate control-plane deployment where Aembit acts as the official Authorization Server for your MCP servers.
  • When you use MCP Identity Gateway, Aembit Cloud provides those authorization capabilities and wires them into MCP Identity Gateway for you.

To use MCP Identity Gateway, you only configure:

Follow the “Set up the MCP Authorization Server” steps only when you are explicitly using Aembit as a standalone MCP Authorization Server for your own MCP servers.

  1. An administrator configures MCP Identity Gateway and Access Policies in Aembit
  2. A user opens an AI agent (such as Claude), which connects through MCP Identity Gateway
  3. The user queries an MCP server through the AI agent
  4. An auditor reviews logs to see which user and AI agent accessed which MCP server and when