> ## 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.

# Cursor

> Connect SocialAPI to Cursor with a config file or the Settings UI so Agent mode can manage comments, DMs, and posts in plain language.

Connect SocialAPI to Cursor and ask Agent mode to list your connected accounts, reply to comments, send direct messages (DMs), and publish posts. Cursor connects to SocialAPI's MCP server at `https://api.social-api.ai/mcp` and signs in with OAuth 2.1, so you create no API key and put no credentials in the config.

## Prerequisites

* [Cursor](https://cursor.com) installed.
* A SocialAPI account with at least one connected account.

## Set up with the config file

**1. Add the server**

Add this to the project config `.cursor/mcp.json` or the global config `~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "SocialAPI": {
      "url": "https://api.social-api.ai/mcp"
    }
  }
}
```

**2. Authorize**

The first time you use a SocialAPI tool, Cursor opens your browser on the SocialAPI authorization page. Log in and click **Authorize**. Cursor stores and refreshes the token.

Cursor supports both the SSE and Streamable HTTP transports for remote servers.

## Set up with the Settings UI

**1. Open MCP settings**

Open **Cursor Settings** (gear icon) and go to **Tools & Integrations**.

**2. Add the server**

Under **MCP Tools**, click **Add Custom MCP** and enter `https://api.social-api.ai/mcp` as the URL.

**3. Authorize**

Click **Needs login** and authorize in the browser window that opens.

## Try it

Open **Agent** mode and ask:

```text theme={null}
List my connected social accounts
```

SocialAPI tools appear under **Available Tools**, and Cursor calls them when a request needs them. You can also name a tool in your prompt. Cursor calls `social_api_list_accounts` and answers with your connected accounts and their platforms.

## Troubleshooting

> **The connection fails**
>
> Open the **Output** panel (`Cmd+Shift+U` on macOS, `Ctrl+Shift+U` on Windows and Linux) and select **MCP Logs** in the dropdown. Check that the URL is exactly `https://api.social-api.ai/mcp`.

> **The server shows Needs login**
>
> Click **Needs login** to run the sign-in. Authorization has not happened yet, or the session expired.

> **Tool calls fail with HTTP 401**
>
> The OAuth session expired. Remove the SocialAPI server from Cursor and add it again to sign in again.

## Related

* [SocialAPI MCP server](https://docs.social-api.ai/integrations/overview.md): the server URL and the other supported clients.
* [MCP tools reference](https://docs.social-api.ai/integrations/tools.md): every tool Cursor can call.
* [OAuth for MCP clients](https://docs.social-api.ai/integrations/oauth.md): how the sign-in works.
* [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.