Skip to content

MCP Authorization Server reference

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. Configuration methods and field names vary by implementation—your MCP server may use JSON, YAML, environment variables, or other formats. Use the values from the preceding table and consult your MCP server’s documentation for the correct field names.

For step-by-step configuration instructions, see Set up the MCP Authorization Server. For environment variable-based configuration, see the MCP server environment variables reference.

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
ComponentOptions
Identity providersOpenID Connect (OIDC) with MFA support; SAML 2.0
Client Workload identificationRedirect URI; supports dynamic client registration
Server Workload protocolMCP application protocol
Trust ProvidersOIDC ID Token; SAMLv2 Response

When Enforce SSO is off on the Client Workload, no Trust Provider is required. For guidance on choosing between OIDC and SAML, see MCP Authorization Server overview.

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
)