Skip to content

This reference documents the configuration options, endpoints, and error codes for the Aembit Model Context Protocol (MCP) Authorization Server.

MCP servers require specific configuration to work with Aembit’s MCP Authorization Server. Most settings are standard OAuth concepts from the MCP specification—the exact field names vary by MCP server implementation.

ConceptPurposeAembit valueRequired by
Authorization Server URLWhere MCP clients discover OAuth endpointshttps://[tenant].mcp.[region].aembit.ioMCP spec
Resource Server URLIdentifies your MCP server for token audience matchingYour MCP server’s public URLMCP spec
JWKS EndpointPublic keys used for token signature verificationhttps://[tenant].mcp.[region].aembit.io/.well-known/openid-configuration/jwksRFC 8414
Token IssuerOIDC issuer URL of token validationhttps://[tenant].id.[region].aembit.io (note: .id. subdomain)RFC 8414
Token AudienceExpected audience claim in issued tokensMust match your Credential Provider configurationRFC 8707
Signing AlgorithmAlgorithm for token signaturesES256 (default) or RSAAembit

MCP servers must specify their Authorization Server so unauthenticated clients know where to authenticate. The configuration method varies by implementation.

Example (generic JSON configuration):

{
"authorization_servers": ["https://[tenant].mcp.[region].aembit.io"],
"resource_url": "http://localhost:8000",
"token_issuer": "https://[tenant].id.[region].aembit.io",
"token_audience": "http://localhost:8000"
}

For environment variable-based configuration, see the MCP server environment variables reference.

MCP clients like Gemini CLI discover authorization servers dynamically. Configure the MCP server endpoint in the client configuration:

{
"mcpServers": {
"TestMCPServer": {
"httpUrl": "http://localhost:8000/mcp"
}
}
}

The client handles all discovery and registration steps automatically when it encounters a 401 response from the MCP server.

Aembit uses different subdomains for different services. When configuring your MCP server, use the correct subdomain for each service.

ServiceURL patternExample
MCP Auth Serverhttps://[tenant].mcp.[region].aembit.iohttps://abc123.mcp.useast2.aembit.io
Token Issuerhttps://[tenant].id.[region].aembit.iohttps://abc123.id.useast2.aembit.io
JWKShttps://[tenant].mcp.[region].aembit.io/.well-known/openid-configuration/jwkshttps://abc123.mcp.useast2.aembit.io/.well-known/openid-configuration/jwks

Replace [tenant] with your Aembit tenant ID and [region] with your deployment region (for example, useast2).

EndpointMethodDescription
/.well-known/openid-configurationGETOIDC discovery metadata document
<jwks_uri>GETJWKS public keys, as advertised in the discovery document
<registration_endpoint>POSTDynamic Client Registration (DCR)
<authorization_endpoint> (e.g. /authorize)GETOAuth 2.1 authorization endpoint
<token_endpoint> (e.g. /token)POSTOAuth 2.1 token endpoint

All endpoints except /.well-known/openid-configuration are discovered via the metadata document and must not be hard-coded; the preceding examples (/authorize, /token) illustrate typical paths only.

GET /.well-known/oauth-authorization-server

Response:

{
"issuer": "https://[tenant].mcp.[region].aembit.io",
"authorization_endpoint": "https://[tenant].mcp.[region].aembit.io/connect/authorize",
"token_endpoint": "https://[tenant].mcp.[region].aembit.io/connect/token",
"jwks_uri": "https://[tenant].mcp.[region].aembit.io/.well-known/openid-configuration/jwks",
"registration_endpoint": "https://[tenant].mcp.[region].aembit.io/register",
"scopes_supported": ["openid", "profile", "email"],
"response_types_supported": ["code", "token", "id_token", "id_token token", "code id_token", "code token", "code id_token token"],
"response_modes_supported": ["form_post", "query", "fragment"],
"grant_types_supported": ["authorization_code"],
"code_challenge_methods_supported": ["plain", "S256"]
}
GET <resource_metadata_url>

Response:

{
"resource": "http://your-mcp-server:8000/mcp",
"authorization_servers": ["https://[tenant].mcp.[region].aembit.io"]
}

The MCP authorization flow uses these headers:

HeaderDescription
WWW-AuthenticateReturned with 401 responses, contains resource_metadata_url pointing to MCP server metadata

Example 401 response header:

WWW-Authenticate: Bearer resource_metadata_url="http://localhost:8000/mcp"
HeaderDescription
AuthorizationBearer token for authenticated requests to MCP servers

Example authenticated request:

Authorization: Bearer <access_token>

The following table contains common HTTP status codes returned by the MCP Authorization Server (this isn’t an exhaustive list):

CodeDescription
400Invalid request (malformed parameters or missing required fields)
401Unauthorized (authentication failed)
403Forbidden (Access Policy mismatch)
404Not found (endpoint or resource doesn’t exist)
429Too many requests (rate limit exceeded)
500Internal server error
  • OpenID Connect (OIDC) providers with multi-factor authentication support
  • SAML 2.0 Identity Providers

For guidance on choosing between OIDC and SAML, see MCP Authorization Server overview.

Client Workload: Client Workloads represent software applications, scripts, or automated processes that initiate access requests to Server Workloads, operating autonomously without direct user interaction.Learn more use the Redirect URI identifier type. Aembit’s MCP Authorization Server supports dynamic client registration, allowing clients to register at runtime.

Server Workload: Server Workloads represent target services, APIs, databases, or applications that receive and respond to access requests from Client Workloads.Learn more use the MCP application protocol.

  • OIDC ID Token Trust Provider: Trust Providers validate Client Workload identities through workload attestation, verifying identity claims from the workload's runtime environment rather than relying on pre-shared secrets.Learn more

SAML Trust Provider support isn’t available yet. When using a SAML identity provider, Aembit skips Trust Provider validation, but a Credential Provider is still required to generate access tokens.

Aembit’s MCP Authorization Server supports Dynamic Client Registration (DCR) as defined in RFC 7591, allowing MCP clients to register automatically without pre-configuration.

When implementing DCR in your MCP client:

RequirementValue
Grant Typeauthorization_code (required)
Response Typecode (required)
Authentication Methodprivate_key_jwt (recommended)
Proof Key for Code Exchange (PKCE)Required per MCP specification
  • Automatic registration: Clients can self-register on first connection
  • Standards compliance: Follows RFC 7591 Dynamic Client Registration specification
  • Unique credentials: Each client receives a unique client_id
  • Redirect URI matching: Exact match required (port ignored for localhost per MCP spec)

Ensure your MCP client library supports DCR. The client must:

  1. Discover the registration_endpoint from the OAuth/OIDC metadata document (exposed at /.well-known/openid-configuration)
  2. Send a POST request with redirect_uris, grant_types, and response_types
  3. Store the returned client_id for subsequent requests
  4. Include PKCE (code_challenge and code_challenge_method) in authorization requests

Aembit’s MCP Authorization Server issues standard OAuth 2.1 JWT access tokens for use with MCP resource servers.

MCP resource servers validate access tokens using standard OAuth practices:

Validation StepDescription
Signature verificationVerify using the Authorization Server’s public key from JWKS endpoint
Issuer (iss)Confirm matches your expected Authorization Server (uses .id. subdomain)
Audience (aud)Confirm matches your resource server URL
Expiration (exp)Confirm token hasn’t expired
ScopeConfirm token includes required scopes for the request

Tokens issued by the MCP Authorization Server include these standard claims:

ClaimDescription
issToken issuer - your Aembit tenant’s .id. subdomain
audIntended audience - your MCP resource server URL
subAuthenticated user identifier from the identity provider
scopeAuthorized scopes for the request
expToken expiration timestamp
iatToken issuance timestamp

Token validation keys are available at:

https://[tenant].mcp.[region].aembit.io/.well-known/openid-configuration/jwks

Resource servers should cache JWKS responses and refresh periodically per standard OAuth practices. Resource servers should obtain this from the jwks_uri field in the discovery document.

MCP servers validate tokens using these configurable claims:

  • aud (audience)
  • iss (issuer)
  • sub (subject)

Token lifetime is configurable on the MCP server side.

Aembit supports two signing algorithms for access tokens:

  • ES256 - ECDSA with P-256 and SHA-256
  • RSA - RSA signatures

Configure your MCP server’s JWT verifier to match the algorithm in your Credential Provider settings:

token_verifier = JWTVerifier(
# ... other configuration
algorithm="ES256", # or "RS256" if using RSA
)

For local IP addresses (such as localhost or 127.0.0.1) in redirect URIs, the MCP Authorization Server ignores the port during Access Policy: Access Policies define, enforce, and audit access between Client and Server Workloads by cryptographically verifying workload identity and contextual factors rather than relying on static secrets.Learn more matching. This behavior follows the MCP specification.

Typically, you’ll see an IdP selection screen (if you configure multiple IdPs) and, in error cases, an error screen. The rest of the flow is automatic from the MCP client’s perspective. All other steps occur automatically.

For details on the user experience and IdP selection with multiple identity providers, see MCP Authorization Server overview.

The access token issued by the MCP Authorization Server protects all API requests to the MCP server.

Aembit’s MCP Authorization Server uses the same observability and audit pipeline as the rest of Aembit Cloud. It doesn’t expose a separate logging API or custom metrics surface.

MCP-related activity appears in existing Aembit observability features as:

  • Workload Events - show authentication and authorization activity for MCP client and server workloads.
  • Access Policy evaluations - including Access Condition failures that block MCP requests.
  • Credential Provider usage - token issuance and validation behavior associated with MCP flows.

You can view and export this data using Aembit’s standard tools:

  • Admin Dashboard - for interactive inspection and high-level trends.
  • Log Streams - for exporting detailed event and audit data to external systems (for example, SIEM or object storage).

Aembit records and surfaces MCP Authorization Server traffic like other Aembit workload activity.