Skip to main content
Glama
twitterapis

twitterapis

@twitterapis/mcp

npm version npm downloads license

@twitterapis/mcp is the official MCP server for TwitterAPIs, built for developers and AI agents that need Twitter / X data inside Claude, Cursor, Windsurf, VS Code or any MCP client, with no X developer account. Your agent can search tweets, read profiles, timelines, followers, threads and lists, and post, reply, like, retweet or follow from an X account you link. Most reads cost $0.0008 per call, about $0.04 per 1,000 tweets since a call returns about 20, and creating a tweet costs $0.0016. New accounts get $0.50 of free credit with no card. Every tool maps to one REST endpoint at api.twitterapis.com, and the server holds no state.

Install: npx -y @twitterapis/mcp@latest with TWITTERAPIS_KEY from https://www.twitterapis.com/signup

Hosted, sign in instead of pasting a key (Claude Code): claude mcp add --transport http twitterapis https://api.twitterapis.com/mcp

Website: https://www.twitterapis.com/mcp

Quick start

No install needed. Run with npx. You need one thing: an API key (free $0.50 in credits, no card required): twitterapis.com/signup.

Related MCP server: Twitter MCP

Setup

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "twitterapis": {
      "command": "npx",
      "args": ["-y", "@twitterapis/mcp@latest"],
      "env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
    }
  }
}

Restart Claude Desktop. The twitter_* tools appear in the tool picker.

Cursor

~/.cursor/mcp.json (or Settings → MCP → Add New Server):

{
  "mcpServers": {
    "twitterapis": {
      "command": "npx",
      "args": ["-y", "@twitterapis/mcp@latest"],
      "env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "twitterapis": {
      "command": "npx",
      "args": ["-y", "@twitterapis/mcp@latest"],
      "env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
    }
  }
}

VS Code (Copilot / agent mode)

.vscode/mcp.json in your workspace, or the user-level MCP settings:

{
  "servers": {
    "twitterapis": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@twitterapis/mcp@latest"],
      "env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
    }
  }
}

Configuration

Env var

Required

Default

Purpose

TWITTERAPIS_KEY

Yes

(none)

API key from dashboard

TWITTERAPIS_BASE_URL

No

https://api.twitterapis.com

Override the API host

TWITTERAPIS_TIMEOUT_MS

No

30000

Per-request timeout in milliseconds

Tools

120 tools: 71 reads and 49 write actions. Most user endpoints accept username (handle without @) or user_id (twitter_user_likes and twitter_user_tweets_complete require user_id); tweet endpoints accept id or url; paginated endpoints return a cursor you pass back to get the next page. Every data read (except twitter_audience_summary, which always returns its full summary) also takes fields (comma-separated dotted paths to keep, e.g. id,text,author.username; pagination and envelope keys always survive) and compact ("1" for a built-in preset of ids, text, counts and author basics), so a model paying per token can trim a page to what it will read. Four of the reads are free account lookups (twitter_account_me, twitter_account_payments, twitter_feedback_get, twitter_feedback_list); the 14 monitoring tools and twitter_feedback_send are also free (account administration, not metered reads).

Public reads (search, profiles, tweets, followers, likes) work with just your API key. The account-only reads (bookmarks, DMs, home timeline, followers-you-know) and most write actions act AS an authenticated X account, so they need a session linked to your key first (returns HTTP 409 until then). Link a session either by registering your x.com cookies (twitter_customer_session) or by logging in with a username/password (twitter_user_login). Alternatively, pass per-call inline credentials on any of those tools (auth_token + ct0, with optional proxy_url / user_agent) to act AS that account for a single call without pre-registering a session, so one API key can act as many accounts. For write actions, set proxy_url to a residential proxy, since X soft-blocks writes that egress from datacenter IPs. Each write tool is annotated readOnlyHint: false; reversing actions (delete, unfollow, unlike, unretweet, unbookmark, monitor/webhook delete) are annotated destructiveHint: true so MCP clients can prompt before running them. The monitoring and feedback tools (see below) are the exception: they administer your twitterapis.com account, not an X session, so they need only your API key, no linked session and no inline credentials.

Reads

Tool

What it does

twitter_advanced_search

Search tweets with X operators (from:, min_faves:, since:, filter:links, etc.)

twitter_user_search

Find user accounts by name or keyword

twitter_user_info

Full profile by handle (bio, counts, verification, location)

twitter_user_info_by_id

Full profile by numeric user id

twitter_user_status

Is an account alive, suspended, or deleted

twitter_user_about

A user's structured About object (category, professional/business labels, verification + identity-verification flags, joined date, and X's 'About this account' transparency panel)

twitter_user_about_batch

The same About object for up to 100 accounts in one call (usernames or user_ids), billed per account answered; for vetting a list by country or account history

twitter_audience_summary

Who an audience is: a country histogram and likely-bot share over a sample of up to 100 followers or retweeters

twitter_user_affiliates

Accounts affiliated with an organization profile

twitter_check_follow_relationship

Follow relationship between two accounts, by id or username (who follows whom)

twitter_check_follow_relationship_batch

One account against up to 100 others in one call, either direction (which of these accounts follow the brand)

twitter_user_tweets

A user's recent original tweets (replies excluded)

twitter_user_tweets_and_replies

A user's full timeline (tweets + replies)

twitter_user_tweets_complete

A large batch of a user's tweet history per call (see paging note)

twitter_user_media

Images and videos a user has posted

twitter_user_mentions

Recent public tweets mentioning a user

twitter_user_likes

Tweets a user has liked (public Likes tab)

twitter_user_followers

Accounts that follow a user

twitter_user_following

Accounts a user follows

twitter_user_followers_v2

Followers with the v2 response shape (richer fields, deeper cursoring)

twitter_user_following_v2

Following with the v2 response shape (richer fields, deeper cursoring)

twitter_user_verified_followers

A user's verified followers only

twitter_followers_you_know

Followers of a target that your authenticated account also follows

twitter_tweet_detail

Single tweet: text, author, metrics, media, quoted/reply context

twitter_tweet_replies

Replies to a tweet

twitter_tweet_replies_complete

Every reply under a tweet in one call, with an is_complete flag and a resume cursor

twitter_tweet_thread

Full author thread (connected tweet chain by same author), read forward from the tweet you pass, so pass the thread's first tweet

twitter_tweet_retweeters

Accounts that retweeted a tweet

twitter_tweet_quotes

Tweets that quote a tweet, with their text. Search-backed, so count is what search returned, not the tweet's true quote_count

twitter_list_members

Members of a Twitter/X List

twitter_list_followers

Accounts that follow a public List (a different set from its members)

twitter_list_tweets

Posts by a List's members, search-backed: filterable by since / until date, include_replies, and product (Latest / Top), no retweets

twitter_list_timeline

A List's native X feed: retweets and X's own ordering included, no filters, paging only

twitter_home_timeline

Your authenticated account's Home timeline (session)

twitter_bookmarks

Your authenticated account's bookmarks (session)

twitter_blocking

Accounts your authenticated account has blocked (your own list only) (session)

twitter_muting

Accounts your authenticated account has muted (your own list only) (session)

twitter_bookmark_search

Full-text search within your bookmarks (session)

twitter_bookmark_folders

Your authenticated account's bookmark folders (session)

twitter_bookmark_folder_timeline

Tweets inside one of your bookmark folders, by folder_id (session)

twitter_dm_list

Your DM conversations (inbox), read-only (session)

twitter_dm_conversation

Messages in one DM conversation, read-only; pass the previous page's min_entry_id as max_id to page back (session)

twitter_spaces_info

Metadata and participant roster for one X Space, live or ended (by Space id)

twitter_community_search

Find X Communities by keyword; the discovery step that produces the numeric id the rest of the community family needs

twitter_community_info

One X Community by numeric id: name, counts, join policy, rules, topic, banners, admin

twitter_community_about

A community's moderators and a member preview, each returned as a full user profile, not the reduced row _members/_moderators return

twitter_community_members

A community's member roster, each row carrying that member's Admin / Moderator / Member role

twitter_community_moderators

A community's moderators and admins, from its own upstream operation (not a filter over the roster)

twitter_community_tweets

A community's post timeline, with the pinned post returned as its own pinned field

twitter_community_memberships

The inverse lookup: every community a given numeric user_id belongs to

twitter_creator_commentary_video

Who posts native video about a topic: one search page grouped by author and ranked by video posts, then median and total views, with up to three top post ids per creator

twitter_grok_chat

Ask X's own Grok, grounded in live X data, and get the answer plus the sources it cited

twitter_grok_chat_submit

Start the same Grok chat as a background job and get a job_id at once, for clients that stop waiting before a long answer

twitter_grok_chat_result

Read a submitted Grok chat by job_id: pending, the finished answer, or the error

twitter_grok_config

Whether the authenticated account can use Grok, and which models it may pick

twitter_trends

Current top trends for a location (by country or woeid) an X Explore tab (by category), or only the trends X labels Business and finance (category=business_and_finance)

twitter_trends_locations

Every location X has trends for, each with its WOEID

twitter_account_me

Your twitterapis.com account: credits, usage, email (free)

twitter_account_payments

Your twitterapis.com payment history (free)

twitter_media_status

Processing state of an uploaded media_id; an uploaded image has no processing step and is usable at once (session)

twitter_article_get

Read a published article's full content via its announcement tweet id/url (public, no session)

twitter_article_list

List your own articles, filtered by lifecycle (draft or published) (session)

Write actions (require a linked X session)

Tool

What it does

twitter_create_tweet

Post a tweet; set reply_to to reply or quote to quote-tweet

twitter_delete_tweet

Delete one of your tweets (irreversible)

twitter_favorite_tweet / twitter_unfavorite_tweet

Like / unlike a tweet

twitter_pin_tweet / twitter_unpin_tweet

Pin one of your own tweets to the top of your profile (replaces any existing pinned post) / unpin it

twitter_retweet / twitter_unretweet

Retweet / undo retweet

twitter_bookmark_tweet / twitter_unbookmark_tweet

Bookmark / remove bookmark

twitter_follow_user / twitter_unfollow_user

Follow / unfollow a user by user_id or username (exactly one)

twitter_dm_send

Send a Direct Message to a user by their numeric recipient_id

twitter_list_create

Create a Twitter/X List owned by your session (name, optional description / is_private)

twitter_list_add_member / twitter_list_remove_member

Add / remove one account on a List you own; member_count comes back as proof the write landed

twitter_community_join / twitter_community_leave

Join / leave an X Community by numeric community_id. A community that needs moderator approval answers 409 join_requires_approval and nothing is submitted; refusals are not billed

twitter_media_upload

Upload a base64 image, returns a media_id for twitter_create_tweet

twitter_update_profile

Change your own name, bio, location or link. A PARTIAL update: omitted fields keep their values, an empty string clears one

twitter_update_avatar

Replace your own profile picture. Takes base64 image bytes in image, not a URL and not a media_id. No undo, and X keeps no history

twitter_update_banner

Replace your own header image. Takes base64 image bytes in banner, not a URL and not a media_id. No undo, and X keeps no history

Drafts and scheduled posts (require a linked X session)

A draft is private and never posts. A scheduled post will publish publicly at its execute_at unless you cancel it first. Both lists read only your own account.

Tool

What it does

twitter_draft_create

Save a private draft on your account; nothing is posted

twitter_draft_edit

Replace one draft's contents by id; the fields you send become the draft

twitter_draft_delete

Delete a draft by id; it was never public, so nothing is retracted

twitter_draft_list

List your drafts, each with text and thread_truncated

twitter_scheduled_create

Schedule a post for a future execute_at in epoch seconds, not milliseconds

twitter_scheduled_delete

Cancel a pending scheduled post before it sends

twitter_scheduled_list

List your pending queue; execute_at comes back in epoch seconds

Both list tools can return partial: true, which means X's answer was read but not fully understood. It is not the same as an empty list: on a clean read the flag is absent entirely, so an empty array with no partial means you genuinely have nothing queued or drafted.

Articles (X's long-form "Notes" feature; writes require a linked X session)

Tool

What it does

twitter_article_create

Start a new draft article, returns its id

twitter_article_update_title

Set a draft article's title (a published article answers 422 article_published, not billed)

twitter_article_update_cover_media

Attach an already-uploaded image as a draft article's cover (media_id from twitter_media_upload; a published article answers 422 article_published, not billed)

twitter_article_update_content

Replace a draft article's body (Draft.js content_state you build; a published article answers 422 article_published, not billed)

twitter_article_publish

Publish a draft, posting a real public announcement tweet (not fully reversible). Optional caption becomes the announcement post's text; audience and reply_control accept only Everyone

twitter_article_unpublish

Revert a published article to draft (leaves the announcement tweet up)

twitter_article_delete

Delete an article (draft: hard delete; published: unpublish + delete the announcement tweet), irreversible

See also twitter_article_get and twitter_article_list above.

Monitoring (webhook delivery of new posts; free, not metered)

Watch an X account for new posts and get them pushed to your own HTTPS endpoint, HMAC-signed, instead of polling. Register a webhook first, then create a monitor; every new post from a watched handle is delivered to every active webhook on your account (or a restricted subset via webhook_ids). Monitor/webhook CRUD is account administration, not a metered Twitter read, so every tool below is free.

Tool

What it does

twitter_monitor_create

Start watching an X account (handle) for new posts

twitter_monitor_list

List every monitor on your account

twitter_monitor_update

Pause/resume a monitor or change its webhook_ids restriction

twitter_monitor_delete

Stop and remove a monitor (irreversible)

twitter_monitor_health

One monitor's status, degradation flag, poll interval, cursor position

twitter_monitor_account_health

Account-wide rollup: service status, active/paused monitor counts, 24h delivery outcome counts, one call

twitter_monitor_deliveries

Recent delivery events across every monitor, with detection + delivery latency

twitter_x_user_stream_add_user

Compat drop-in for twitter_monitor_create using an x_user_stream-shaped envelope

twitter_x_user_stream_remove_user

Compat drop-in for twitter_monitor_delete using an x_user_stream-shaped envelope

twitter_x_user_stream_list_users

Compat drop-in for twitter_monitor_list using an x_user_stream-shaped envelope

twitter_monitor_webhook_create

Register an HTTPS delivery URL; returns the HMAC signing secret once

twitter_monitor_webhook_list

List every webhook registered on your account

twitter_monitor_webhook_delete

Soft-delete a webhook by id (irreversible from the caller's side)

twitter_monitor_webhook_test

Send one signed test event to a webhook right now, synchronously

twitter_monitor_webhook_redrive

Replay deliveries that dead-lettered while your endpoint was down, oldest first

Feedback (report a bug or a gap to the twitterapis.com team without leaving your session; free)

Modelled on Claude Code's own feedback tool. When a call fails in a way that is not your key, credits, session or a rate limit, when you ask for something no tool covers, or when a result is plainly wrong, the model can draft a report into a local queue (~/.twitterapis/feedback-queue.json, at most 10 drafts, override the directory with TWITTERAPIS_FEEDBACK_DIR). Nothing is sent until you ask to review the queue and name the drafts to send. Each report carries the last failing call's endpoint, status and request id, your client name and this package's version, so the team can act on it without a follow-up. Use twitter_feedback_get with the returned server id to see whether it was triaged, shipped or declined.

Tool

What it does

twitter_feedback_send

action: "draft" (default) queues a report locally and sends nothing; "list" shows the queue; "send" posts only the drafts you name to POST /feedback; "discard" drops them

twitter_feedback_get

Read a sent report's status (new, triaged, shipped, declined) and the team's response

twitter_feedback_list

List the reports this account has already sent, newest first, with status/type filters and a cursor to page

Session setup

Link an X account to your key once, so the account-only reads and write actions act as it (or pass per-call auth_token/ct0 instead).

Tool

What it does

twitter_customer_session

Register your x.com session cookies (auth_token + ct0) against your key

twitter_customer_session_status

Read back the registered session without changing it: resolved account, live/dead status, timestamps, and which egress tier a write would use. Never returns the cookies. Free

twitter_customer_session_delete

Revoke that stored session, deleting your auth_token + ct0 from the service. Idempotent and free

twitter_user_login

Log in with username + password (+ totp_secret for 2FA); stores the session against your key. Returns a confirmation, never the cookies

Playbooks and provenance

Besides tools, the server exposes MCP resources. A client lists them with resources/list and fetches one with resources/read, so nothing here costs context until it is asked for, and none of it costs credits.

Playbooks

Short recipes an agent runs with the tools above.

URI

What it covers

playbook://launch-day-monitor

Watching a launch in near real time: monitor and webhook setup before, true counts and amplifiers during, amplifier profiles after

playbook://competitor-follower-outreach

Turning another account's followers into a qualified list, then contacting them from your linked account

playbook://account-audit

A reproducible read of one account: identity, output mix, reach, engagement, and which numbers share an observation window

playbook://link-x-account

The linking sequence: read the current state, pick a route, the login's timing ceiling, the outcomes that need attention on x.com, and what a session unlocks

playbook://residential-egress

Outbound address control: the three places a proxy URL attaches, what a URL has to be, and how to read back which source is in force

Provenance

provenance://tool/{tool_name} returns, as JSON, where a row you already hold came from: the REST endpoint and method behind it, read or write, whether the call ran as your linked X account or on the API key alone, the per-call price, and the docs URL.

provenance://tool/twitter_advanced_search
{
  "tool": "twitter_advanced_search",
  "endpoint": "GET /twitter/tweet/advanced_search",
  "kind": "read",
  "destructive": false,
  "served_by": "the API key alone (a public read, no linked account)",
  "cost": "$0.0008 per call",
  "docs": "https://docs.twitterapis.com/docs/reference/search/tweet-advanced-search"
}

Row-level upstream provenance (when the service read it from X, whether an upstream cache answered, which account read it) is not in any response this package receives, so it is absent rather than guessed.

Blocked calls answer with the next steps

A call blocked on a missing key, a rejected key, an empty balance or a missing X session returns a structured payload (in structuredContent and appended to the text) carrying an ordered steps list, what resolving it unlocks, and, for the session case, the playbook URI and the outcomes a retry cannot fix.

Usage examples

"Find the most popular tweets about AI agents posted this week"

The agent calls twitter_advanced_search with:

query: "AI agents min_faves:200 since:2024-01-01"
product: "Top"
count: 20

Pull a user's recent posts

"Get the last 10 tweets from @sama"

The agent calls twitter_user_tweets with:

username: "sama"
count: 10

Read a full thread

"Get the full thread for this tweet: https://x.com/karpathy/status/1849....."

The agent calls twitter_tweet_thread with:

url: "https://x.com/karpathy/status/1849....."

The thread is read forward from the tweet you pass, so the URL should be the thread's first tweet. If you hold a later tweet, read its conversation_id with twitter_tweet_detail and pass that id instead; a later tweet returns only the tail.

Paginate through followers

"List the first 100 followers of @openai, then the next 100"

First call, twitter_user_followers: { username: "openai", count: 100 } Second call, pass back the cursor from the first response: { username: "openai", count: 100, cursor: "<cursor from response>" }

Paging twitter_user_tweets_complete

"Pull @elonmusk's whole tweet history"

twitter_user_tweets_complete auto-paginates server-side and returns a large batch per call, but it does not guarantee the full history in one call. Read the result like this:

  • next_cursor is the completion signal, not count. Non-null means the history is truncated and more remains. Null means it is genuinely exhausted. The response also carries has_more, the same signal as a boolean.

  • max is a minimum target, not a cap. Pages arrive in whole chunks, so a response may hold up to one page (<=100) more than requested. Live behaviour: max=10 returned 20, max=50 returned 60, max=150 returned 161, and omitting max (server default 200) returned 201. Never assume count === max.

  • Each call also has a server-side wall-clock budget, so a response can be truncated even when it returned fewer tweets than requested. That is the second reason count cannot tell you whether you are done.

  • Billing is a flat $0.0024 per call, regardless of how many tweets come back, so fewer large calls cost less than many small ones.

To resume, pass the next_cursor straight back in as cursor and repeat until it comes back null:

First call, twitter_user_tweets_complete: { user_id: "44196397", max: 800 } Then, while next_cursor is non-null: { user_id: "44196397", max: 800, cursor: "<next_cursor from previous response>" }

Monitor brand mentions

"Show me recent tweets mentioning @twitterapis"

The agent calls twitter_user_mentions with:

username: "twitterapis"
count: 50

Troubleshooting

HTTP 401 (invalid or missing API key) Check that TWITTERAPIS_KEY is set correctly in your MCP client config and matches the key shown in your dashboard.

HTTP 402 (insufficient credits) Top up at twitterapis.com/dashboard. Your first $0.50 is free at signup.

HTTP 403 (access forbidden) The account or tweet may be private/protected, or your plan does not include this endpoint.

HTTP 404 (not found) The user, tweet, or list may have been deleted, suspended, or the id/handle is wrong.

HTTP 429 (rate limited) Wait a few seconds and retry. If you hit this frequently, add "TWITTERAPIS_TIMEOUT_MS": "60000" to your env config and space out bulk requests.

Request failed: timed out after 30000ms The default timeout is 30 s. For large paginated fetches set TWITTERAPIS_TIMEOUT_MS to a higher value (e.g. 60000).

Tools do not appear in Claude / Cursor Ensure npx is on your PATH and Node.js 18+ is installed (node --version). Check MCP client logs for startup errors.

Pricing

Calls are billed to your twitterapis.com account, at the price each tool's description states. The standard rate is $0.0008 per call: nearly every read (search, profiles, timelines, followers, likes, lists, bookmarks, articles) and the simple write actions (like, pin, retweet, bookmark, follow, list membership and their undos, delete). At that rate 1,000 tweets cost about $0.04, since a call returns about 20 tweets. The account, feedback and monitoring tools are free, and so is registering, checking or revoking a session from your own cookies. Checking Grok eligibility with twitter_grok_config is free too. Every tool priced differently from the standard rate:

Price

Tools

$0.0008 per billed item

twitter_user_about_batch (per account answered, so one 100-account call costs up to $0.08), twitter_check_follow_relationship_batch (per pair answered), twitter_audience_summary (per sample page plus per sampled account answered)

$0.0016 per call

Posting: twitter_create_tweet, twitter_list_create. DMs: twitter_dm_send, twitter_dm_list, twitter_dm_conversation. Profile: twitter_update_profile, twitter_update_avatar, twitter_update_banner. Drafts and scheduled posts, the two list reads included: twitter_draft_create, twitter_draft_edit, twitter_draft_list, twitter_scheduled_create, twitter_scheduled_list. Article edits: twitter_article_create, twitter_article_update_title, twitter_article_update_cover_media, twitter_article_update_content, twitter_article_publish, twitter_article_unpublish

$0.0024 per call

twitter_user_tweets_complete, twitter_tweet_replies_complete (flat per call, however many tweets or pages come back)

$0.004 per call

twitter_tweet_thread, twitter_grok_chat

$0.01 per call

twitter_user_login (logging in with a username and password)

twitter_grok_chat_submit and twitter_grok_chat_result are free calls. The Grok chat price is charged once, on the poll that first delivers the finished answer, and a job that fails or is never collected costs nothing. Deleting a draft or a scheduled post, and reading, listing or deleting an article, stay at the standard $0.0008 per call. Your first $0.50 is free. See twitterapis.com/pricing.

FAQ

Do I need an X developer account? No. One TwitterAPIs key covers every tool.

What do 1,000 tweets cost? About $0.04. Standard reads bill $0.0008 per call and a call returns about 20 tweets.

Can my agent post or send DMs? Yes, from an X account you link to your key. Undo actions such as delete and unfollow are marked destructive, so your client can ask before running them.

Is it read-only? No. 71 read tools work with just your API key; 49 write actions (post, save or schedule a post, like, pin, retweet, follow, DM, media upload, profile name/bio/avatar/banner updates, List create/add member/remove member, community join/leave, article create/edit/publish/delete, monitor/webhook create/update/delete, feedback send) act as a linked X account or per-call inline credentials, except monitor/webhook CRUD and feedback, which are account administration and need only your API key.

Which clients are supported? Claude Desktop, Cursor, Windsurf, and VS Code (Copilot agent mode), or any Model Context Protocol client.

How is it billed? Per request. New keys start with $0.50 in free credits, no card required. See pricing.

Does it store my key or data? No. The server holds no state and forwards your API key on each call.

Maintainers

src/tools.js is generated. Do not edit it. The catalog is built at build time from two committed inputs:

  • test/openapi.snapshot.json, a vendored copy of the published OpenAPI spec, which supplies the structure: which endpoints exist, which parameters each accepts, whether a parameter is required, and its type.

  • scripts/tools.overrides.mjs, hand-authored, which supplies everything the spec cannot express: the tool and argument descriptions a model reads to decide how to call a tool, the cross-field rules ("provide exactly one of username or user_id"), the per-call credential arguments that travel as x-* headers, and the write / destructive / JSON-body flags. Each description's Cost: sentence and Docs: link are derived from the spec.

Descriptions state product facts only: what a tool returns, takes and costs. They never name another tool and never instruct the model; guidance on which tool to use when, how one tool's output feeds another, and when to draft feedback lives in the server instructions (INSTRUCTIONS in src/server.js). test/description-compliance.mjs enforces this on every tool and parameter description a client lists, in both the stdio and hosted modes.

The spec is vendored on purpose. Nothing is fetched at install time or at server boot, so the published package is a fixed artifact rather than one that depends on a hostname still answering.

npm run openapi:refresh   # re-vendor the spec, prints the route diff
npm run build             # regenerate src/tools.js
npm test                  # gates, incl. "src/tools.js matches the generator"

npm test fails if src/tools.js was hand-edited or left stale, if the catalog and the live spec disagree, if the tool list and this README disagree, or if a description carries a model instruction, another tool's name, or hidden text (npm run check:description-compliance).

License

MIT

Available Tools

94 tools
twitter_account_meA
Read-only
Inspect

Get YOUR twitterapis.com account details: email, name, credits remaining, credits used, total requests made, and account creation date. Authenticated by your API key. This is an account read, not Twitter data, and is free (it does not spend credits).

Inputs: no named parameters.

twitter_account_paymentsA
Read-only
Inspect

Get YOUR twitterapis.com payment history: the list of top-ups and charges on your account. Authenticated by your API key. This is an account read, not Twitter data, and is free (it does not spend credits).

Inputs: no named parameters.

twitter_article_createAInspect

Start a new DRAFT article ('Note') AS your authenticated account. No input required. Returns the new article's id (pass this to twitter_article_update_title / twitter_article_update_content / twitter_article_publish / twitter_article_delete) and its full article object. Requires an authenticated session with write capability behind your key.

Inputs: ct0, proxy_url, auth_token, user_agent.

twitter_article_deleteA
Destructive
Inspect

Delete an article AS your authenticated account. A DRAFT is hard-deleted outright; a PUBLISHED article is unpublished first and then its announcement tweet is deleted too, so this is the one op that fully removes a published article's public footprint (compare twitter_article_unpublish, which leaves the tweet up). Irreversible. lifecycle and tweet_id are optional fast-path hints (read them off a prior twitter_article_create or twitter_article_list response): when omitted, the server figures out the lifecycle itself by scanning your own Draft then Published articles, which costs an extra round trip. Requires an authenticated session with write capability behind your key. Returns ok/deleted and the id you targeted.

Inputs: id (required), ct0, tweet_id, lifecycle, +3 more.

twitter_article_getA
Read-only
Inspect

Read an article's full content (title, content_state, cover media, author, timestamps, public_url). Two mutually exclusive forms. PUBLIC: provide id or url of the article's announcement tweet, no registered session or per-call credentials needed, just your API key, same auth model as twitter_tweet_detail, works for PUBLISHED articles only. OWNER-ONLY: provide article_id (the article's own entity id, from twitter_article_create or twitter_article_list), requires an authenticated session, also reaches your own Drafts, which have no announcement tweet the public form could resolve. Returns 404 (article null) if not found, not visible, or (article_id form) not owned by the calling account.

Inputs: id, ct0, url, proxy_url, +3 more.

twitter_article_listA
Read-only
Inspect

List YOUR OWN articles (drafts or published) AS your authenticated account, most recent first. X exposes no combined view, so this filters to ONE lifecycle per call: pass lifecycle='published' to list published articles, omit it (or pass 'draft') for drafts. Requires an authenticated session behind your key. Returns count, next_cursor (pass it back as cursor to fetch the next page; null/absent means no more pages), and the page of article objects.

Inputs: ct0, count, cursor, lifecycle, +3 more.

twitter_article_publishAInspect

Publish a DRAFT article AS your authenticated account, transitioning it to Published and posting a REAL, PUBLIC announcement tweet that your followers and anyone with the link can see. WARNING: this is a genuinely consequential, hard-to-fully-undo action, it is not like saving a draft. twitter_article_unpublish reverts the article to Draft but LEAVES the announcement tweet up; only twitter_article_delete on a published article unpublishes AND removes the announcement tweet, and by then the content was already public for however long it stayed up. Confirm with the caller before publishing unless they have clearly asked for it. Provide the article's id; audience and reply_control default to 'Everyone' when omitted; caption is an optional short (<=256 character) caption for the announcement tweet. Requires an authenticated session with write capability behind your key. Returns the updated (Published) article object.

Inputs: id (required), ct0, caption, audience, +4 more.

twitter_article_unpublishA
Destructive
Inspect

Revert a PUBLISHED article back to Draft AS your authenticated account. The announcement tweet the publish posted is LEFT IN PLACE, still publicly visible, use twitter_article_delete instead if you also want that tweet removed. X refuses this with an 'invalid_lifecycle' error if the article is not currently Published. Requires an authenticated session with write capability behind your key. Returns the updated (Draft) article object.

Inputs: id (required), ct0, proxy_url, auth_token, +1 more.

twitter_article_update_contentAInspect

Replace the body content of a DRAFT or PUBLISHED article AS your authenticated account. Provide the article's id and content_state: Draft.js JSON ({ blocks: [...], entityMap: [...] }) that YOU build and pass through verbatim, this tool does not construct or validate it. Requires an authenticated session with write capability behind your key. Returns the updated article object.

Inputs: id (required), content_state (required), ct0, proxy_url, +2 more.

twitter_article_update_cover_mediaAInspect

Attach an ALREADY-UPLOADED image as the cover of a DRAFT or PUBLISHED article, AS your authenticated account. This does NOT upload: call twitter_media_upload first and pass the media_id it returns. Provide the article's id (from twitter_article_create or twitter_article_list). Requires an authenticated session with write capability behind your key. Returns the updated article object with cover_media populated.

Inputs: id (required), media_id (required), ct0, proxy_url, +3 more.

twitter_article_update_titleAInspect

Set or replace the title of a DRAFT or PUBLISHED article AS your authenticated account. Provide the article's id (from twitter_article_create or twitter_article_list) and the new title. Requires an authenticated session with write capability behind your key. Returns the updated article object.

Inputs: id (required), title (required), ct0, proxy_url, +2 more.

twitter_blockingA
Read-only
Inspect

List the accounts YOUR authenticated account has BLOCKED, as full user objects, cursor-paginated. Requires an authenticated session behind your key. There is no user_id argument: X provides no way to read another account's block list, so this reads yours only. An empty users array is a real answer meaning you block nobody, never a silent failure, because the endpoint returns an error status rather than an empty page when it cannot read the list.

Inputs: ct0, count, cursor, proxy_url, +2 more.

twitter_bookmark_foldersA
Read-only
Inspect

List YOUR authenticated account's bookmark FOLDERS (X's internal name: collections), the named groups you can organize saved tweets into, separate from your flat bookmarks list (twitter_bookmarks). Requires an authenticated session behind your key. Returns each folder's id, name, and a cover image. Takes no arguments; your folders resolve from your session alone. Use twitter_bookmark_folder_timeline with a folder's id to read the tweets inside it.

Inputs: ct0, proxy_url, auth_token, user_agent.

twitter_bookmark_folder_timelineA
Read-only
Inspect

Read the tweets inside ONE of your authenticated account's bookmark folders, identified by folder_id (from twitter_bookmark_folders). Requires an authenticated session behind your key. Cursor-paginated; there is no count/page-size argument for this op.

Inputs: folder_id (required), ct0, cursor, proxy_url, +2 more.

twitter_bookmarksA
Read-only
Inspect

List YOUR authenticated account's bookmarked tweets, most recent first. Requires an authenticated session behind your key. Returns each bookmarked tweet with author and metrics plus a cursor.

Inputs: ct0, count, cursor, proxy_url, +2 more.

twitter_bookmark_tweetAInspect

Bookmark a tweet to YOUR authenticated account's private bookmarks. Provide the tweet id or url. Requires write capability behind your key. Reverse with twitter_unbookmark_tweet.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_check_follow_relationshipA
Read-only
Inspect

Check the follow relationship between two accounts by numeric user id: whether the source follows the target, whether the target follows the source, blocking/muting flags where available. Both ids are required. Use this to verify a follow before/after a follow action, or to detect mutuals.

Inputs: source_user_id (required), target_user_id (required).

twitter_community_aboutA
Read-only
Inspect

The About tab for one X Community: its moderators, and a preview of its members, both returned as FULL user profiles with bio, follower and following counts, tweet counts, location, website, banner and join date. twitter_community_members and twitter_community_moderators return a reduced row instead, so this is the endpoint that answers who runs a community in one call rather than one call plus a profile lookup per person. Use twitter_community_info instead for the community's own metadata (name, description, rules, join policy); this endpoint is about the PEOPLE, not the community object.

Inputs: community_id (required).

twitter_community_infoA
Read-only
Inspect

Get the metadata for one X Community by its numeric id: name, description, member_count, moderator_count, join_policy, invites_policy, the join question, primary topic, search tags, the posted rules, both the custom and the default banner plus a resolved banner_url, the permalink, the admin and creator profiles, and the facepile member ids. The community id is the digits in a x.com/i/communities/ URL. IMPORTANT: role, can_join, is_pinned and viewer_relationship_type are ALWAYS null here and that is deliberate, not an error, because they describe the account that made the call and this is a pooled read served by a rotating account. rules[].description is also always null: X sends only the rule id and name on this payload. Use twitter_community_members for the roster and twitter_community_tweets for the posts.

Inputs: community_id (required).

twitter_community_membersA
Read-only
Inspect

List the member roster of an X Community, cursor-paginated, with each row carrying that member's own role in the community: 'Admin', 'Moderator' or 'Member'. Rows are { user, role }. The user object is deliberately REDUCED (id, username, name, profile_image_url, is_blue_verified, verified, is_protected) because X's roster operation sends no bio, no follower or following counts and no created_at; call twitter_user_info with an id when the full profile is needed. Note that the role on a member ROW is NOT caller-relative and is returned in full, unlike the role field on the community object itself. Admins and moderators are interleaved through this list at arbitrary positions, so do NOT derive a moderator list by filtering the first page: use twitter_community_moderators. Paging is a bare next_cursor with no total count from X; stop when members comes back empty or has_more is false.

Inputs: community_id (required), count, cursor.

twitter_community_membershipsA
Read-only
Inspect

The INVERSE community lookup: given a numeric X USER id, list the communities that account belongs to, cursor-paginated. Every other community tool starts from a community; this one starts from an account, which makes it the tool for profiling which audiences a person sits inside. Each row is the FULL community object (the same shape twitter_community_info returns, with member counts, rules, topic, policies, admin and creator), so no follow-up call per community is needed. Takes a numeric user id ONLY, not a @handle: resolve a handle with twitter_user_info first, because resolving it here would silently cost a second call. An EMPTY communities array is a real, successful answer (the account is in no communities), not a not-found. As on twitter_community_info, role / can_join / is_pinned / viewer_relationship_type are always null on every community returned, because this is a pooled read.

Inputs: user_id (required), count, cursor.

twitter_community_moderatorsA
Read-only
Inspect

List the moderators and admins of an X Community, cursor-paginated, in the same { user, role } row shape twitter_community_members returns (the array is also called members, deliberately, so the two cannot drift apart). This is a SEPARATE upstream operation, not a filter over the member roster, and that matters for correctness: moderators sit at arbitrary positions inside the full roster, so filtering one page of twitter_community_members would return 'the moderators among the first 20 members' while looking like a complete answer. Read each row's role rather than assuming every row is a Moderator, since admins appear here too. Paging is a bare next_cursor with no total count from X.

Inputs: community_id (required), count, cursor.

twitter_community_tweetsA
Read-only
Inspect

Read an X Community's own post timeline, cursor-paginated as full tweet objects, with the community's PINNED post returned as its own separate 'pinned' field rather than as an item inside 'tweets'. That split is not cosmetic: X delivers the pinned post under a different timeline instruction and does not repeat it in the feed, so a client that iterates only 'tweets' silently loses it, and it is very often the community's rules post, the single most useful item in the response. To build one flat list, read 'pinned' first if non-null, then 'tweets' (the pinned post is excluded from 'tweets', so there is no duplicate). ranking_mode is a REAL upstream parameter, not a local sort. Use twitter_advanced_search instead when the search should span all of X rather than one community.

Inputs: community_id (required), count, cursor, ranking_mode.

twitter_create_tweetAInspect

Post a new tweet AS your authenticated account. Set reply_to to post a reply, or quote to post a quote-tweet. This publishes publicly and is not silently reversible (use twitter_delete_tweet to remove it). Requires an authenticated session with write capability behind your key. Returns the new tweet_id and url.

Inputs: text (required), ct0, quote, reply_to, +4 more.

twitter_customer_sessionAInspect

Register YOUR OWN X account session against your API key, so the authenticated-account tools (twitter_home_timeline, twitter_bookmarks, twitter_dm_list, twitter_dm_conversation, twitter_user_likes, twitter_article_list) and the write tools (twitter_create_tweet, twitter_dm_send, twitter_follow_user, twitter_favorite_tweet, twitter_retweet, twitter_media_upload, twitter_article_create, twitter_article_update_title, twitter_article_update_content, twitter_article_publish, twitter_article_unpublish, twitter_article_delete) act as your account. Provide your x.com session cookies auth_token and ct0 (copy them from a logged-in browser); optionally a user_agent and a residential proxy_url. The cookies are stored server-side against your key and are never returned. Returns ok, the resolved username, and whether the session validated live. Prefer twitter_user_login if you would rather pass a username/password than raw cookies. Most tools also accept auth_token/ct0 per-call without registering.

Inputs: ct0 (required), auth_token (required), proxy_url, user_agent.

twitter_customer_session_deleteAInspect

Revoke the X account session you registered with twitter_customer_session, deleting the stored auth_token and ct0 from twitterapis.com. Self-serve, no ticket and no human in the loop. Scoped to your own API key by construction: it takes no account identifier of any kind, so it cannot reach another key's session. Idempotent and free: revoking twice, or revoking when nothing was stored, still returns ok with deleted=false, and it costs no credits, so a key that is out of balance can still delete its credentials. After this, the authenticated-account tools (twitter_home_timeline, twitter_bookmarks, twitter_dm_list, twitter_dm_conversation, twitter_user_likes) and the write tools stop acting as that account until you register again. IMPORTANT: this deletes the stored copy only. It does NOT log the account out of x.com, so to invalidate the cookies themselves, also revoke the session from your X account settings.

Inputs: no named parameters.

twitter_delete_tweetA
Destructive
Inspect

Delete a tweet AS your authenticated account. Irreversible: the tweet is permanently removed. You can only delete tweets your authenticated account authored. Provide the tweet id or url. Requires write capability behind your key.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_dm_conversationA
Read-only
Inspect

Get the messages in one Direct Message conversation by its conversation_id (from twitter_dm_list). Requires an authenticated session behind your key. Returns each message with sender id, time, and text. Read-only: this does not send DMs.

Inputs: conversation_id (required), ct0, proxy_url, auth_token, +1 more.

twitter_dm_listA
Read-only
Inspect

List YOUR authenticated account's Direct Message conversations (inbox), each with the participant and a conversation_id you can pass to twitter_dm_conversation. Requires an authenticated session behind your key. Read-only: this does not send DMs.

Inputs: ct0, proxy_url, auth_token, user_agent.

twitter_dm_sendAInspect

Send a Direct Message AS your authenticated account. Provide the recipient's numeric user id (recipient_id, resolve a @handle with twitter_user_info first) and the message text. Requires an authenticated session with write capability behind your key; X soft-blocks writes from datacenter IPs, so route through a residential proxy_url for reliability. Returns message_id and conversation_id. Delivers a real DM and is not silently reversible.

Inputs: text (required), recipient_id (required), ct0, proxy_url, +2 more.

twitter_favorite_tweetAInspect

Like (favorite) a tweet AS your authenticated account. Provide the tweet id or url. Requires write capability behind your key. Reverse with twitter_unfavorite_tweet.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_followers_you_knowA
Read-only
Inspect

List the 'Followers you know' for a target user id: the followers of that account that YOUR authenticated account also follows (mutual-connection overlap). Requires an authenticated session behind your key. Returns profile data per overlap account plus a cursor.

Inputs: user_id (required), ct0, count, cursor, +3 more.

twitter_follow_userAInspect

Follow a user AS your authenticated account, by numeric user_id. Requires write capability behind your key. Reverse with twitter_unfollow_user.

Inputs: user_id (required), ct0, proxy_url, auth_token, +1 more.

twitter_grok_chatAInspect

Ask X's own Grok a question AS your authenticated account, and get ONE complete JSON reply with the answer plus the sources it cited. Unlike a general LLM, Grok reads X in real time, so it can answer about what is being said right now, and passing a bare tweet or status URL as the message returns a structured summary of that post. Returns answer text, citations (url, title, snippet) merged and de-duplicated across every search Grok ran, the searches themselves, and the model that ACTUALLY answered (which can differ from the one you asked for). Buffered, not streamed. STATELESS: nothing is stored, so to continue a conversation pass the prior turns back in messages[] along with conversation_id. Requires an authenticated session for the acting account.

Inputs: ct0, mode, message, messages, +5 more.

twitter_grok_configA
Read-only
Inspect

Check whether the authenticated account can use Grok, and which models it may pick. Returns eligibility, X's own reasons when it is NOT eligible (passed through verbatim, since we cannot know X's policy), whether free access is enabled, and the available model options. Eligibility is a property of the X ACCOUNT rather than of the API key, so ask this about the same account you intend to run twitter_grok_chat as. Free.

Inputs: ct0, proxy_url, auth_token, user_agent.

twitter_home_timelineA
Read-only
Inspect

Get YOUR authenticated account's Home timeline (the 'Following'/'For you' feed), most recent first. Requires an authenticated session behind your key. Returns tweets with author and metrics plus a cursor. Use this to read what your account would see when it opens X.

Inputs: ct0, count, cursor, proxy_url, +2 more.

twitter_list_add_memberAInspect

Add one account to a Twitter/X List that YOUR registered X session owns, by numeric list id and numeric user id. Use it to curate a List from code, for example adding each speaker at a conference to a List as they are announced. Returns ok, action, list_id, user_id, the List's member_count read back from X after the write, and the full list object. Read member_count to confirm the change landed: it is null when X returned no list object at all, which is itself the not-applied signal. A write that does not apply (the account is already a member, the List is not yours) comes back with the SAME field layout plus a 422 and a machine-readable reason, and is not billed. Reverse with twitter_list_remove_member.

Inputs: list_id (required), user_id (required), ct0, proxy_url, +2 more.

twitter_list_createAInspect

Create a new Twitter/X List owned by YOUR registered X session, with a name and an optional description and privacy flag. This is the starting point for building a List from code: create it here, then fill it with twitter_list_add_member using the list id this returns. Returns ok, action, the new list_id, member_count, and the full list object X returned. A List is PUBLIC unless you explicitly ask for a private one, and a private List is not readable by the public List read tools (twitter_list_members, twitter_list_tweets, twitter_list_timeline).

Inputs: name (required), ct0, proxy_url, auth_token, +3 more.

twitter_list_followersA
Read-only
Inspect

Fetch a public List's followers by its numeric id, cursor-paginated. Followers and members are different sets of people: members are the accounts the List owner added to it, followers are the accounts that subscribed to read it. A List with hundreds of members commonly has only a handful of followers, so a small count here is normal and is not a truncated page. Use twitter_list_members for the member roster instead.

Inputs: list_id (required), count, cursor.

twitter_list_membersA
Read-only
Inspect

List the members of a Twitter/X List by its numeric list id. Returns profile data for each member. Paginate with cursor. Use this to enumerate curated account sets, including competitor lists, industry watchlists, or media outlet lists. The list_id appears in the X.com list URL (x.com/i/lists/<list_id>).

Inputs: list_id (required), count, cursor.

twitter_list_remove_memberA
Destructive
Inspect

Remove one account from a Twitter/X List that YOUR registered X session owns, by numeric list id and numeric user id. Use it to prune a curated List, for example dropping accounts that have gone quiet. Returns ok, action, list_id, user_id, the List's member_count read back from X after the write, and the full list object. Read member_count to confirm the removal landed: it is null when X returned no list object at all, which is itself the not-applied signal. A write that does not apply (the account was never a member, the List is not yours) comes back with the SAME field layout plus a 422 and a machine-readable reason, and is not billed. Reverse with twitter_list_add_member.

Inputs: list_id (required), user_id (required), ct0, proxy_url, +2 more.

twitter_list_timelineA
Read-only
Inspect

Read a public Twitter/X List's NATIVE feed, the same posts and the same ordering the List shows on x.com, including members' retweets. It takes only list_id, count and cursor: no date range and no reply filter exist on this endpoint, because a native timeline cannot honour search operators. Use twitter_list_tweets when you need a date range or want replies filtered out, and accept that it drops retweets in exchange. Paginate with cursor until the tweets array comes back empty.

Inputs: list_id (required), count, cursor.

twitter_list_tweetsA
Read-only
Inspect

Read the posts written by the members of a public Twitter/X List, newest first, through X's search index. This is the FILTERABLE List feed: it accepts since and until date bounds and an include_replies toggle. It does NOT return retweets, and search-index lag applies, so a post made moments ago can be missing for a short while. Use twitter_list_timeline instead when you want the List exactly as X shows it, retweets and native ordering included, and accept that it takes no filters. Paginate with cursor. The list_id appears in the X.com list URL (x.com/i/lists/<list_id>).

Inputs: list_id (required), count, since, until, +3 more.

twitter_media_statusA
Read-only
Inspect

Check whether an uploaded media_id has finished processing on X, before you attach it to a tweet. Video, GIF and large uploads are processed ASYNCHRONOUSLY: twitter_media_upload returns a media_id immediately, but attaching it via twitter_create_tweet FAILS until X reports state 'succeeded'. Poll this until then. Returns media_id, state ('pending', 'in_progress', 'succeeded' or 'failed'), check_after_secs (how long X asks you to wait before polling again, honour it rather than tight-looping), progress_percent, and an error object when state is 'failed'. Reads through YOUR OWN registered account session, the same one that performed the upload, so register first with twitter_customer_session or twitter_user_login, or pass auth_token/ct0 for this call. This is a READ: no daily write cap applies.

Inputs: media_id (required), ct0, proxy_url, auth_token, +1 more.

twitter_media_uploadAInspect

Upload an image to X and get a media_id to attach to a tweet via twitter_create_tweet's media_ids. Provide media_data as base64-encoded image bytes. Acts as your registered account session (register first with twitter_customer_session or twitter_user_login, or pass auth_token/ct0 for this call). Returns ok and the media_id. Only base64 image data is supported over this tool's JSON transport.

Inputs: media_data (required), ct0, proxy_url, auth_token, +1 more.

twitter_monitor_account_healthA
Read-only
Inspect

Account-wide monitoring rollup in ONE call, distinct from twitter_monitor_health (which needs an id and reports one monitor's cursor): service status ('operational' or 'degraded'), active/paused/total counts across every monitor you own, and pending/delivered/failed delivery counts from the last 24 hours. Takes no arguments. A key with zero monitors gets zeroed counts back, never an error. Free per call.

Inputs: no named parameters.

twitter_monitor_createAInspect

Start watching an X account for new posts. Every new post from that handle is HMAC-signed and delivered to your registered webhook(s) on a shared poll interval (see twitter_monitor_webhook_create to register a delivery URL first). Free: monitor creation is account administration, not a metered read. Returns the new monitor's id, plus its normalized handle, status, and poll_interval_ms.

Inputs: handle (required), webhook_ids, domain_filter.

twitter_monitor_deleteA
Destructive
Inspect

Stop and remove a monitor by id. Irreversible: create a new monitor with twitter_monitor_create if you want to watch that handle again. Delivery history referencing this monitor is retained, not cascade-deleted. Free per call.

Inputs: id (required).

twitter_monitor_deliveriesA
Read-only
Inspect

List your most recent monitor delivery events across every monitor, most recent first: id, monitor_id, tweet_id, status, tweet_created_at, and the real measured latency (detected_lag_ms, from X's own post timestamp to enqueue; delivery_lag_ms, the separate queue-to-webhook-POST time; total_lag_ms). Free per call.

Inputs: limit.

twitter_monitor_healthA
Read-only
Inspect

Read one monitor's current status, degradation flag, poll interval, possibly-missed-event count, and cursor position (last_tweet_id, last_poll_at), for building your own health dashboard. Free per call.

Inputs: id (required).

twitter_monitor_listA
Read-only
Inspect

List every monitor on your account: id, subject (its from: query), kind, status ('active' or 'paused'), degraded flag, events_possibly_missed, webhook_ids restriction, and created_at. Takes no arguments.

Inputs: no named parameters.

twitter_monitor_updateAInspect

Partially update an existing monitor: pause or resume it via status, change which webhooks receive its events via webhook_ids, change or clear its domain_filter, or any combination in the same call (applied atomically). Resuming a paused monitor re-runs the same capacity and per-account cap checks as creating a new one, since it adds load back to the shared pool. Free per call. All three fields are optional; omit any of them to leave that part unchanged.

Inputs: id (required), status, webhook_ids, domain_filter.

twitter_monitor_webhook_createAInspect

Register an HTTPS endpoint to receive signed monitor events. The HMAC signing secret is returned ONLY in this response, store it immediately: it cannot be retrieved again, and it is what you use to verify the X-TwitterAPIs-Signature header on every delivery. Free per call.

Inputs: url (required).

twitter_monitor_webhook_deleteA
Destructive
Inspect

Soft-delete a webhook by id: it stops receiving deliveries immediately and disappears from twitter_monitor_webhook_list, but delivery history referencing it is retained rather than cascade-deleted. Irreversible from the caller's side (register a new webhook with twitter_monitor_webhook_create to resume delivery). Free per call.

Inputs: id (required).

twitter_monitor_webhook_listA
Read-only
Inspect

List every webhook registered on your account: id, url, status ('active' delivers, 'disabled' means the endpoint returned a 410 Gone and needs re-registering to reactivate), and created_at. The signing secret is never returned here, only at creation. Takes no arguments.

Inputs: no named parameters.

twitter_monitor_webhook_testAInspect

Send one HMAC-signed test event to this webhook's URL right now and return the outcome synchronously: delivered (true if your endpoint returned a 2xx within the delivery timeout), status_code, and error. Unlike a real monitor event, a test send is never queued, retried, or dead-lettered, it is a one-shot diagnostic to confirm your endpoint and signature verification both work before relying on the webhook. Free per call.

Inputs: id (required).

twitter_mutingA
Read-only
Inspect

List the accounts YOUR authenticated account has MUTED, as full user objects, cursor-paginated. Muting hides an account's posts from your timeline without blocking it, so this is a different list from twitter_blocking and an account can appear in one and not the other. Requires an authenticated session behind your key. There is no user_id argument: X provides no way to read another account's mute list. An empty users array means you mute nobody, never a silent failure.

Inputs: ct0, count, cursor, proxy_url, +2 more.

twitter_retweetAInspect

Retweet a tweet AS your authenticated account. Provide the tweet id or url. Requires write capability behind your key. Reverse with twitter_unretweet.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_spaces_infoA
Read-only
Inspect

Get metadata and the participant roster for one X Space by id, live or ended: title, lifecycle state (Scheduled, NotStarted, Running or Ended), host, topics, scheduled and actual start/end times, peak live listener count, replay view count, and the admin, speaker and listener rosters. Returns metadata only, NOT the Space audio. Note that X does not retain the per-person listener roster once a Space ends, so listeners comes back empty for an ended Space while total_live_listeners and total_replay_watched still reflect the real audience. All timestamps are millisecond-epoch numbers.

Inputs: id (required), with_replays, with_listeners.

twitter_tweet_detailA
Read-only
Inspect

Get the full detail of a single tweet: text, author profile, post timestamp, like/retweet/reply/quote counts, attached media, referenced quoted tweet, and parent reply context. Use this to inspect a specific tweet before fetching its replies or thread. Accepts either the tweet id or its full URL.

Inputs: id, url.

twitter_tweet_quotesA
Read-only
Inspect

List the tweets that QUOTE a specific tweet, cursor-paginated as full tweet objects, so you get the commentary people attached rather than just a number. Different from twitter_tweet_retweeters (a plain retweet carries no text) and from twitter_tweet_replies (a reply is not a quote). IMPORTANT, state this to the user whenever you report a number from it: this endpoint is SEARCH-BACKED, because X exposes no dedicated quote-tweets operation, so it runs the query quoted_tweet_id: against X's search index. The returned 'count' is therefore how many quotes THIS SEARCH returned, never the tweet's true total; the authoritative total is 'quote_count' on the tweet object from twitter_tweet_detail, and the two WILL differ because of index lag and because deleted, protected, suspended and region-withheld quotes are absent from search. Every response carries 'source' (always "search"), 'search_query' (the exact query sent), and 'quote_matched' (how many returned tweets demonstrably quote the requested id). quote_matched equal to count means every row is genuine; quote_matched 0 on a NON-EMPTY page means X stopped honouring the operator and the rows are junk, so discard that page rather than reporting it.

Inputs: id, url, count, cursor, +2 more.

twitter_tweet_repliesA
Read-only
Inspect

Get replies to a specific tweet. Returns each reply tweet with author, text, and metrics. Paginate with cursor to load more. Use this to read the conversation under a tweet, gauge sentiment, or find notable responses.

Inputs: id, url, cursor.

twitter_tweet_retweetersA
Read-only
Inspect

List the accounts that retweeted a specific tweet. Returns profile data for each retweeter. Paginate with cursor. Useful for finding who amplified a piece of content or mapping a tweet's distribution network.

Inputs: id, url, count, cursor.

twitter_tweet_threadA
Read-only
Inspect

Get all tweets in a thread: the connected chain of tweets posted by the SAME author in sequence (a tweetstorm or numbered thread). Pass any tweet id/url from the thread and the API returns the full ordered sequence in a single call. Does NOT return replies from other users, use twitter_tweet_replies for that. Accepts either the tweet id or its full URL.

Inputs: id, url.

twitter_unbookmark_tweetA
Destructive
Inspect

Remove a tweet from YOUR authenticated account's bookmarks. Provide the tweet id or url. Requires write capability behind your key.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_unfavorite_tweetA
Destructive
Inspect

Remove a like (unfavorite) from a tweet AS your authenticated account. Provide the tweet id or url. Requires write capability behind your key.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_unfollow_userA
Destructive
Inspect

Unfollow a user AS your authenticated account, by numeric user_id. Requires write capability behind your key.

Inputs: user_id (required), ct0, proxy_url, auth_token, +1 more.

twitter_unretweetA
Destructive
Inspect

Undo a retweet AS your authenticated account. Provide the tweet id or url. Requires write capability behind your key.

Inputs: id, ct0, url, proxy_url, +2 more.

twitter_user_aboutA
Read-only
Inspect

Get a user's full 'About' object: the structured profile facts X surfaces beyond the bio, including account category and professional/business labels, verification and identity-verification flags, joined date, location and linked website, follower/following counts, and X's 'About this account' transparency panel (the account's country, how the account was created, and its username-change history). Provide a username or a user_id. Use this to enrich a profile beyond what twitter_user_info returns.

Inputs: user_id, username.

twitter_user_affiliatesA
Read-only
Inspect

List the affiliated accounts of an organization profile (the smaller accounts X displays under a company's 'Affiliated' badge, e.g. employees or sub-brands). Provide a username or user_id. Returns profile data per affiliate plus a pagination cursor. Returns empty for accounts with no affiliations.

Inputs: team, count, cursor, user_id, +1 more.

twitter_user_followersA
Read-only
Inspect

List the accounts that follow a given user. Returns profile data for each follower (username, display name, bio, follower count). Paginate with cursor for large audiences. Useful for audience analysis, finding who follows a brand or influencer.

Inputs: count, cursor, user_id, username.

twitter_user_followers_v2A
Read-only
Inspect

List a user's followers using the v2 response shape (richer profile fields and more reliable cursoring for large audiences). Same inputs as twitter_user_followers; prefer this when you need the fuller v2 payload or are paging deep follower lists.

Inputs: count, cursor, user_id, username.

twitter_user_followingA
Read-only
Inspect

List the accounts that a given user follows. Returns profile data for each account followed. Paginate with cursor. Useful for mapping a user's information sources, influencer networks, or competitor monitoring lists.

Inputs: count, cursor, user_id, username.

twitter_user_following_v2A
Read-only
Inspect

List the accounts a user follows using the v2 response shape (richer profile fields and more reliable cursoring). Same inputs as twitter_user_following; prefer this when you need the fuller v2 payload or are paging deep following lists.

Inputs: count, cursor, user_id, username.

twitter_user_infoA
Read-only
Inspect

Get a user's complete public profile by their @handle: display name, bio, follower count, following count, verification status, location, website, account creation date, and pinned tweet. Use this before fetching tweets or followers to confirm the account exists and resolve the numeric user_id.

Inputs: username (required).

twitter_user_info_by_idA
Read-only
Inspect

Get a user's complete public profile by their numeric user id. Identical response to twitter_user_info. Use this when you already have a user_id from a previous API response and want to avoid a handle lookup.

Inputs: user_id (required).

twitter_user_likesA
Read-only
Inspect

Get the tweets a user has liked (their public Likes tab), most recent first. Returns each liked tweet with author and metrics, plus a pagination cursor. Use this to infer interests or find content a user has endorsed. Returns empty if the account hides its likes. Requires the numeric user_id (resolve a handle first with twitter_user_info).

Inputs: user_id (required), count, cursor.

twitter_user_loginAInspect

Log in to X with a username and password (plus totp_secret if the account has 2FA) and store the resulting session against your API key, so the authenticated-account reads and the write tools then act as that account. On success returns { ok, username, message }; it does NOT return the session cookies (auth_token/ct0 are minted and kept server-side, never sent back). Typical failures: bad_credentials (401), two_factor_required (400, add totp_secret), captcha_required (422), acid_challenge (409, confirm the login from the account then retry). This handles real account credentials; never log or echo the values you pass.

Inputs: password (required), username (required), proxy_url, user_agent, +1 more.

twitter_user_mediaA
Read-only
Inspect

Get the images and videos a user has posted. Returns media-containing tweets with URLs to the media files, dimensions, and type (photo/video/animated_gif). Paginate with cursor. Use this to pull a user's visual content history.

Inputs: count, cursor, user_id, username.

twitter_user_mentionsA
Read-only
Inspect

Get recent public tweets that mention (@ tag) a user. Searches for tweets directed at the username using the to: operator. Returns matching tweets with author info and metrics. Paginate with cursor. Use this to monitor brand mentions, replies directed at an account, or public conversations about a person.

Inputs: username (required), count, cursor.

twitter_user_statusA
Read-only
Inspect

Check whether a Twitter/X account is alive, suspended, or deleted. Returns a status field that is one of 'alive', 'suspended', 'not_found', or 'unavailable', plus the numeric id when the account is alive and X's own reason when it gives one. Use this instead of twitter_user_info when the QUESTION is whether the account still exists: user info answers a suspended account, a deleted account, and a handle that never existed all the same way, so it cannot tell a ban from a typo. Every outcome here is a successful response, so read the status field rather than treating a suspension as an error. A protected (private) account counts as alive, since protection is a visibility setting and not an account state.

Inputs: userName (required).

twitter_user_tweetsA
Read-only
Inspect

Get a user's recent posting timeline. IMPORTANT: this endpoint does NOT filter server-side, so the response routinely includes retweets and replies alongside original posts. Every item carries is_retweet, is_reply and is_quote booleans, so filter client-side on those flags if you need originals only, and read author.username rather than assuming every item was written by the requested user (a retweet's retweeted_tweet holds the original author). Returns tweet text, id, timestamp, and engagement metrics. Paginate with cursor to go further back. For the full back-catalogue in one call, use twitter_user_tweets_complete.

Inputs: count, cursor, user_id, username.

twitter_user_tweets_and_repliesA
Read-only
Inspect

Get a user's full activity timeline: their original tweets AND replies to others. Useful for understanding how someone engages with a community, not just what they post. Paginate with cursor. Items carry is_retweet, is_reply and is_quote booleans; filter on those if you need a specific subset. Note that twitter_user_tweets does NOT filter replies or retweets out either, so on many accounts the two endpoints return overlapping or identical pages.

Inputs: count, cursor, user_id, username.

twitter_user_tweets_completeA
Read-only
Inspect

Get a user's near-complete original-tweet history in a single call, auto-paginating server-side up to a cap (Twitter's ~3200-tweet per-user ceiling). Heavier than twitter_user_tweets; use when you want the whole back-catalogue at once rather than page-by-page. Returns a flat tweet array. Requires the numeric user_id (resolve a handle first with twitter_user_info).

Inputs: user_id (required), max.

twitter_user_verified_followersA
Read-only
Inspect

List a user's followers who have a verified account (checkmark). Filters the follower list to verified accounts only, useful for identifying notable or institutional followers. Paginate with cursor.

Inputs: count, cursor, user_id, username.

twitter_x_user_stream_add_userAInspect

Compat drop-in for twitter_monitor_create using an x_user_stream-shaped request/response envelope: watch an X account for new posts, translated onto the same underlying monitor system. Free per call. Prefer twitter_monitor_create for new integrations; this exists for migrating an existing x_user_stream-shaped integration without a rewrite.

Inputs: x_user_name (required).

twitter_x_user_stream_list_usersA
Read-only
Inspect

Compat drop-in for twitter_monitor_list using an x_user_stream-shaped envelope: list every account you are currently tweet-monitoring. Honest field mapping, not fabricated: x_user_id is always null (this API stores no numeric Twitter user id) and is_monitor_profile is always 0 (profile-change monitoring is not a capability this API has). Free per call.

Inputs: no named parameters.

twitter_x_user_stream_remove_userB
Destructive
Inspect

Compat drop-in for twitter_monitor_delete using an x_user_stream-shaped envelope: stop watching an account. Irreversible. Free per call.

Inputs: id_for_user (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 94 tools

    Disambiguation2/5

    Multiple tools have unclear boundaries: twitter_user_tweets and twitter_user_tweets_and_replies are explicitly described as returning overlapping or identical pages, twitter_user_followers/following have v2 variants with the same inputs, and the twitter_x_user_stream_* tools are redundant compat drop-ins for monitor tools. The descriptions are detailed, but an agent would frequently need to read carefully to avoid picking the wrong near-duplicate.

    Naming Consistency5/5

    Every tool follows a consistent twitter_<domain>_<action> snake_case pattern, with predictable verbs like list, create, delete, update, get, info, and search. Even the legacy compat tools and account tools fit the same naming scheme, making the naming exemplary.

    Tool Count1/5

    94 tools is far beyond the 50+ threshold for an extreme mismatch, making the surface unwieldy for an agent to navigate. The broad Twitter/X domain explains some of the size, but redundant v1/v2 pairs and legacy compat endpoints inflate the count unnecessarily.

    Completeness4/5

    The tool surface is remarkably deep: it covers tweet/retweet/favorite/bookmark/DM/action lifecycles, article CRUD, monitor and webhook management, lists, communities, spaces, media upload, trends, and authenticated account reads. Minor gaps exist, such as no list update/delete and no block/mute write actions, but agents can generally work around them.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server that exposes the X API (formerly Twitter API) as tools, enabling operations like posting, searching, user management, and more via natural language commands.
      868
      -
    • A
      license
      B
      quality
      D
      maintenance
      MCP server for interacting with the X platform (Twitter) via MCP clients like Claude, Cursor AI, and Windsurf AI.
      20
      18 npm
      6
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server to read X (Twitter) posts, threads, replies, quotes, and search using your own logged-in session, no API key required.
      8
      177 PyPI
      4
      MIT