{
  "markdown": "# twitterapi.io MCP Server\n\n[![npm version](https://img.shields.io/npm/v/@twitterapi_io/mcp-server.svg)](https://www.npmjs.com/package/@twitterapi_io/mcp-server)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![MCP Spec 2025-11-25](https://img.shields.io/badge/MCP-2025--11--25-green)](https://modelcontextprotocol.io/specification)\n\nOfficial [Model Context Protocol](https://modelcontextprotocol.io) server for **[twitterapi.io](https://twitterapi.io)** — Twitter / X data API for AI agents and applications.\n\nConnect 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.\n\n## Features\n\n12 read-only tools mapped 1:1 to twitterapi.io's verified production endpoints:\n\n| Tool | What it does |\n|---|---|\n| `search_tweets` | Advanced search with Twitter operators (`from:`, `since:`, `lang:`, `has:`, …) |\n| `get_user_info` | User profile basics by screen name |\n| `get_user_about` | Extended profile / about page |\n| `get_user_followers` | Followers with full profile metadata (paginated) |\n| `get_user_followings` | Following list with profile metadata (paginated) |\n| `get_user_last_tweets` | A user's recent tweets (timeline) |\n| `get_user_mentions` | Tweets that mention a user |\n| `get_tweets_by_ids` | Batch fetch tweets by ID (up to 100) |\n| `get_tweet_replies` | Replies to a tweet |\n| `get_tweet_quotes` | Quote-tweets of a tweet |\n| `get_tweet_retweeters` | Users who retweeted a tweet |\n| `get_trends` | Trending topics by location (WOEID) |\n\n## Quick Start\n\n### 1. Get an API key\n\nSign up at [twitterapi.io](https://twitterapi.io) — free tier available.\n\n### 2. Configure your MCP client\n\n#### Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"twitterapi-io\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@twitterapi_io/mcp-server\"],\n      \"env\": {\n        \"TWITTERAPI_IO_API_KEY\": \"your_key_here\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. The 12 tools will be available in any chat — Claude will pick the right one based on your prompt.\n\n#### Cursor\n\nOpen Settings → MCP → Add new MCP Server:\n\n```json\n{\n  \"mcpServers\": {\n    \"twitterapi-io\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@twitterapi_io/mcp-server\"],\n      \"env\": {\n        \"TWITTERAPI_IO_API_KEY\": \"your_key_here\"\n      }\n    }\n  }\n}\n```\n\n#### VS Code (Copilot Chat with MCP)\n\nAdd to your MCP servers config — same shape as Claude Desktop / Cursor.\n\n#### Claude Code\n\n```bash\nclaude mcp add twitterapi-io npx -- -y @twitterapi_io/mcp-server -e TWITTERAPI_IO_API_KEY=your_key_here\n```\n\n### 3. Use it\n\nIn any MCP-enabled chat:\n\n> \"Find recent tweets from @elonmusk about AI in the last week\"\n\n> \"Get the follower list of @sama and show me the top 20 by follower count\"\n\n> \"What are the current trending topics in Japan?\"\n\nClaude (or your client) will automatically pick `search_tweets` / `get_user_followers` / `get_trends` and call them with the right parameters.\n\n## Authentication\n\nAuthentication 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`.\n\n## Pagination\n\nTools 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.\n\n## Error handling\n\n- 429 / 5xx responses are automatically retried with exponential backoff (3 attempts, 1s/2s/4s)\n- Network timeouts: 30s per request\n- 4xx errors (other than 429) surface immediately to the LLM with the original message\n\n## Tools — full spec\n\nEach tool's input schema is exposed via MCP's `tools/list` and follows JSON Schema. Run `npx @twitterapi_io/mcp-server` with `mcp-inspector` to browse interactively:\n\n```bash\nnpx @modelcontextprotocol/inspector npx -y @twitterapi_io/mcp-server\n```\n\n## What's NOT included\n\nBy design, this server exposes **read-only** endpoints. The following are **intentionally excluded** to keep the server safe for autonomous agent use:\n\n- ❌ Posting tweets, likes, retweets, follows, DMs\n- ❌ Account login / 2FA\n- ❌ Profile / banner / avatar editing\n- ❌ Media upload\n- ❌ Account deletion\n- ❌ Realtime stream / webhook setup (does not fit the MCP request/response model)\n\nThese features are available in the full [twitterapi.io REST API](https://docs.twitterapi.io) — use it directly if you need write access.\n\n## Spec compliance\n\n- Built on `@modelcontextprotocol/sdk` v1\n- Targets MCP spec **2025-11-25** (latest)\n- Transport: **stdio** (Streamable HTTP planned for v0.2+ for remote/hosted use)\n- Tested with: `mcp-inspector`, Claude Desktop, Cursor, Claude Code\n\n## Development\n\n```bash\ngit clone https://github.com/kaitoInfra/twitterapi-io-mcp-server.git\ncd twitterapi-io-mcp-server\nnpm install\nnpm run build\nTWITTERAPI_IO_API_KEY=xxx npm run inspect  # opens mcp-inspector\n```\n\n## Links\n\n- 🔗 [twitterapi.io](https://twitterapi.io) — REST API homepage + signup\n- 📖 [twitterapi.io docs](https://docs.twitterapi.io) — full API reference\n- 🧰 [Model Context Protocol](https://modelcontextprotocol.io) — protocol homepage\n- 🐛 [Report issues](https://github.com/kaitoInfra/twitterapi-io-mcp-server/issues)\n\n## License\n\nMIT © twitterapi.io\n",
  "bytes": 5517,
  "sha": "5913369e180fcea58d1f9374aec8d375eff956c9689580748c1fb6e6414732b8",
  "repo_slug": "kaitoinfra/twitterapi-io-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kaitoinfra_twitterapi_io_mcp_s_94635814/readme"
}