MCP Configurations
Create an MCP session token for a connection
Changed onMints a short-lived token for one user that an MCP client sends to one connection's MCP server, at <environment URL>/mcp/v3/connections/{key_id}, without a Virtual MCP server. The token's sub claim is the identifier and its aud claim is that server URL, so the token works only there. Use it when an agent needs the tools of exactly one connection.
post/api/v1/mcp/connections/{key_id}/tokens
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
key_idstring required
The connection name, as shown in AgentKit > Connections. It's also the last path segment of the connection's MCP server URL.
Request body
Example request
{
"access_level": "READ_ONLY",
"expiry": "3600s",
"identifier": "user_123"
}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