> ## Documentation Index
> Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Base URL: https://api.social-api.ai/v1. Send your API key in the Authorization header: Authorization: Bearer <your API key>.
> Every error response from /v1 is JSON: { "error": { "code", "message", "meta" (optional) }, "request_id" }. Branch on error.code; use error.message only for logs.
> A 429 response carries a Retry-After header, in seconds, when the limit has a known wait. Authenticated responses can carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset for the per-minute request budget your SocialAPI account shares across every API key (see /guides/rate-limits).
> Paginated list endpoints return next_cursor, at the top level or inside pagination (see /guides/pagination). Pass it as the cursor query parameter to get the next page. An absent or empty next_cursor means you have the last page.
> Treat every ID as an opaque string: do not parse it or assume a format.
> Support differs by platform and by operation. Check /platforms/overview before assuming an operation works on a platform. An unsupported operation returns 501 with error.code resource.not_supported.

# SocialAPI MCP server

> Connect Claude, ChatGPT, Cursor, and other AI clients to the SocialAPI MCP server to read comments, reply, send DMs, and publish posts.

The SocialAPI MCP server lets an AI client run SocialAPI operations on your connected accounts through the [Model Context Protocol](https://modelcontextprotocol.io) (MCP). Once a client is connected, you can ask it in plain language to list your connected accounts, read and reply to comments, send direct messages (DMs), answer reviews, and publish or schedule posts.

The server URL is the same for every client:

```text theme={null}
https://api.social-api.ai/mcp
```

The server uses the Streamable HTTP transport. Every tool runs the same operation as its REST equivalent, with the same scopes, plan allowances, and platform support: see [MCP tools reference](https://docs.social-api.ai/integrations/tools.md).

## Authentication

An MCP client authenticates with a bearer token on the `Authorization` header. SocialAPI accepts the same two token types as the REST API:

| Token | Use it for | How the client gets it |
| - | - | - |
| OAuth 2.1 access token | Interactive clients with a built-in sign-in: Claude, ChatGPT, Le Chat, Cursor, VS Code, Codex, Hermes Agent, OpenClaw | You add the server URL. The client opens a SocialAPI sign-in page, you approve, and the client keeps and refreshes the token. See [OAuth for MCP clients](https://docs.social-api.ai/integrations/oauth.md) |
| API key | Headless agents, servers, CI jobs, and clients without OAuth | You create a key in the dashboard and put it in the client's `Authorization` header. See [Custom MCP clients](https://docs.social-api.ai/integrations/custom.md) |

A full-access API key and an OAuth access token can run every tool. To give an agent less, connect it with a [scoped API key](https://docs.social-api.ai/guides/scoped-keys.md): a tool outside the key's scopes returns a result with `isError: true` and `code` `auth.insufficient_scope`. `required_scope` is absent for tools that need a full-access key. See [Scoped API keys](https://docs.social-api.ai/guides/scoped-keys.md) and [Authentication](https://docs.social-api.ai/guides/authentication.md).

## Connect a client

| Client | Surfaces | Sign-in | Setup |
| - | - | - | - |
| Claude | claude.ai, Claude Desktop, Claude Code, mobile | OAuth | [Claude](https://docs.social-api.ai/integrations/claude.md) |
| ChatGPT | Web, desktop, mobile | OAuth | [ChatGPT](https://docs.social-api.ai/integrations/chatgpt.md) |
| Le Chat (Mistral) | Web, mobile | OAuth | [Mistral / Le Chat](https://docs.social-api.ai/integrations/mistral.md) |
| Cursor | Config file, Settings | OAuth | [Cursor](https://docs.social-api.ai/integrations/cursor.md) |
| VS Code with GitHub Copilot | Config file, Command Palette | OAuth | [VS Code](https://docs.social-api.ai/integrations/vscode.md) |
| Codex | CLI, IDE extension, desktop app | OAuth or API key | [Codex](https://docs.social-api.ai/integrations/codex.md) |
| Hermes Agent | Chat and messaging gateway | OAuth or API key | [Hermes Agent](https://docs.social-api.ai/integrations/hermes.md) |
| OpenClaw | Every routed channel | OAuth or API key | [OpenClaw](https://docs.social-api.ai/integrations/openclaw.md) |
| Any other MCP client | Any | API key | [Custom MCP clients](https://docs.social-api.ai/integrations/custom.md) |

## What the agent can do

The agent gets one tool per operation: accounts and brands, comments, DMs, reviews, mentions, Automations, posts, media, analytics, exports, webhooks, events, usage, and API keys. [MCP tools reference](https://docs.social-api.ai/integrations/tools.md) lists every tool by area with the REST endpoint it runs.

## Not the documentation MCP server

This documentation site also exposes its own MCP server, which only searches these docs. It cannot read or change your accounts. To manage your SocialAPI accounts from an AI client, add the server at `https://api.social-api.ai/mcp`.

## Troubleshooting

> **The sign-in window does not open or loops**
>
> Allow pop-ups for the client's site. Ad blockers and privacy extensions can block the redirect back to the client: pause them and retry.

> **Tool calls fail with HTTP 401**
>
> The client's OAuth session expired or its API key is wrong. Remove the SocialAPI server from the client and add it again to sign in again. For an API key, check that it is active in the [dashboard](https://app.social-api.ai/api-configuration?tab=keys). The `401` body is `{"error": "<message>"}`.

> **The client reports that the server is not responding**
>
> Use the URL exactly as shown: `https://api.social-api.ai/mcp`. Check [status.social-api.ai](https://status.social-api.ai) for an incident.

> **A tool returns an error result**
>
> A failed tool returns `isError: true` with the same `code` the REST API returns. Look the code up in [Errors](https://docs.social-api.ai/guides/errors.md).

## Related

* [MCP tools reference](https://docs.social-api.ai/integrations/tools.md): every tool and the endpoint it runs.
* [OAuth for MCP clients](https://docs.social-api.ai/integrations/oauth.md): how the sign-in works, and how to build it for your own client.
* [Custom MCP clients](https://docs.social-api.ai/integrations/custom.md): connect with an API key.
* [Scoped API keys](https://docs.social-api.ai/guides/scoped-keys.md): limit which tools an agent can run.
* [Errors](https://docs.social-api.ai/guides/errors.md): every error code a tool can return.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.