Create an MCP session token
Changed onMints a short-lived JWT that represents a user identifier across the connected accounts associated with an MCP configuration. The supplied identifier becomes the token's sub claim; the token's aud claim is the MCP server URL bound to the configuration. Claims also carry the MCP configuration ID (mcp_cfg) and the list of resolved connected-account IDs (ca_ids). Use this operation to issue a single credential an MCP server can present on the user's behalf when calling provider tools. The mint fails if any connection mapped to the configuration has no active connected account for the identifier. For a META server, the user needn't have connected accounts yet.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique ID of the MCP configuration whose connections back the token. The configuration must exist in the caller's environment.
Request body
Example request
{
"access_level": "READ_ONLY",
"expiry": "3600s",
"identifier": "alice@acme.com"
}Response
Token created successfully; returns the signed JWT and its absolute expiry
Example response
{
"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InNua18xMjMifQ.eyJhdWQiOlsiYWxpY2VAYWNtZS5jb20iXSwidG9rZW5fdHlwZSI6Im1jcF9zZXNzaW9uIn0.signature"
}Changes
- info
added the new optional request property
- info
- info
endpoint added
- info