TwitterAPIs Docs
Getting Started

Twitter MCP Server | Twitter Tools for AI Agents

Connect the @twitterapis/mcp server to Claude, Cursor, and any Model Context Protocol client so your AI agent can search tweets and read profiles as native tools.

The official Model Context Protocol server, @twitterapis/mcp, exposes the read API as native tools for Claude, Cursor, and any MCP client. Ask your agent to "find the latest tweets about AI agents" or "pull @openai's followers" and it calls the API directly, no glue code.

Every tool maps to a REST endpoint at https://api.twitterapis.com. The server holds no state and forwards your API key on each call.

No install step

The server runs on demand with npx. You only need an API key. New accounts start with $0.50 in free credits, enough for hundreds of calls, no card required. Grab one from the dashboard.

Connect a client

Add the server block to your client's MCP config, set TWITTERAPIS_KEY, and restart the client. The twitter_* tools then appear in the tool list.

Open Settings, then Developer, then Edit Config, and add the server to claude_desktop_config.json:

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

Edit ~/.cursor/mcp.json (or Settings, then MCP, then Add) and add:

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

Any client that speaks the Model Context Protocol over stdio can launch the server the same way. The command is npx -y @twitterapis/mcp@latest with TWITTERAPIS_KEY set in the environment:

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

Configuration

Env varRequiredDefaultPurpose
TWITTERAPIS_KEYYesnoneYour API key from the dashboard.
TWITTERAPIS_BASE_URLNohttps://api.twitterapis.comOverride the API host.
TWITTERAPIS_TIMEOUT_MSNo30000Per-request timeout in milliseconds.

Tools

The server exposes 37 tools: 27 read and 10 write. Read tools need only your API key. Write tools and private-timeline reads also need a registered session (pass auth_token and ct0). User tools accept a username or a numeric user_id; tweet tools accept a tweet id; paged tools take a cursor.

Read tools (27)

ToolWhat it does
twitter_advanced_searchSearch tweets with X operators (from:, min_faves:, filter:, and the rest).
twitter_user_searchSearch accounts by name or keyword.
twitter_user_infoFull profile by handle.
twitter_user_info_by_idFull profile by numeric ID.
twitter_user_aboutThe extended About section of a profile.
twitter_user_affiliatesAccounts affiliated under a Verified Organization.
twitter_user_tweetsA user's recent tweets, without replies.
twitter_user_tweets_and_repliesA user's full timeline, tweets plus replies.
twitter_user_tweets_completeA user's tweet history, auto-paginated server-side.
twitter_user_followersAccounts that follow a user.
twitter_user_followingAccounts a user follows.
twitter_user_verified_followersA user's verified followers.
twitter_followers_you_knowFollowers of a user that your session also follows.
twitter_check_follow_relationshipThe directional follow relationship between two users.
twitter_user_mediaMedia a user has posted.
twitter_user_mentionsRecent tweets mentioning a user.
twitter_user_likesThe Likes tab of an account read through your session.
twitter_bookmarksBookmarked tweets for the account behind your session.
twitter_bookmark_searchSearch your session account's bookmarks by keyword.
twitter_home_timelineThe ranked home feed for the account behind your session.
twitter_tweet_detailOne tweet's full detail.
twitter_tweet_repliesReplies to a tweet.
twitter_tweet_threadA tweet's self-thread.
twitter_tweet_retweetersAccounts that retweeted a tweet.
twitter_list_membersMembers of a public List.
twitter_dm_listThe DM inbox for the account behind your session.
twitter_dm_conversationThe message history of a single DM conversation.

Write tools (10)

Write tools need a registered session. Most bill at $0.0008 per call, the same as a standard read; only twitter_create_tweet is higher at $0.0016.

ToolWhat it does
twitter_create_tweetPost a tweet as your registered account.
twitter_delete_tweetDelete one of your registered account's tweets.
twitter_favorite_tweetLike a tweet as your registered account.
twitter_unfavorite_tweetRemove a like from a tweet.
twitter_retweetRetweet a tweet as your registered account.
twitter_unretweetRemove a retweet from a tweet.
twitter_bookmark_tweetBookmark a tweet as your registered account.
twitter_unbookmark_tweetRemove a bookmark from a tweet.
twitter_follow_userFollow a user as your registered account.
twitter_unfollow_userUnfollow a user as your registered account.

Billing

Most MCP calls bill at $0.0008 per call, the same as a direct REST call. A few cost more: twitter_tweet_thread is $0.004, twitter_user_tweets_complete is $0.0024, and tweet creation plus the DM reads (twitter_dm_list, twitter_dm_conversation) are $0.0016. Your first $0.50 is free. See Rate limits for the full pay-per-call model.

Prefer raw HTTP?

You do not need the MCP server to use the API. Every tool here is a thin wrapper over a REST endpoint you can call yourself.

FAQ

Which clients does the MCP server support?

Claude Desktop, Cursor, and any client that speaks the Model Context Protocol over stdio. Add the server block and set TWITTERAPIS_KEY.

Do I need to install anything?

No. The server runs on demand with npx -y @twitterapis/mcp@latest. You only need an API key, with $0.50 in free credits to start.

Are the MCP tools read-only?

No. The server exposes 37 tools, 27 read and 10 write. Read tools bill at the standard $0.0008 read rate; write tools (like, retweet, bookmark, follow, create, delete, and their undos) bill at $0.0008 per call too, the same as a read, except create at $0.0016, and need a registered session.

On this page