MCP server registration
Each MCP server record includes anauthorizationType field that controls how the Agent API authenticates when registering tools and calling that server. DataParts provide credentials at runtime but do not change the configured authorization type.
authorizationType = none
Meaning: MCP server is callable without authentication. Behavior: No Authorization header or OAuth flow is used. Auth DataParts for this server are ignored. Registration example:authorizationType = inherit
Meaning: Reuse the incoming Agent API bearer token. Behavior: Uses the token from the requestAuthorization header. The API request must include a valid bearer token or the request fails with missing_inherited_token.
DataPart override: If a token DataPart is supplied for this server name, that token is used instead of the inherited token.
Registration example:
authorizationType = bearer
Meaning: MCP server expects a bearer token. Behavior: Uses the token from a matching DataPart (type=token). If the token is missing or invalid, the MCP server typically returns 401 and the task becomesauth-required.
Registration example:
authorizationType = oauth2.0
Meaning: MCP server expects OAuth client credentials. Behavior: Usesclient_id and client_secret from a matching DataPart (type=credentials) and performs a client_credentials flow. Supported for streamable_http transport only; sse is not supported.
Registration example:
Authorization via message DataParts
Authentication is supplied as an A2A DataPart withkind: "data" and the auth payload under data. The following fields are used:
type:tokenorcredentials(case-insensitive)mcp_name: MCP server name as registered (case-sensitive, trimmed)token: required whentype=tokenclient_idandclient_secret: required whentype=credentials
Token example (for authorizationType=bearer or inherit override)
Credentials example (for authorizationType=oauth2.0)
Processing rules and errors
typeis normalized to lowercase; onlytokenandcredentialsare extracted- DataParts do not change the MCP server
authorizationType—make sure the DataPart type matches the server configuration - Unknown or invalid auth DataParts are left in the message as normal parts
mcp_namemust be unique per message; duplicates returnmcp_auth_duplicate_name- Missing fields return:
mcp_auth_missing_namemcp_auth_missing_tokenmcp_auth_missing_credentials
- If
mcp_namedoes not match any configured server, the DataPart is ignored
When DataParts are used
- MCP tools are registered when a new thread is created (the first message). Include auth DataParts on that first message
- Later messages on the same thread do not re-register tools, so auth DataParts will be ignored for MCP registration
- In the API flow, extracted auth DataParts are removed from the message before it is stored or sent to reasoning
Please contact us if you need more information about the Corti Agentic Framework.