create_mcp_session_token
Create a 6-hour session token for the signed-in user and one virtual MCP server, returning the token, expiry, and MCP URL. Requires an OAuth token and active connected accounts for DIRECT servers.
Instructions
Create a 6-hour session token for the signed-in user, for one virtual MCP server. The token is always issued for you, identified by a short hash of your user ID, and cannot be created for anyone else. For a DIRECT server, every connection in it needs an active connected account for that identifier first, or the call fails. Returns the token, its expiry and the MCP URL it works on. Treat the token as a secret. Requires the caller OAuth token.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"environmentId": "<environmentId>",
"virtualMcpServerId": "<virtualMcpServerId>"
},
"name": "create_mcp_session_token"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accessLevel | No | Access level written into the token. Default FULL. | FULL |
| environmentId | Yes | Scalekit environment id. Format: env_<id>. | |
| virtualMcpServerId | Yes | Virtual MCP server ID (cfg_...). |