https://api.social-api.ai/mcp with an API key sent on the Authorization: Bearer header. Use this setup when your client does not implement OAuth 2.1, or when the agent runs without a browser: on a server, in a container, in a CI job, or on a schedule.
Prerequisites
- A SocialAPI account with at least one connected account.
- An API key from the dashboard or from
POST /v1/keys. A key starts withsapi_key_. See Authentication.
Set up the config file
1
Add the server
Most MCP clients accept a custom
Authorization header in the server config. Set it to your API key prefixed with Bearer :2
Match your client's field name
The field name differs by client. Some clients use
headers, others use requestInit.headers or a top-level auth block. Check your client’s MCP documentation.Call the server over HTTP
The MCP endpoint speaks Streamable HTTP. Send each tool call as a JSON-RPC message in aPOST request. The Authorization header is required on every request, and API key authentication has no /oauth/authorize redirect and no PKCE exchange.
social_api_: see MCP tools reference.
Limit what the agent can do
A full-access API key can run every tool. To restrict an agent to some operations or some brands, issue it a scoped API key. A tool outside the key’s scopes returnsauth.insufficient_scope, with the missing scope in required_scope. required_scope is absent for tools that need a full-access key: see Scoped API keys. Plan allowances and platform support apply to a tool exactly as they do to its REST equivalent.
Rotate a key
Rotate a key withPOST /v1/keys/{id}/rotate. It returns a new secret for the same key, keeps its scopes and brands, and ends the old secret at once. Update the agent’s config with the new secret. See Authentication.
To revoke a key instead, use DELETE /v1/keys/{id} or the dashboard. A tool call that uses a revoked key returns HTTP 401.
Try it
Run thetools/list request above. A successful response is HTTP 200 and lists tools such as social_api_list_accounts. Then call that tool:
Troubleshooting
HTTP 401 with invalid or inactive API key
HTTP 401 with invalid or inactive API key
A wrong, revoked, or rotated
sapi_key_ key returns {"error": "invalid or inactive API key"}. A token without the sapi_key_ prefix that is not a valid OAuth 2.1 access token returns {"error": "invalid token"}. Check the key in the dashboard.HTTP 402 on every call
HTTP 402 on every call
Every MCP request returns HTTP 402
billing.past_due until the invoice is paid. See Plans for how access returns.A tool is not found
A tool is not found
Run
tools/list to read the exact tool names. Every name starts with social_api_: see MCP tools reference.Related
- SocialAPI MCP server: the server URL and the supported clients.
- MCP tools reference: every tool and the endpoint it runs.
- Authentication: create, rotate, and revoke API keys.
- Scoped API keys: restrict an agent to some scopes and brands.
- Errors: every error code a tool can return.