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

# VS Code + GitHub Copilot

> Connect SocialAPI to VS Code with GitHub Copilot using a config file or the Command Palette so Agent mode can manage comments, DMs, and posts.

Connect SocialAPI to VS Code and ask Copilot Chat in Agent mode to list your connected accounts, reply to comments, send direct messages (DMs), and publish posts. VS Code 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.

## Prerequisites

* [VS Code](https://code.visualstudio.com) 1.101 or later with the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) extension.
* A GitHub Copilot subscription: Individual, Business, or Enterprise.
* A SocialAPI account with at least one connected account.

## Set up with the config file

**1. Add the server**

Create or edit `.vscode/mcp.json` in your workspace, or add the entry to your user profile for all workspaces:

```json theme={null}
{
  "servers": {
    "SocialAPI": {
      "type": "http",
      "url": "https://api.social-api.ai/mcp"
    }
  }
}
```

**2. Authorize**

VS Code shows a CodeLens above the server entry. Click **Auth** and authorize in the browser window that opens.

## Set up with the Command Palette

**1. Add the server**

Open the Command Palette (`Ctrl+Shift+P` on Windows and Linux, `Cmd+Shift+P` on macOS) and run **MCP: Add Server**. Select **HTTP** as the server type and enter `https://api.social-api.ai/mcp`.

**2. Choose a scope**

Choose **Global** for your user profile or **Workspace** for this workspace.

**3. Authorize**

Click the **Auth** CodeLens and authorize in the browser window that opens.

## Try it

Open **Copilot Chat**, switch to Agent mode, and ask:

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

Copilot calls `social_api_list_accounts` and answers with your connected accounts and their platforms.

## Troubleshooting

> **The Auth CodeLens does not appear**
>
> Check that VS Code is version 1.101 or later and that the GitHub Copilot extension is installed and active. The CodeLens appears above the server entry in `.vscode/mcp.json`.

> **The server does not connect**
>
> Check that the `url` is exactly `https://api.social-api.ai/mcp` and that `type` is `http`.

> **Tool calls fail with HTTP 401**
>
> The OAuth session expired. Click **Auth** above the server entry 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 Copilot 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.