Connector API
Session identity
For the operator of an MCP server that skills call (a Canvas MCP capability). Every request a session makes to your server says which session, skill, creator and consumer is calling. To trust that without a shared secret, opt in to the session identity token: a short-lived JWT Socialistic signs for your server alone, which you verify offline. It is the workload-identity pattern of GitHub Actions OIDC: the session is the workload, Socialistic the issuer, your server the audience. In MCP terms your server is an OAuth 2.1 resource server and Socialistic its authorization server.
1. Opt in
Publish OAuth 2.0 Protected Resource Metadata (RFC 9728) for your server’s MCP URL, naming Socialistic’s issuer:
# For https://mcp.example.com/mcp, at
# https://mcp.example.com/.well-known/oauth-protected-resource/mcp
# (or https://mcp.example.com/.well-known/oauth-protected-resource)
{
"resource": "https://mcp.example.com/mcp",
"authorization_servers": ["https://socialistic.ai"]
}resourcemust be your MCP URL or its origin; it becomes every token’s aud, exactly as you wrote it. The issuer is matched exactly too (RFC 8414): write https://socialistic.ai, with no trailing slash. Socialistic reads the document when a session starts and on every turn (cached up to an hour, a “no” up to ten minutes), over https only, without following redirects. A server that publishes none, or does not name Socialistic, is sent nothing new; the creator configures nothing either way.
2. What arrives
Authorization: Bearer <token>, minted for your server. A skill whose creator configured anAuthorizationfor your server keeps sending that one instead, and no token. A new token comes with every turn, and one on the session’s own configuration stands whenever no turn’s is in force; each lives a day by default.- The identifying headers, sent to every server whether it opted in or not:
X-Socialistic-Session,X-Socialistic-Skill-Slug,X-Socialistic-Creator-Id,X-Socialistic-Consumer-Id. They identify; they do not authenticate — anything in the sandbox can read and send them. Read the token’s claims instead.
3. Verify the token
Fetch jwks_uri from https://socialistic.ai/.well-known/oauth-authorization-server (RFC 8414) — today https://socialistic.ai/.well-known/jwks.json— and cache it; on a kid you do not have, fetch it again. Then, with any JOSE library:
- The header is
alg: "ES256",typ: "at+jwt"(RFC 9068); the signature verifies with the JWKS key of itskid. issishttps://socialistic.ai;audis exactly theresourceyou published;expis in the future andnbfis not (allow a minute of clock skew).skill_slugis one of the skills you serve — keep your own allowlist; a token for another skill pointed at your server must be refused.- Then your own context: the session you started, found by
toscana_session_idorsession_id;consumer_idis the account running it (theuser_idGET /v1/mereturns for that account’s credential, which needs thesession:runscope).
{
"iss": "https://socialistic.ai",
"aud": "https://mcp.example.com/mcp",
"sub": "<session_id>",
"client_id": "socialistic:session",
"iat": 1764662400, "nbf": 1764662400, "exp": 1764748800,
"jti": "…",
"session_id": "<Socialistic session id>",
"toscana_session_id": "<runtime session id>",
"skill_slug": "my-skill-ab12cd",
"creator_id": "<skill creator's user id>",
"consumer_id": "<the account running the session>"
}Verify at every tool call, not only when the connection opens. While the session is being created, the runtime connects to your server and lists its tools with the session’s configured token, which has no toscana_session_id(the session does not have one yet); a turn’s token always does. Refusing the creation-time requests makes every session fail to start with 502 MCP_UNAVAILABLE.
Lifetime and revocation
A token cannot be revoked before exp: the lifetime is the bound. Ending a session is not revocation: a later message to the same session resumes it, and its turn mints a new token; a session that is never sent another message gets no more. Decide what an old session may still do on your side (by session_idand your own records). A run that pauses for a long generation and resumes later keeps its turn’s token. A new key is published in the JWKS before it signs anything, and the previous one stays published for at least a token’s lifetime after the switch, so a verifier that re-fetches on an unknown kid always finds it.
Never pass the token on
The token is for your server only. Do not forward it to another service, and refuse any token whose audis not yours (the MCP spec’s “token passthrough” and confused-deputy rules); audience binding is what makes a token leaked from one server useless at another.
Without opting in: look the session up
An MCP server attached to the skill (a Canvas MCP capability) receives four headers on every request: X-Socialistic-Session, the calling session’s Socialistic id, and X-Socialistic-Skill-Slug, the slug of the skill it runs, plus X-Socialistic-Creator-Id and X-Socialistic-Consumer-Id, the creator and consumer user ids. The consumer id is sent even for a private session; private mode hides conversation content from the creator, not the consumer’s identity. The platform sets these headers; a skill can’t set or override any X-Socialistic- header. Inside the sandbox the session id is also in the environment variable SOCIALISTIC_SESSION_ID, for a skill to pass to any other service of yours. Existing sessions keep the headers set when they were created, so some send only the session id and skill slug, or no platform headers. Older sessions and read-only sessions from the retired classic runtime lack the variable too. These identifiers are not secrets (anything running in the sandbox can read them and call your server itself), so the service must check the session rather than trust the headers: call GET /v1/sessions/:sessionId?history=falsewith an API key of either the account that runs the sessions or the skill’s creator. Anyone else gets 404 SESSION_NOT_FOUND. The account that runs the session gets its owner_id, skill_slug, toscana_session_id and created_at with access: "owner". The skill’s creator — the usual case for an MCP server on a shared skill, whose sessions belong to the people using it — gets access: "skill_creator" with the same skill_slug, toscana_session_id, created_at and owner_id identifying the consumer, with seed_context withheld as null, and never the conversation (without history=false it answers 404). history=false skips reading the conversation either way. Check skill_slug is the skill you expect, then look up your own context by toscana_session_id. None of these change after the session is created, so cache the answer.
Check the id when a tool is called, not when the connection opens. The runtime connects to your MCP server and lists its tools while the session is still being created, before GET /v1/sessions/:sessionId can find it (that answers 404 until creation finishes). A server that refuses those first initialize / tools/list requests makes every session fail to start with 502 MCP_UNAVAILABLE. Tool calls only happen during runs, after the session exists. The skill slug header is there from the first request, so a server shared by several skills can already pick which tools to list — as a hint, not a check.
# $SESSION: the X-Socialistic-Session header, or $SOCIALISTIC_SESSION_ID
curl "https://connector.socialistic.ai/v1/sessions/$SESSION?history=false" \
-H "Authorization: Bearer $KEY"
# → 200
{ "session_id": "…", "access": "owner", "owner_id": "…",
"skill_slug": "my-skill-ab12cd", "toscana_session_id": "…",
"created_at": "…", "messages": [], "history_complete": false, … }