Skip to main content
Glama
TwitterAPI.io MCP Server

TwitterAPI.io MCP Server

Official

TwitterAPI.io MCP Server

npm version MIT License MCP Compatible

Official TwitterAPI.io MCP Server — Independent real-time X data API by twitterapi.io.

Connect Cursor, Claude Code, Claude Desktop, Windsurf, or VS Code Copilot to real-time X/Twitter data — search tweets with advanced operators, look up user profiles, inspect followers, read reply threads, quote-tweets, retweeters, and regional trends directly from natural language.

Disclaimer: TwitterAPI.io is an independent third-party real-time data API and is not affiliated with, endorsed by, or sponsored by X Corp.


Quick Start (30 Seconds)

1. Get a Free API Key

Sign up at twitterapi.io — new accounts include starter trial credits with pay-as-you-go pricing ($0.15 / 1,000 tweets, no monthly minimum).

2. Connect Your Client

Option A — Hosted Remote MCP (Streamable HTTP, Zero Install)

Claude Code:

claude mcp add --transport http twitterapi-io https://mcp.twitterapi.io/mcp \
  --header "Authorization: Bearer YOUR_TWITTERAPI_IO_API_KEY"

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "twitterapi-io": {
      "url": "https://mcp.twitterapi.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TWITTERAPI_IO_API_KEY"
      }
    }
  }
}

Option B — Local stdio MCP via npx

Claude Code:

claude mcp add -e TWITTERAPI_IO_API_KEY=YOUR_TWITTERAPI_IO_API_KEY \
  twitterapi-io -- npx -y @twitterapi_io/mcp-server

Cursor / Claude Desktop:

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

See docs/client-setup.md for Windsurf, VS Code Copilot, and MCP Inspector setup.


Related MCP server: Spectre

Available Tools (12 Read-Only Endpoints)

Responses are compacted (~25x smaller than raw payloads) so 20-tweet pages fit cleanly inside LLM context windows while preserving has_next_page and next_cursor.

Tool

REST Endpoint

Description

search_tweets

GET /twitter/tweet/advanced_search

Advanced search with full operators (from:, since:, until:, lang:, has:, min_faves:)

get_user_info

GET /twitter/user/info

Basic user profile, bio, verification, and follower counts

get_user_about

GET /twitter/user_about

Extended profile metadata

get_user_followers

GET /twitter/user/followers

Paginated followers list with compact profile metadata (up to 200/page)

get_user_followings

GET /twitter/user/followings

Paginated following list (up to 200/page)

get_user_last_tweets

GET /twitter/user/last_tweets

Most recent tweets from a user by handle or numeric ID

get_user_mentions

GET /twitter/user/mentions

Tweets mentioning @userName with optional Unix timestamp bounds

get_tweets_by_ids

GET /twitter/tweets

Batch lookup up to 50 tweets by comma-separated IDs

get_tweet_replies

GET /twitter/tweet/replies/v2

Replies to a tweet (Latest or Top)

get_tweet_quotes

GET /twitter/tweet/quotes

Quote-tweets referencing a tweet ID

get_tweet_retweeters

GET /twitter/tweet/retweeters

Users who retweeted a specific tweet

get_trends

GET /twitter/trends

Current trending topics by Yahoo WOEID (1 = Worldwide)

Full parameter schemas, response shapes, and curl/Python/TypeScript examples:


Example Prompts

  • "Search for original English tweets about Model Context Protocol with at least 25 likes since 2026-11-01."

  • "Fetch profile metrics and the 20 most recent posts for @openai, excluding replies."

  • "Pull top replies and quote-tweets for tweet ID 1850000000000000001 and summarize developer sentiment."

  • "What are the top 10 trending topics in Japan (woeid=23424856) right now?"


Security & Scope

  • Read-only by design: Write operations (posting, liking, following, DMs, account settings) are intentionally excluded for safe autonomous agent use.

  • No key persistence: TWITTERAPI_IO_API_KEY is read strictly from environment variables (or Bearer auth on Remote MCP) and sent directly to https://api.twitterapi.io.

  • Automatic resiliency: Exponential backoff retries (1s / 2s / 4s) on 429 and 5xx responses with 30s per-request timeout.

Local Development

git clone https://github.com/twitterapi-io/twitterapi-mcp.git
cd twitterapi-mcp
npm install
npm test
npm run build

License

MIT © 2026 TwitterAPI.io

Available Tools

12 tools
get_tweet_quotesA

Fetch quote-tweets referencing a specific tweet ID, with optional Unix timestamp bounds. Paginates via cursor (~20 per page).

Inputs: tweetId (required), cursor, sinceTime, untilTime, +1 more.

get_tweet_repliesA

Fetch replies to a specific tweet ID (~20 per page), sorted by Latest or Top. Useful for thread and sentiment analysis.

Inputs: tweetId (required), cursor, queryType.

get_tweet_retweetersA

Fetch user profiles that retweeted a specific tweet ID (~20 per page). Paginates via cursor.

Inputs: tweetId (required), cursor.

get_tweets_by_idsA

Batch-fetch up to 50 tweet objects by comma-separated numeric tweet IDs in a single call.

Inputs: tweet_ids (required).

get_user_aboutA

Fetch extended 'about' profile metadata for an X/Twitter user by screen name when additional profile details are needed beyond get_user_info.

Inputs: userName (required).

get_user_followersA

Fetch followers of an X/Twitter account in reverse chronological order with compact profile metadata. Paginates via cursor (up to 200 per page).

Inputs: userName (required), cursor, pageSize.

get_user_followingsA

Fetch accounts followed by a given X/Twitter user with compact profile metadata. Paginates via cursor (up to 200 per page).

Inputs: userName (required), cursor, pageSize.

get_user_infoB

Fetch basic profile info for an X/Twitter account by handle: user ID, display name, bio, follower/following counts, verification status, location, and account creation date.

Inputs: userName (required).

get_user_last_tweetsA

Fetch the most recent tweets posted by an X/Twitter user (newest first) using userName or userId. For specific date ranges or keyword filtering, prefer search_tweets.

Inputs: cursor, userId, userName, includeReplies.

get_user_mentionsA

Fetch tweets mentioning @userName with optional sinceTime/untilTime Unix timestamp bounds. Paginates via cursor (~20 per page).

Inputs: userName (required), cursor, sinceTime, untilTime.

search_tweetsA

Primary choice for keyword, topic, or date-range tweet searches. Supports full advanced search operators (from:, to:, since:YYYY-MM-DD, until:YYYY-MM-DD, lang:, filter:, -filter:retweets, has:images, OR). Use this instead of get_user_last_tweets whenever querying specific date windows or historical archives (~20 tweets per page).

Inputs: query (required), queryType (required), cursor.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 12 tools

    Disambiguation4/5

    Each tool targets a distinct resource+action (tweet retweeters, replies, quotes, user followers, trends, batch tweet lookup). The potentially overlapping pair search_tweets/get_user_last_tweets is explicitly disambiguated in descriptions, and get_user_info vs get_user_about is clarified (basic vs extended metadata), though 'about' remains slightly vague.

    Naming Consistency5/5

    All twelve tools follow a uniform 'get_<resource>' snake_case pattern with consistent verb-noun structure. Resources are clearly named (tweet, user, trends), making the read-only nature predictable throughout.

    Tool Count5/5

    Twelve tools is well-scoped for a Twitter read API, with each tool covering a meaningful endpoint (search, retweeters, replies, quotes, followers, trends). No redundant or filler tools are present.

    Completeness4/5

    The read-only surface is thorough: tweet search/batch/replies/quotes/retweeters, user profiles/followers/followings/mentions, and trends. Minor gaps exist (e.g., single user search by keyword, list-membership retrieval), but core read workflows are fully covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with X (Twitter) API v2 for posting tweets, searching, liking, retweeting, and more through natural language.
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables AI agents to search, read user profiles, timelines, media, follow threads, track trends, and manage accounts on X/Twitter via GraphQL, without browser automation or paid API keys.
      113
      13
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to read, post, search, and engage with Twitter/X content, including AI-powered reply drafting and analytics.
      17
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to read public X (Twitter) data without the paid official API, including tweet and user search, profiles, timelines, media, replies, retweeters, followers, lists, and trends. All tools are read-only and rotate across multiple scraping accounts with proxy and rate-limit support.
      MIT