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

# MCP server

> Connect Claude Code, Codex, ChatGPT, and Claude directly to your SuperX data with the hosted SuperX MCP server.

SuperX hosts a remote MCP (Model Context Protocol) server at `https://api.superx.so/v1/mcp`. Any MCP client can read your X (Twitter) analytics, posts, contacts, contact lists, audience replies, signal agents and their leads, tags, scheduled queue, and long-form Articles, search a library of high-performing posts for inspiration, schedule, edit, or delete posts (with image attachments), manage contact list members, create, pause, resume, or delete signal agents (automated lead finders), create, edit, schedule, and publish Articles with AI cover generation, and read or update the account's Context settings (the background SuperX's AI uses when writing: profile description, interests, rules, favorite creators, style guide, products), using the same API keys as the REST API. Nothing to install or run yourself.

You need an API key from [app.superx.so/account?tab=api](https://app.superx.so/account?tab=api) and an active SuperX subscription.

## Claude Code and Codex (header auth)

CLI-class clients send the key as a normal Authorization header. This is the preferred mode.

```bash theme={null}
claude mcp add --transport http superx https://api.superx.so/v1/mcp --header "Authorization: Bearer YOUR_API_KEY"
```

Replace `YOUR_API_KEY` with your `sxk_...` key. For Codex, add a streamable HTTP MCP server with the same URL and header in its MCP configuration.

## ChatGPT and claude.ai (keyed URL)

Remote connectors that cannot send custom headers use a URL with the key embedded:

```bash theme={null}
https://api.superx.so/v1/mcp/YOUR_API_KEY
```

* **ChatGPT**: Settings, then Connectors, then add a custom connector with this URL. Set authentication to none (the key is in the URL).
* **claude.ai**: Settings, then Connectors, then add a custom connector (remote MCP server) with this URL, authentication none.

The API / MCP / CLI tab in the SuperX app shows the ready-to-paste URL once, right when you create a key.

## Tools

| Tool                         | Description                                                                                                                                                                                                |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_account_overview`       | Follower count and trend, plus posting totals over a date range                                                                                                                                            |
| `get_post_analytics`         | Published posts with per-post metrics, top performers or most recent                                                                                                                                       |
| `get_top_contacts`           | The people who engage with the account most (90-day window)                                                                                                                                                |
| `get_contact_history`        | One contact's reply history to the account                                                                                                                                                                 |
| `get_my_replies`             | Replies the account has sent, newest or best-performing first                                                                                                                                              |
| `get_scheduled_posts`        | Drafts and the scheduled queue on the main account                                                                                                                                                         |
| `find_inspiration`           | Search a library of 50M+ high-performing posts by topic                                                                                                                                                    |
| `schedule_post`              | Create a draft or scheduled post or thread on the main account, with optional images, title, scratchpad notes, tags, and advanced settings (`autoRetweet`, `autoDelete`, `autoPlug`, `superFollowersOnly`) |
| `delete_scheduled_post`      | Delete a draft or scheduled post on the main account by id                                                                                                                                                 |
| `list_tags`                  | List the account's tags (id, name, color)                                                                                                                                                                  |
| `update_scheduled_post`      | Edit a draft or scheduled post: text, images, title, scratchpad, tags, time, draft/scheduled status, or advanced settings                                                                                  |
| `list_articles`              | List long-form X Articles (title, status, times)                                                                                                                                                           |
| `get_article`                | One article with its full body as markdown                                                                                                                                                                 |
| `create_article`             | Create an article draft on the main account (markdown body)                                                                                                                                                |
| `update_article`             | Edit an article's title, markdown body, or cover URL                                                                                                                                                       |
| `schedule_article`           | Schedule or reschedule an article (more than 2 minutes ahead)                                                                                                                                              |
| `publish_article`            | Publish an article to X immediately (irreversible; needs X Premium)                                                                                                                                        |
| `generate_article_cover`     | Generate an AI cover from the article's title, attached by default (60-100s, spends AI credits)                                                                                                            |
| `get_audience_replies`       | Replies the account has received from its audience across all its posts                                                                                                                                    |
| `list_contact_lists`         | The account's contact lists (system lists are read-only)                                                                                                                                                   |
| `get_contact_list_members`   | Members of a list the user created                                                                                                                                                                         |
| `add_contact_list_member`    | Add a person to a contact list by handle or X user id                                                                                                                                                      |
| `remove_contact_list_member` | Remove a member from a contact list                                                                                                                                                                        |
| `list_signal_agents`         | The account's signal agents (automated lead finders) and what they watch                                                                                                                                   |
| `get_signal_leads`           | Leads the signal agents found, with match score, rationale, and provenance                                                                                                                                 |
| `create_signal_agent`        | Create a signal agent on the main account; keywords and the destination list can be auto-generated                                                                                                         |
| `set_signal_agent_status`    | Pause or resume a signal agent                                                                                                                                                                             |
| `delete_signal_agent`        | Delete a signal agent (its saved leads and contact list stay untouched)                                                                                                                                    |
| `upload_media_from_url`      | Download an image from a public https URL and store it for attaching to posts (JPG, PNG, WEBP up to 5MB; GIF up to 15MB)                                                                                   |
| `list_plug_templates`        | List the account's auto-plug reply templates (id, text, has\_media) for `autoPlug.templateId`                                                                                                              |
| `get_context`                | The account's Context settings: profile description, interests, SuperX rules, reply settings, favorite creators, style guide (overrides + generated), products                                             |
| `update_context`             | Update any subset of the Context settings; only passed params change, `null` clears, arrays fully replace                                                                                                  |
| `update_product`             | Add or edit one product by id or url (creates by url when new, cap 5)                                                                                                                                      |
| `delete_product`             | Remove one product by id (reversible by re-adding the same url)                                                                                                                                            |
| `get_queue_settings`         | The account's posting schedule: predefined time slots (`{ time, days }`, 0 = Sunday) and the timezone they run in                                                                                          |
| `update_queue_settings`      | Change the posting schedule; changing the slots also re-flows queued posts onto them                                                                                                                       |

## Scopes

The eighteen read tools work with any API key. The write tools (`schedule_post`, `update_scheduled_post`, `delete_scheduled_post`, `create_article`, `update_article`, `schedule_article`, `publish_article`, `generate_article_cover`, `add_contact_list_member`, `remove_contact_list_member`, `create_signal_agent`, `set_signal_agent_status`, `delete_signal_agent`, `upload_media_from_url`, `update_context`, `update_product`, `delete_product`, and `update_queue_settings`) need a key with the **write** scope; with a read-only key they return an insufficient-scope error the model can relay. Post, article, contact-list, signal-agent, and media writes are limited to your main account; the context and queue-settings tools accept an `account` parameter for any linked or shared account. On an account shared with `editor` permission, `update_context`, `update_product`, and `delete_product` return an `editor_restricted` error while `update_queue_settings` works.

To attach images to a post, call `upload_media_from_url` first, then pass the returned `object_key` in the per-part `media` field of `schedule_post` or `update_scheduled_post` (up to 4 images or exactly 1 GIF per part, optional `alt_text`). `upload_media_from_url` counts against a daily quota of 100 uploads per key. On `update_scheduled_post`, replacement posts sent without `media` remove the media those parts carried; re-include the existing `object_key`s to keep them. Video is not supported yet.

Advanced settings on `schedule_post`: omit `autoRetweet`, `autoDelete`, `autoPlug`, or `superFollowersOnly` to inherit that setting's Default Post Settings value from the SuperX app; pass an object to override or `null` to turn a setting off for that post. Exactly five settings inherit this way (auto retweet, auto delete, auto plug, auto DM, Super Followers only); other composer defaults such as Bluesky cross-posting are never applied to API posts. `autoPlug.templateId` comes from `list_plug_templates`; unknown ids are rejected. On `update_scheduled_post` there is no inheritance: provided values override, omitted ones keep the post's current settings, `null` removes them. Auto DM always inherits the user's defaults and has no parameter; if a plan limit strips it, the `schedule_post` result carries `auto_dm_skipped: true`.

Creating a signal agent returns immediately, but the agent finds leads over the following minutes and days; there is no synchronous search. Check `get_signal_leads` later for what it found.

Context settings (`get_context` / `update_context`) are the background SuperX's AI uses on every writing surface: the profile description grounds the voice, interests drive content suggestions and personalized search, SuperX rules are mandatory instructions, reply settings steer generated replies, favorite creators (max 3 X usernames) inspire the style, and the style-guide overrides outrank the app's generated guide until cleared with `null`. On `update_context` only the params you pass change; `interests` and `favoriteCreators` fully replace the stored lists. Because these settings shape all future AI output for the account, confirm with the user before changing them. Products (max 5, managed with `update_product` / `delete_product`) are mentioned naturally in generated content; deleting one is reversible by re-adding the same url.

Queue settings (`get_queue_settings` / `update_queue_settings`) are the account's posting schedule: the predefined time slots the queue fills and the timezone they run in. Slots are `{ time: "09:00", days: [1, 3, 5] }` with 0 = Sunday, at most 50 entries, one per unique time. `slots` is a full replace, so send the complete set the user should end up with; `[]` clears every slot and leaves the queue all-custom. Changing the slots also re-flows the queue the way the app does: a queued post sitting exactly on an old slot moves to the matching new slot, so gaps are preserved and hand-picked custom times stay put. The result carries `reflow: { moved, skipped, bailed }`; `bailed: true` means the settings were saved but the queue was deliberately left alone, and retrying is safe. Changing only `timezone` never moves posts. Changing the timezone and the slots in one call usually moves nothing, because the existing posts were placed under the old timezone; to re-flow them, change the timezone first, then send the slots in a second call.

Timestamps passed to the scheduling tools must be ISO-8601 with an explicit `Z` or numeric offset. Naive local times are rejected. A new time alone never schedules a draft post; `update_scheduled_post` promotes only when `status` is set to `scheduled`. Article bodies are markdown in both directions; `publish_article` is live and irreversible, and `generate_article_cover` spends AI credits against daily and monthly caps.

## Security

The keyed URL **is** your API key. Treat it like a password: share it only with the connector, keep it out of chat transcripts and screenshots, and rotate the key from the API / MCP / CLI tab if it ever leaks. Prefer header auth wherever the client supports it. SuperX redacts the key from its own request logs.

## Troubleshooting

| Symptom                     | Cause                                                                                                                        |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `401 invalid_api_key`       | Wrong, mistyped, or revoked key. Create or rotate a key in the API / MCP / CLI tab.                                          |
| `403 subscription_required` | The key owner's SuperX subscription is not active.                                                                           |
| `405 Method not allowed`    | The endpoint is POST-only. Some clients probe with GET first; that is harmless.                                              |
| Duplicate scheduled posts   | `schedule_post` has no idempotency. If a call timed out or was retried, check `get_scheduled_posts` before calling it again. |
