← All integrations

X (Twitter) MCP server

259 operations0 webhooks

Read and act on X (Twitter) through the full X API v2: publish and search posts, read timelines, mentions, likes, bookmarks and followers, look up and search users, send and read Direct Messages and encrypted Chat, manage Lists, Spaces, Communities, trends, news, Community Notes, live broadcasts and media uploads, and run usage, compliance and webhook routes (259 operations).

Try X (Twitter) with your agent

Connect X (Twitter), then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.

Using Corsair, show me what you can do in X (Twitter) on my account, then run one read-only example and show me the result.

Runs once, when you ask

X (Twitter) tools and triggers

Tools are what your agent can do in X (Twitter) through Corsair's MCP server. Triggers are the X (Twitter) events a routine can start from.

Users

  • AffiliatesRead-only

    Retrieves a list of Users who are affiliated with a specific organization User by their ID.

    users.affiliates

  • Block DmsWrite

    Blocks direct messages to or from a specific User by their ID for the authenticated user. Needs a user (OAuth 2.0) token.

    users.blockDms

  • Blocking.BlockDestructive

    Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. Needs a user (OAuth 2.0) token.

    users.blocking.block

  • Blocking.ListRead-only

    Returns the Users that the given User is blocking. Needs a user (OAuth 2.0) token.

    users.blocking.list

  • Blocking.UnblockWrite

    Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. Needs a user (OAuth 2.0) token.

    users.blocking.unblock

  • Bookmarks.CreateWrite

    Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. Send tweet_id or tweet_ids, not both. Needs a user (OAuth 2.0) token.

    users.bookmarks.create

  • Bookmarks.DeleteWrite

    Removes a Post from the authenticated user's Bookmarks by its ID. Needs a user (OAuth 2.0) token.

    users.bookmarks.delete

  • Bookmarks.Folders.CreateWrite

    Creates a new Bookmark folder for the authenticated user. Needs a user (OAuth 2.0) token.

    users.bookmarks.folders.create

  • Bookmarks.Folders.ListRead-only

    Retrieves a list of Bookmark folders created by the authenticated user. Needs a user (OAuth 2.0) token.

    users.bookmarks.folders.list

  • Bookmarks.Folders.List PostsRead-only

    Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. Needs a user (OAuth 2.0) token.

    users.bookmarks.folders.listPosts

  • Bookmarks.ListRead-only

    Retrieves a list of Posts bookmarked by the authenticated user. Needs a user (OAuth 2.0) token.

    users.bookmarks.list

  • Broadcasts.CreateDestructive

    Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. Needs a user (OAuth 2.0) token. Needs the extra OAuth scope broadcast.read, broadcast.write (pass scopes to the plugin).

    users.broadcasts.create

Connect X (Twitter) to Claude, ChatGPT or Cursor

  1. 1

    Connect X (Twitter) in Corsair

    Sign in to X (Twitter) or add an API key once in Corsair. Corsair stores the credential encrypted and makes the X (Twitter) API calls for your agent, so it never goes into a prompt or a config file. Connect X (Twitter)

    If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs X (Twitter). On a ChatGPT personal plan, connect X (Twitter) here first.

  2. 2

    Add Corsair's MCP server to your agent

    Every client uses the same address:

    https://mcp.corsair.dev/mcp
    Open Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.

    Codex, Antigravity, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client

  3. 3

    Sign in and choose what needs your approval

    Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, X (Twitter)'s read and write operations run right away and its 53 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.

FAQ

Install corsair and @corsair-dev/twitter, add the X (Twitter) plugin, and connect with OAuth or an API key. Then call methods like corsair.twitter.api.account.ensure() from your app. Corsair stores tokens, and syncs data per tenant.

Yes. X (Twitter) supports OAuth or an API key. Use credentials or OAuth scopes that match what you automate. Create them in the X (Twitter) developer console, then paste into Corsair or connect through managed auth in Hub.

Yes. One Corsair client can hit X (Twitter), GitHub, Notion, Stripe, and the rest. Trigger X (Twitter) from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.

Teams use Corsair for read and act on X (Twitter) through the full X API v2: publish and search posts, read timelines, mentions, likes, bookmarks and followers, look up and search users, send and read Direct Messages and encrypted Chat, manage Lists, Spaces, Communities, trends, news, Community Notes, live broadcasts and media uploads, and run usage, compliance and webhook routes (259 operations). Common builds include sync jobs, admin tooling, and agents that call X (Twitter) APIs from your backend. Local DB entities let you query synced X (Twitter) records without hitting the API on every read.

The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per X (Twitter) API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.

We maintain @corsair-dev/twitter in the open repo. When X (Twitter) ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.

No. Corsair does not read your X (Twitter) data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store X (Twitter) data on your behalf.

Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.

Yes. Put X (Twitter) on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 53 destructive X (Twitter) operations. You can change a link's mode at hub.corsair.dev/me.