twitterapi.io is an independent third-party service. Not affiliated with X Corp.

Model Context Protocol server

Twitter MCP Server

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

An open-source server that plugs live Twitter/X data straight into your AI client — twelve read-only tools, one command to install, no Twitter developer account and no scraping.

Install
npx -y @kaitoinfra/twitterapi-io-mcp-server
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 100 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", "@kaitoinfra/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 @kaitoinfra/twitterapi-io-mcp-server -e TWITTERAPI_IO_API_KEY=your_key_here

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 and no rate-limit handling 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, gates capability behind steep tiers, and is priced for enterprises. twitterapi.io takes the opposite approach:

$0.15

per 1,000 tweets — pay-per-call, no subscription or minimum

1000+ QPS

built for high-throughput agent workloads

No dev account

no Twitter developer approval, no app review

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

/07

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-call — 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 a Twitter developer account, gates capabilities behind restrictive tiers, and is priced for enterprises. This server talks to twitterapi.io instead — no developer account, pay-per-call pricing, and read access to public data at a small fraction of the cost.

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 the source is public on GitHub at github.com/kaitoInfra/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 — 1000+ queries per second — and the server itself adds no limit. In practice your usage is bounded by your API credit, not by a rate cap.

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.