Connector API
Auth & scopes
To act for otherpeople — your product’s users, or an MCP client a person connects — use OAuth instead of asking them to paste a key. Two hosts share the work: https://socialistic.ai is the authorization server (people sign in and approve there), and connector.socialistic.ai is the resource server (it only checks tokens).
Discovery
GET https://connector.socialistic.ai/.well-known/oauth-protected-resource/mcp
GET https://connector.socialistic.ai/.well-known/oauth-protected-resource
GET https://socialistic.ai/.well-known/oauth-authorization-serverA request without a valid token answers 401 with WWW-Authenticate: Bearer resource_metadata="…" pointing at the first document (RFC 9728); its authorization_servers names the issuer, whose metadata (RFC 8414) lists the endpoints below.
1. Publish a Client ID Metadata Document
There is no registration form and no dynamic client registration. Your client_id is an https URL you host, serving JSON whose own client_id equals that URL exactly:
{
"client_id": "https://app.example.com/oauth/client.json",
"client_name": "Example",
"redirect_uris": ["https://app.example.com/callback", "http://127.0.0.1/callback"]
}The document is fetched at authorization time over https only, without following redirects, within 3 seconds and 5 KB, and never from a private, loopback or link-local address. It may be cached according to its Cache-Control (at most an hour). A redirect_uri must match one listed exactly, except that a loopback http://localhost or http://127.0.0.1 URI matches whatever its port. The consent page shows your client_id’s domain and says the app is not reviewed by Socialistic.
2. Send the person to the consent page
https://socialistic.ai/oauth/authorize
?response_type=code
&client_id=<your metadata URL>
&redirect_uri=<one of its redirect_uris>
&code_challenge=<BASE64URL(SHA256(code_verifier))>
&code_challenge_method=S256
&resource=https://connector.socialistic.ai/mcp
&scope=<space-separated scopes; default socialistic>
&state=<an unguessable value you check on return>PKCE with S256 is required of every client. resource is required: https://connector.socialistic.ai/mcp (MCP only) or https://connector.socialistic.ai (REST and MCP); the token works only there. An unverifiable client, or a redirect_uri it does not list, gets an error page and nothing is sent back. Otherwise the browser returns to your redirect_uri with ?code=…&state=…&iss=… on approval, or ?error=access_denied / invalid_request / invalid_scope / invalid_target / unsupported_response_type. Always verify state.
3. Exchange the code
Within 60 seconds; a code works once, for the client, redirect_uri and PKCE challenge it was issued for.
curl -X POST https://socialistic.ai/oauth/token -d grant_type=authorization_code --data-urlencode code=<code> --data-urlencode redirect_uri=<the same redirect_uri> --data-urlencode client_id=<your metadata URL> --data-urlencode code_verifier=<code_verifier>
# → { "access_token": "soc_at_…", "token_type": "Bearer", "expires_in": 3600,
# "refresh_token": "soc_rt_…", "scope": "socialistic" }Access tokens live an hour. Refresh with grant_type=refresh_token, refresh_token and client_id (optionally a narrower scope): every refresh returns a new refresh token (valid 30 days) and the old one dies at once — presenting an old refresh token again revokes the whole authorization, and so does a second refresh racing the first with the same token: if several workers share one authorization, let one refresh at a time and the rest read the result. The access token a refresh replaces keeps working until its own expiry, so requests already carrying it are not cut off (only the one most recently replaced: a second refresh ends it, and so does a refresh that narrows the scope). Revoke with POST https://socialistic.ai/oauth/revoke (RFC 7009, token + client_id). The person sees your app in Settings → API access → Authorized apps and can revoke it there.
Scopes
Every endpoint and MCP tool declares one scope; a token may call it when it carries that scope or socialistic(all of them). An API key carries every scope. Tokens the platform issues to a session’s agent are narrowed further and bound to the skill(s) of their task: a bound token cannot touch any other skill (403 FORBIDDEN), and lists show only its skills.
| Scope | MCP tools |
|---|---|
skill:read | skill_list skill_search skill_get skill_stats skill_revisions draft_get draft_files_get draft_capability_list |
skill:write | skill_update skill_identity_update draft_put draft_update draft_save draft_files_put draft_capability_add draft_capability_update draft_capability_remove draft_avatar_put |
skill:publish | skill_activate skill_deactivate skill_delete skill_publish |
skill:create | skill_create |
skill:import | skill_import_github |
translation:read | translation_list |
translation:write | translation_put |
session:run | me_get session_list session_create session_get session_end session_stream_descriptor run_create run_get run_wait run_cancel run_steer github_skill_search github_skill_search_get |
public:read | model_list public_skill_match public_skill_search |
socialistic | every tool |