Twitterapi Io Mcp Server

io.github.kaitoInfra由 GitHub 账号 kaitoInfra 发布v0.2.1更新于 Oct 24, 2026

Official twitterapi.io MCP server (npm, stdio): Twitter/X tweets, users, followers, trends.

发布方自己的服务:Twitterapi

概览

AI 生成的概览

twitterapi.io 官方 MCP 服务器,让助手搜索推文并查询 Twitter/X 用户、关注者、回复、引用、转发者和热门话题。

可以做什么
使用 from:、since:、lang:、has: 等高级 Twitter 运算符搜索推文;按 ID 批量获取推文,并读取某条推文的回复、引用推文和转发者。查询用户资料、扩展 about 页面、近期时间线和提及。列出关注者和关注列表及其资料元数据,通过 next_cursor 分页。按地点(WOEID)获取热门话题。
适用场景
适合让助手用自然语言调研公开的 Twitter/X 对话、用户资料、关注者列表或热门话题,而无需编写 API 代码。它只读,因此适用于分析和监测,而非发帖或账号管理。
运行要求
通过 stdio 在本地运行,通常用 npx 启动 npm 包 @twitterapi_io/mcp-server,因此需要 Node.js。需要 twitterapi.io 账号,并通过环境变量 TWITTERAPI_IO_API_KEY 提供 API 密钥。需要访问 api.twitterapi.io 的网络。
安装前请注意
每次工具调用都会把 API 密钥作为 X-API-Key 请求头发送到 api.twitterapi.io,查询内容和结果都会经过该第三方服务。twitterapi.io 按其套餐计费,请先确认价格和配额。该服务器为只读,刻意不包含发帖、点赞、关注、私信和账号修改功能。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Twitterapi Io Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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:

ToolWhat it does
search_tweetsAdvanced search with Twitter operators (from:, since:, lang:, has:, …)
get_user_infoUser profile basics by screen name
get_user_aboutExtended profile / about page
get_user_followersFollowers with full profile metadata (paginated)
get_user_followingsFollowing list with profile metadata (paginated)
get_user_last_tweetsA user's recent tweets (timeline)
get_user_mentionsTweets that mention a user
get_tweets_by_idsBatch fetch tweets by ID (up to 100)
get_tweet_repliesReplies to a tweet
get_tweet_quotesQuote-tweets of a tweet
get_tweet_retweetersUsers who retweeted a tweet
get_trendsTrending 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):

json
{  "mcpServers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "@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:

json
{  "mcpServers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "@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
bash
claude mcp add twitterapi-io npx -- -y @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 @twitterapi_io/mcp-server with mcp-inspector to browse interactively:

bash
npx @modelcontextprotocol/inspector npx -y @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

bash
git clone https://github.com/kaitoInfra/twitterapi-io-mcp-server.gitcd twitterapi-io-mcp-servernpm installnpm run buildTWITTERAPI_IO_API_KEY=xxx npm run inspect  # opens mcp-inspector

Links

License

MIT © twitterapi.io

来源:README.md,提交 490bc06

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.1最新Oct 6, 2026
  2. v0.1.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Twitterapi 集成