Model Context Protocol server

Twitter MCP Server

Twitter/X data as MCP tools for Claude, Cursor & AI agents.

An open-source X API MCP server that plugs live Twitter/X data straight into your AI client: twelve read-only tools, one config to paste, no X developer account, no cookies, pay-per-use at $0.15 per 1,000 tweets.

claude_desktop_config.json
{
  "mcpServers": {
    "twitterapi-io": {
      "command": "npx",
      "args": ["-y", "@twitterapi_io/mcp-server"],
      "env": { "TWITTERAPI_IO_API_KEY": "your_key_here" }
    }
  }
}

Settings → Developer → Edit Config, paste, restart Claude. Replace your_key_here with your twitterapi.io API key.

12 read-only toolsDetails ↓
  • search_tweets
  • get_user_info
  • get_user_about
  • get_user_followers
  • get_user_followings
  • get_user_last_tweets
  • get_user_mentions
  • get_tweets_by_ids
  • get_tweet_replies
  • get_tweet_quotes
  • get_tweet_retweeters
  • get_trends
12 read-only tools·MIT licensed·MCP spec 2025-11-25·~5 min read
/01

What the Twitter MCP Server is

The Twitter MCP Server is an open-source Model Context Protocol server that gives Claude, Cursor and other AI agents direct, structured access to live Twitter/X data. Install it with one command, point it at a twitterapi.io API key, and your AI client gains twelve tools for searching tweets and reading profiles, followers, replies and trends.

MCP is an open standard that lets an AI application call external tools and data sources in a uniform way — instead of bespoke integration code for every service, a client speaks one protocol to many servers. This server is the Twitter/X piece of that picture: it wraps twitterapi.io's read-only data endpoints so any MCP-compatible client can use them as native tools. The agent decides which tool to call and with what arguments; you just ask a question in plain language.

It is read-only by design — no posting, no logins, no scraping — and it is licensed MIT, so you can read the source, fork it, or run it unmodified.

/02

The 12 tools

Every tool maps to a twitterapi.io endpoint and returns public data only. The agent picks the right one for each request.

  • search_tweetsAdvanced search with the full Twitter operator set — from:, since:, lang:, and more.Topic monitoring, dataset building
  • get_user_infoCore profile of any account by handle — bio, follower counts, verification.Account lookup & enrichment
  • get_user_aboutExtended profile / about details for a user.Deeper profile context
  • get_user_followersAn account's followers with metadata, cursor-paginated.Audience & network analysis
  • get_user_followingsThe accounts a user follows, cursor-paginated.Interest-graph mapping
  • get_user_last_tweetsRecent tweets from a user's timeline.Activity tracking & summaries
  • get_user_mentionsTweets that mention a given account.Brand & reputation monitoring
  • get_tweets_by_idsBatch-fetch up to 50 tweets by ID in a single call.Hydrating tweet datasets
  • get_tweet_repliesThe reply thread underneath a tweet.Conversation analysis
  • get_tweet_quotesQuote-tweets of a given tweet.Discourse & spread analysis
  • get_tweet_retweetersThe accounts that retweeted a tweet.Amplification & reach analysis
  • get_trendsTrending topics for a location, by WOEID.Trend detection & timely content
/03

Install & setup

The server runs locally through npx — there is nothing to clone or build. Add the configuration below to your client, set your API key, and restart it.

Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude. The file lives in ~/Library/Application Support/Claude/ on macOS and %APPDATA%\Claude\ on Windows.

claude_desktop_config.json
{
  "mcpServers": {
    "twitterapi-io": {
      "command": "npx",
      "args": ["-y", "@twitterapi_io/mcp-server"],
      "env": { "TWITTERAPI_IO_API_KEY": "your_key_here" }
    }
  }
}

Cursor & VS Code

Both speak the same MCP configuration. In Cursor: Settings → MCP → Add new MCP Server. In VS Code: open User Settings (JSON) and add the server under its MCP servers block. Either way, paste the same mcpServers block shown above.

Claude Code

One command from your terminal:

terminal
claude mcp add twitterapi-io npx -- -y @twitterapi_io/mcp-server -e TWITTERAPI_IO_API_KEY=your_key_here

Hosted endpoint (no install)

Clients that accept a remote MCP server, such as Cursor, Claude Code and claude.ai connectors, can skip npx entirely and connect to the hosted endpoint. Send your API key as a Bearer token in the Authorization header.

remote MCP endpoint
https://mcp.twitterapi.io/mcp

Replace your_key_here with a real twitterapi.io API key — see the next section.

/04

What a request looks like

With the server connected you never call the API directly. You ask your AI client a normal question; it picks the right tool, calls it, and reads the result back to you. Here is a real round-trip.

  1. 1

    You ask

    In Claude or Cursor, in plain language:

    “Get the profile of @elonmusk.”

  2. 2

    The agent calls a tool

    The model recognises this maps to get_user_info and calls it with the argument it inferred:
    tool call
    {
      "name": "get_user_info",
      "arguments": { "userName": "elonmusk" }
    }
  3. 3

    The server returns live data

    twitterapi.io answers and the server hands the live profile straight back to the model:
    response
    {
      "data": {
        "id": "44196397",
        "userName": "elonmusk",
        "name": "Elon Musk",
        "followers": 239997162,
        "following": 1142,
        "isBlueVerified": true,
        "description": "...",
        "profilePicture": "https://..."
      }
    }
  4. 4

    The agent answers

    The model reads that and replies in plain language — “@elonmusk has roughly 240M followers, follows 1,142 accounts and is Blue-verified” — or a table, a comparison, whatever you asked for. No glue code on your side.

The same pattern covers every tool — “what's trending worldwide” routes to get_trends, “recent tweets from @sama about AGI” routes to search_tweets.

/05

Getting your API key

The server authenticates to twitterapi.io with your own key, passed through the TWITTERAPI_IO_API_KEY environment variable in the config above.

  1. 1.Sign in at twitterapi.io and open the dashboard.
  2. 2.Copy your API key from the dashboard.
  3. 3.Paste it into the config as TWITTERAPI_IO_API_KEY and restart your client.
Get your API key
/06

Why twitterapi.io

The server is only as good as the API behind it. The official X (Twitter) API requires a developer account and bills pay-per-use at $0.005 per post read, about 33x our per-tweet rate. twitterapi.io takes a different approach:

$0.15

per 1,000 tweets — pay as you go, no subscription required, no minimum

up to 1,000 QPS

requests per second; the highest limit applies to the top subscription tiers — see /qps-limits

No dev account

no Twitter developer approval, no app review

See the full pricing for the rate card, or the X API overview for how twitterapi.io compares with the official API in detail.

/07

Twitter MCP servers compared (2026)

Ours is not the only way to give an agent X data. These are the three options people most often weigh, with the facts each one publishes about itself.

Featuretwitterapi.io MCP serverX hosted MCP (official)@enescinar/twitter-mcp (community)
Run bytwitterapi.io; hosted endpoint or local npx packageX Developer Platform; hosted at api.x.com/mcp, optional local bridgeOpen-source project; you run it locally with npx
Account you needA twitterapi.io API key; no X developer accountAn X developer app (OAuth 2.0 user context, or an app-only Bearer token for reads)An X developer account and four API keys and tokens
Read or writeRead-onlyRead and write; a read_only=true option limits it to read toolsRead and write (posting tweets)
Tools12: tweet search and lookup, profiles, followers, followings, user timelines, mentions, replies, quotes, retweeters, trendsGrouped by X as Posts, Search, Users, Bookmarks, News & Trends and Articles3: post a tweet, search tweets, read your home timeline
Cost of reads$0.15 per 1,000 tweets returned, pay as you goBilled through your X API app, which must be on the pay-per-use package ($0.005 per post read)Billed by your X API plan; the home timeline tool needs a paid tier
LicenseMITHosted service; the local bridge is open sourceMIT

Which one fits: if your agent needs to post or act as your own X account, use one of the servers built on the official API; X documents its hosted server in the X MCP documentation, which needs an X developer app on its pay-per-use package. If the agent mostly reads (search, profiles, followers, replies, trends), ours needs no X developer account and costs less per read.

Sources: docs.x.com/tools/mcp for the X hosted MCP; the project README and npm listing for @enescinar/twitter-mcp; twitterapi.io pricing for ours. Checked in 2026.

/08

Frequently asked questions

What is an MCP server?

MCP — the Model Context Protocol — is an open standard for letting AI applications call external tools and data sources in a uniform way. An MCP server exposes one capability; this one exposes Twitter/X data, so any MCP-compatible client can read tweets, profiles and trends without you writing integration code.

Which clients does it work with?

Anything that speaks MCP — Claude Desktop, Claude Code, Cursor, and VS Code, among other MCP-compatible editors and agents. The setup is the same standard configuration in each one.

Is the Twitter MCP server free?

The server itself is free and open-source under the MIT licence. It calls twitterapi.io, which is pay-per-use, billed per result returned — you bring your own API key and pay only for the data the tools actually fetch.

Do I need a twitterapi.io account and API key?

Yes. The server needs a twitterapi.io API key, supplied through the TWITTERAPI_IO_API_KEY environment variable. Creating a key takes about a minute in the dashboard.

What can the MCP server NOT do?

It is strictly read-only. It cannot post or reply, like, follow, send DMs, or log in to an account. All twelve tools only fetch public Twitter/X data.

How is this different from the official X (Twitter) API?

The official X API needs an X developer account and bills pay-per-use at $0.005 per post read. This server talks to twitterapi.io instead — no developer account, pay-per-use pricing at $0.15 per 1,000 tweets returned, and read access to public data about 33x cheaper per read than the official X API pay-per-use rate.

Which MCP specification version does it implement?

It targets the 2025-11-25 Model Context Protocol specification — the current released spec — so it works with any up-to-date MCP client.

Is it open source?

Yes — it is MIT-licensed and distributed as an npx package on npm at npmjs.com/package/@twitterapi_io/mcp-server.

How do I update to the latest version?

Because the configuration launches the server through npx, each start fetches the latest published version automatically. To pin a specific version, name it explicitly in the args.

Are there rate limits?

twitterapi.io is built for high throughput — up to 1,000 requests per second (the highest limit applies to the top subscription tiers; see /qps-limits) — and the server itself adds no additional limit. In practice your usage is bounded by your API credit and your tier.

Give your agent live Twitter data.

Install the server, drop in an API key, and Claude or Cursor can search tweets and read profiles, followers and trends — in the next message you send it.