> For the complete documentation index, see [llms.txt](https://socialcli.gitbook.io/socialcli-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://socialcli.gitbook.io/socialcli-docs/mcp-integration.md).

# MCP Integration

## MCP Integration

**Protocol:** Model Context Protocol (MCP) **Clients:** Claude Desktop, Cursor, any MCP-compatible LLM

### Setup

**Remote MCP (recommended):**

```json
{
  "mcpServers": {
    "social-cli": {
      "url": "https://backend.socialcli.xyz/mcp/social-cli",
      "headers": {
        "x-api-key": "sk_live_..."
      }
    }
  }
}
```

### Available MCP Tools

#### Posts

| Tool             | Credits                | Description                                             |
| ---------------- | ---------------------- | ------------------------------------------------------- |
| `create_post`    | 3 (20 for Twitter+URL) | Create or schedule a post to one or more platforms      |
| `list_posts`     | 1                      | List posts, filter by status or platform                |
| `get_post`       | 1                      | Get a specific post by ID                               |
| `delete_post`    | 1                      | Delete a scheduled or draft post                        |
| `retry_post`     | 2                      | Retry a failed post                                     |
| `validate_post`  | 1                      | Validate content before publishing                      |
| `get_post_stats` | 1                      | Get counts by status (total/scheduled/published/failed) |

#### Accounts

| Tool                    | Credits | Description                                  |
| ----------------------- | ------- | -------------------------------------------- |
| `list_accounts`         | 1       | List all connected social accounts           |
| `get_connect_url`       | 1       | Get OAuth URL to connect a platform          |
| `connect_bluesky`       | 1       | Connect Bluesky via handle and app password  |
| `disconnect_account`    | 1       | Remove a connected account                   |
| `check_accounts_health` | 2       | Check token validity of all accounts         |
| `get_my_profile`        | 1       | Get workspace profile                        |
| `update_my_profile`     | 1       | Update workspace name, description, or color |

#### Analytics

| Tool                         | Credits | Description                                                 |
| ---------------------------- | ------- | ----------------------------------------------------------- |
| `get_analytics`              | 3       | Post performance metrics, filterable by platform and date   |
| `get_facebook_page_insights` | 3       | Facebook Page insights - followers, engagement, impressions |
| `get_usage_stats`            | 1       | Plan usage stats - posts used, upload limits, profiles      |

#### Queue

| Tool                  | Credits | Description                                  |
| --------------------- | ------- | -------------------------------------------- |
| `list_queue_slots`    | 1       | Get recurring posting schedule               |
| `set_queue_slots`     | 2       | Set or update posting schedule with timezone |
| `get_next_queue_slot` | 1       | Get next available queue time                |
| `preview_queue_slots` | 1       | Preview next N upcoming publish times        |

#### Inbox and Comments

| Tool                    | Credits | Description                                 |
| ----------------------- | ------- | ------------------------------------------- |
| `list_conversations`    | 2       | List DM conversations (Team plan and above) |
| `get_messages`          | 2       | Get messages in a conversation              |
| `send_message`          | 2       | Send a reply in a conversation              |
| `list_comments`         | 2       | List comments on posts                      |
| `reply_to_comment`      | 2       | Reply to a comment                          |
| `update_comment_status` | 1       | Like, unlike, hide, or unhide a comment     |
| `list_reviews`          | 2       | List reviews (Google Business, Facebook)    |
| `reply_to_review`       | 2       | Reply to a review                           |

#### Twitter/X

| Tool                   | Credits | Description                                                 |
| ---------------------- | ------- | ----------------------------------------------------------- |
| `retweet_post`         | 2       | Retweet a tweet                                             |
| `undo_retweet`         | 1       | Undo a retweet                                              |
| `bookmark_tweet`       | 1       | Bookmark a tweet                                            |
| `follow_user`          | 2       | Follow a user                                               |
| `unfollow_user`        | 1       | Unfollow a user                                             |
| `edit_published_tweet` | 3       | Edit a published tweet (X Premium, within 1hr, max 5 edits) |

#### Media

| Tool             | Credits | Description                             |
| ---------------- | ------- | --------------------------------------- |
| `get_upload_url` | 1       | Get presigned URL for local file upload |

#### Broadcasts

| Tool               | Credits | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `list_broadcasts`  | 1       | List broadcast campaigns           |
| `create_broadcast` | 3       | Create a new broadcast             |
| `send_broadcast`   | 5       | Send a broadcast to all recipients |

### Example Usage

**Posting via Claude:**

> "Post 'Just shipped v2.0' to Twitter and LinkedIn" Agent calls `create_post` - published to both platforms

**Scheduling content:**

> "Schedule 'New blog post is live' for tomorrow at 9am UTC across all platforms" Agent calls `create_post` with `scheduledAt` parameter

**Inbox management:**

> "Check my DMs and reply to any pricing questions with our standard response" Agent calls `list_conversations`, filters results, calls `send_message` for each match

**Analytics:**

> "How did my posts perform this week?" Agent calls `get_analytics` with `period: 7d`

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://socialcli.gitbook.io/socialcli-docs/mcp-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
