Mcp Server

io.twitterapiv1.0.0更新於 Oct 6, 2026

Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.

概覽

AI 產生的概覽

讓助理透過 twitterapi.io 讀取 Twitter/X 資料:推文搜尋、使用者個人檔案、追蹤者、回覆、引用、轉推者與趨勢。

功能
這是 twitterapi.io 提供的託管 MCP 伺服器,提供 12 個唯讀工具,與供應商的正式端點一一對應。工具涵蓋使用 Twitter 運算子的進階推文搜尋、使用者個人檔案與 about 查詢、追蹤者與追蹤中清單、使用者近期推文與提及、依 ID 批次取得推文、回覆、引用推文、轉推者,以及依地區查詢熱門趨勢。回傳清單的工具以 next_cursor 欄位分頁,失敗的請求會以指數退避重試。
適用情境
適合助理需要最新 Twitter/X 資料進行研究、監測或報告的情境:搜尋某主題的近期貼文、查看帳號個人檔案或時間軸、取得追蹤者或互動清單,或查看某地區的熱門趨勢。它為唯讀,適合分析而非發文或帳號管理。
執行需求
需要 twitterapi.io 的 API 金鑰,透過環境變數 TWITTERAPI_IO_API_KEY 提供;伺服器會將它放在 X-API-Key 標頭中送到供應商 API。README 示範以 npx 在本機安裝(需要 Node.js),而登錄資訊列出遠端端點 mcp.twitterapi.io。需要能連線至 twitterapi.io 的網路。
安裝前請注意
此 API 金鑰屬於憑證:每次工具呼叫都會將它傳送給第三方服務 twitterapi.io,應視為可計費的機密,避免分享設定檔。查詢內容以及你查看的帳號或推文都會傳送給該供應商。伺服器依設計為唯讀,不包含發文、按讚、轉推、追蹤、私訊、登入、媒體上傳與帳號刪除。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "mcp-server": {
      "type": "http",
      "url": "https://mcp.twitterapi.io/v1/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,提交 e2b312b

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.0.0最新Oct 6, 2026