twitterapi-io-mcp-server

twitterapi-io-mcp-server

Official MCP server for twitterapi.io — Twitter/X data access (search tweets, users, followers, replies, trends) via Claude Desktop, Cursor, VS Code Copilot, or any MCP-compatible client. 12 read-only tools, stdio transport.

Category
Visit Server

README

twitterapi.io MCP Server

npm version MIT License MCP Spec 2025-11-25

Official Model Context Protocol server for twitterapi.io — Twitter / X data API for AI agents and applications.

Connect Claude Desktop, Cursor, VS Code Copilot, or any MCP client to twitterapi.io and search tweets, fetch user profiles, get followers, replies, trends, and more — all from natural language.

Features

12 read-only tools mapped 1:1 to twitterapi.io's verified production endpoints:

Tool What it does
search_tweets Advanced search with Twitter operators (from:, since:, lang:, has:, …)
get_user_info User profile basics by screen name
get_user_about Extended profile / about page
get_user_followers Followers with full profile metadata (paginated)
get_user_followings Following list with profile metadata (paginated)
get_user_last_tweets A user's recent tweets (timeline)
get_user_mentions Tweets that mention a user
get_tweets_by_ids Batch fetch tweets by ID (up to 100)
get_tweet_replies Replies to a tweet
get_tweet_quotes Quote-tweets of a tweet
get_tweet_retweeters Users who retweeted a tweet
get_trends Trending topics by location (WOEID)

Quick Start

1. Get an API key

Sign up at twitterapi.io — free tier available.

2. Configure your MCP client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

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

Restart Claude Desktop. The 12 tools will be available in any chat — Claude will pick the right one based on your prompt.

Cursor

Open Settings → MCP → Add new MCP Server:

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

VS Code (Copilot Chat with MCP)

Add to your MCP servers config — same shape as Claude Desktop / Cursor.

Claude Code

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

3. Use it

In any MCP-enabled chat:

"Find recent tweets from @elonmusk about AI in the last week"

"Get the follower list of @sama and show me the top 20 by follower count"

"What are the current trending topics in Japan?"

Claude (or your client) will automatically pick search_tweets / get_user_followers / get_trends and call them with the right parameters.

Authentication

Authentication is via the TWITTERAPI_IO_API_KEY environment variable, injected by your MCP client. The server never stores or logs the key. Each tool call sends the key in the X-API-Key header to https://api.twitterapi.io.

Pagination

Tools that return lists (followers, replies, search results, etc.) return a next_cursor field. Pass it back as the cursor argument on the next call to page through. Each page is typically ~20 items.

Error handling

  • 429 / 5xx responses are automatically retried with exponential backoff (3 attempts, 1s/2s/4s)
  • Network timeouts: 30s per request
  • 4xx errors (other than 429) surface immediately to the LLM with the original message

Tools — full spec

Each tool's input schema is exposed via MCP's tools/list and follows JSON Schema. Run npx @kaitoinfra/twitterapi-io-mcp-server with mcp-inspector to browse interactively:

npx @modelcontextprotocol/inspector npx -y @kaitoinfra/twitterapi-io-mcp-server

What's NOT included

By design, this server exposes read-only endpoints. The following are intentionally excluded to keep the server safe for autonomous agent use:

  • ❌ Posting tweets, likes, retweets, follows, DMs
  • ❌ Account login / 2FA
  • ❌ Profile / banner / avatar editing
  • ❌ Media upload
  • ❌ Account deletion
  • ❌ Realtime stream / webhook setup (does not fit the MCP request/response model)

These features are available in the full twitterapi.io REST API — use it directly if you need write access.

Spec compliance

  • Built on @modelcontextprotocol/sdk v1
  • Targets MCP spec 2025-11-25 (latest)
  • Transport: stdio (Streamable HTTP planned for v0.2+ for remote/hosted use)
  • Tested with: mcp-inspector, Claude Desktop, Cursor, Claude Code

Development

git clone https://github.com/kaitoInfra/twitterapi-io-mcp-server.git
cd twitterapi-io-mcp-server
npm install
npm run build
TWITTERAPI_IO_API_KEY=xxx npm run inspect  # opens mcp-inspector

Links

License

MIT © twitterapi.io

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured