SuperAPIAI Directory

twitterapis-mcp

github.com · AI developer platforms

twitterapis-mcp is the official MCP server provided by TwitterAPIs, enabling AI agents in MCP clients such as Claude, Cursor, Windsurf, and VS Code to directly call Twitter/X data and operation capabilities. It requires no X developer account; only a TwitterAPIs API key is needed. The server provides 121 tools in total, including 72 read tools and 49 write tools, covering tweet search, user profiles, timelines, followers, threads, lists, bookmarks, direct messages, posting, replying, liking, retweeting, following, media upload, articles (Notes), drafts and scheduled publishing, Webhook monitoring, and more. Public reads require only an API key; account-related reads and writes require linking an X session first, or passing auth_token and ct0 per call. Billing is per request: standard reads cost USD 0.0008 each, about 1,000 tweets for USD 0.04, posting costs USD 0.0016, and new accounts receive USD 0.50 in free credit with no credit card required. The server itself does not store state; each call forwards the key.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

Purpose

twitterapis-mcp is the official MCP (Model Context Protocol) server from TwitterAPIs. Its goal is to package Twitter/X data and operations as native tools that AI agents can call directly, so Claude Desktop, Cursor, Windsurf, VS Code (Copilot agent mode), or other MCP clients can read X data and perform actions such as posting in conversation without applying for an X developer account.

Key capabilities

The server provides 121 tools in total: 72 read tools and 49 write tools.

Read capabilities include: tweet search (including advanced search), user profiles, user tweets and full history, followers, likes, lists, threads, bookmarks, direct messages, home timeline, mentions, articles (X's long-form Notes feature), and more. Most user endpoints accept username (account name without @) or user_id; tweet endpoints accept id or url; paginated endpoints return cursor, which can be passed back to get the next page. Read tools generally support fields (comma-separated dot paths for retaining specified fields) and compact (built-in compact presets), making it easy to trim returned content by token cost.

Write capabilities include: posting, replying, liking, retweeting, following, direct messaging, media upload, profile name/bio/avatar/banner updates, list creation and adding/removing members, community join/leave, article create/edit/publish/delete, and drafts and scheduled publishing. Reverse operations such as delete, unfollow, unlike, unretweet, and remove bookmark are marked as destructiveHint, so clients can prompt for confirmation before executing.

There are also monitoring tools: after registering a Webhook, create a monitor to push new tweets from followed accounts with HMAC signatures to your own HTTPS endpoint, replacing polling. Monitoring and feedback tools are account management, are not counted as metered reads, and are free.

The server also exposes MCP resources, including executable playbook recipes and provenance://tool/{tool_name} source information (corresponding REST endpoint, method, read/write type, pricing, and documentation links), read on demand without occupying context or incurring charges.

How to use

Install command: npx -y @twitterapis/mcp@latest, you need to set the environment variable TWITTERAPIS_KEY; get the key from https://www.twitterapis.com/signup obtain it.

Hosted mode (Claude Code) lets you log in directly without pasting a key: claude mcp add --transport http twitterapis https://api.twitterapis.com/mcp

Client configuration locations: For Claude Desktop, edit claude_desktop_config.json (Settings → Developer → Edit Config); for Cursor, use ~/.cursor/mcp.json or Settings → MCP → Add New Server; for Windsurf, use ~/.codeium/windsurf/mcp_config.json; for VS Code, configure in the workspace .vscode/mcp.json or in the user-level MCP settings. After restarting, the twitter_* tools will appear in the tool selector.

Public reads (search, profiles, tweets, followers, likes) only require an API key. Reads available only to accounts (bookmarks, direct messages, home timeline, people you know) and most write operations require linking an X session first: you can register x.com cookies via twitter_customer_session, or log in with username/password using twitter_user_login; you can also pass auth_token + ct0 (optionally proxy_url / user_agent) in a single call to temporarily act as that account. For write operations, it is recommended to set proxy_url to a residential proxy, because X applies soft blocking to writes from data center IPs.

Use cases

Suitable for developers and agent workflows that need to retrieve tweets, analyze accounts, read threads, paginate through followers or tweet history, monitor brand mentions, and post and interact from linked accounts in AI conversations.

Limits and billing

Billing is per request: standard reads cost $0.0008 each, about $0.04 for roughly 1,000 tweets (one call returns about 20); creating a tweet costs $0.0016; twitter_user_tweets_complete costs $0.0024 per call, regardless of the number returned. Account, feedback, and monitoring tools are free; Grok chat submission and result polling are free, and the fee is charged once at the first poll that delivers the completed answer. New accounts receive $0.50 in free credit, no credit card required. The server does not store state and forwards the API key on every call.

Common errors: 401 means the key is invalid or missing; 402 means insufficient balance; 403 means the account/tweetis protected or the plan does not include that endpoint; 404 means the object has been deleted or the id/account name is wrong; 429 means rate limiting, so you can wait and retry or set TWITTERAPIS_TIMEOUT_MS (e.g. 60000) and space out batch requests. The default timeout is 30 seconds; it can be increased for large paginated fetches. If the tools do not appear, check whether npx is in PATH and whether Node.js is version 18 or later.

Documentation: docs.twitterapis.com; dashboard and keys: twitterapis.com/dashboard; pricing: twitterapis.com/pricing; REST API base URL:https://api.twitterapis.com。

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools