This guide covers common errors you may encounter when setting up or using the Aembit Model Context Protocol (MCP) Authorization Server.
Quick reference
Section titled “Quick reference”| Error | Jump to |
|---|---|
redirect_uri mismatch | Redirect URI mismatch |
Protected resource does not match | Resource URL mismatch |
No Identity Providers Available | No identity providers available |
scope is required | Missing scope parameter |
Backend debug proxy error | MCPJam backend proxy error |
invalid_client_metadata | Client registration failures |
code_verifier doesn't match | Proof Key for Code Exchange (PKCE) validation failures |
No matching Access Policy found | Access Policy not found |
Token exchange failed | Token exchange failures |
JWT signature verification failed | Key authentication failures |
Required SAML attribute not found | SAML attribute mapping errors |
Failed to parse SAML metadata | SAML metadata errors |
URL mismatch errors
Section titled “URL mismatch errors”URL mismatches are among the most common configuration issues. Three URLs must align for the MCP authorization flow to succeed.
Redirect URI mismatch
Section titled “Redirect URI mismatch”Error:
Error: redirect_uri mismatchCause: The redirect URI registered in your Aembit 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 doesn’t match the callback URL your MCP client uses.
Resolution:
- Check your Client Workload configuration in Aembit
- Verify the redirect URI matches your MCP client’s callback URL exactly
- For local development, ensure you’re consistent with
localhostvs127.0.0.1
Resource URL mismatch
Section titled “Resource URL mismatch”Error:
Error: Protected resource http://server-a:8080/mcp does not match expected http://server-b:8080/mcp (or origin)Cause: The URL your MCP client connects to doesn’t match the resource server URL configured in your MCP server.
Resolution:
- Check your MCP server’s resource server URL configuration
- Ensure your MCP client connects to the exact same URL
- See URL configuration alignment for details
No identity providers available
Section titled “No identity providers available”Error:
No Identity Providers AvailableCause: The 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 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 doesn’t have an associated identity provider configured.
Resolution:
- Verify your Access Policy includes a Trust Provider
- Ensure the Trust Provider is an OIDC ID Token Trust Provider
- Confirm the Trust Provider has an identity provider (IdP) linked to it
- Check that the IdP is correctly configured with your OIDC provider (Azure AD, Okta, Google, etc.)
Missing scope parameter
Section titled “Missing scope parameter”Error:
{"StatusCode":400,"Error":"scope is required","Custom":{}}Cause: The MCP client didn’t send a scope parameter during the OAuth flow.
This typically indicates a Trust Provider configuration issue.
Resolution:
- Verify you configured a Trust Provider and added it to your Access Policy
- Check that you correctly configured the Trust Provider for OIDC ID Token authentication
- Ensure the Trust Provider’s IdP settings match your identity provider
MCPJam backend proxy error
Section titled “MCPJam backend proxy error”Error:
Backend debug proxy error: 500 Internal Server ErrorCause: MCPJam uses a backend proxy server to fetch OAuth metadata. If your MCP server’s firewall only allows specific IP addresses, your firewall blocks MCPJam’s proxy servers.
Resolution:
- Open your firewall to allow MCPJam’s proxy IP ranges
- Or use a different MCP client that performs OAuth entirely in the browser
Dynamic client registration issues
Section titled “Dynamic client registration issues”Client registration failures
Section titled “Client registration failures”Error:
Error: invalid_client_metadataCause: The MCP client’s registration request is missing required fields or contains invalid values.
Resolution:
- Verify your Dynamic Client Registration (DCR) request includes
authorization_codeingrant_types - Verify your DCR request includes
codeinresponse_types - Check that
redirect_uriscontains valid, correctly formatted URLs - Ensure redirect URIs match exactly with your Client Workload configuration
PKCE validation failures
Section titled “PKCE validation failures”Error:
Error: invalid_grant - code_verifier doesn't match code_challengeCause: The PKCE code verifier doesn’t match the code challenge sent during authorization.
Resolution:
- Verify your client generates a proper
code_challengefrom thecode_verifier - Ensure
code_challenge_methodis set toS256 - Check for URL encoding issues in code values
- Confirm the same
code_verifieris used throughout the flow
Policy evaluation errors
Section titled “Policy evaluation errors”Access Policy not found
Section titled “Access Policy not found”Error:
Error: No matching Access Policy foundCause: No Access Policy matches the combination of Client Workload (redirect URI) and Server Workload for this request.
Resolution:
- Verify you have an Access Policy that connects your Client Workload to your Server Workload
- Check that the redirect URI in your Client Workload matches the MCP client’s registered redirect URI
- Confirm the Server Workload’s host, port, and path match your MCP server configuration
- Ensure the Access Policy is active (not turned off)
Token exchange failures
Section titled “Token exchange failures”Error:
Error: Token exchange failedCause: The client failed to exchange the authorization code for an access token.
Resolution:
- Verify the authorization code hasn’t expired (codes are short-lived)
- Check that the
code_verifiermatches thecode_challengefrom the authorization request - Confirm the redirect URI in the token request matches the one used in authorization
- Review the Credential Provider configuration for your Access Policy
Identity provider issues
Section titled “Identity provider issues”Key authentication failures
Section titled “Key authentication failures”Error:
Error: invalid_client - JWT signature verification failedCause: Public/private key mismatch between your identity provider and Aembit configuration.
Resolution:
- Verify the public key uploaded to your IdP matches the private key configured in Aembit
- Check the key format (PEM or JWKS)
- Ensure the key ID (
kid) matches between systems - Test the key pair independently using a JWT library
SAML attribute mapping errors
Section titled “SAML attribute mapping errors”Error:
Error: Required SAML attribute not foundCause: Your SAML Identity Provider isn’t returning the required user attributes in the SAML assertion.
Resolution:
- Verify your SAML Trust Provider configuration includes the correct attribute mappings
- Check your IdP’s attribute release policy to ensure it sends required attributes
- Confirm the attribute names match between your IdP configuration and Aembit Trust Provider
- Test the SAML assertion using your IdP’s testing tools to verify attribute contents
SAML metadata errors
Section titled “SAML metadata errors”Error:
Error: Failed to parse SAML metadataCause: The SAML metadata URL is inaccessible or the metadata format is invalid.
Resolution:
- Verify the metadata URL is accessible from Aembit’s servers
- Check that the metadata XML is valid and well-formed
- If using a metadata file, ensure you exported it correctly from your IdP
- Verify your IdP’s signing certificate hasn’t expired