v1
latestOpenAPI 3.0.02026-07-174565114.3 KBAuth
Create an MCP access token
Creates a JWT MCP access token for the project. If threadId is provided, the token will be bound to that thread. If threadId is omitted, a sessionless token will be created using the provided contextKey (or from Bearer token if not provided). Sessionless tokens can only access resources and prompts, not session-specific features. The token expires in 15 minutes and can be used as a bearer token.
post/auth/mcp/access-token
Request body
Example request
{
"threadId": "thread-123",
"contextKey": "user-context-123"
}Response
MCP access token created successfully
Example response
{
"mcpAccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": 1704123456789,
"hasSession": true
}