
Mcp Server
io.twitterapiv1.0.0更新于 Oct 6, 2026
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
概览
让助手通过 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 请求头中发给供应商接口。README 展示用 npx 在本地安装(需要 Node.js),而注册信息列出远程端点 mcp.twitterapi.io。需要能访问 twitterapi.io 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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:
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):
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:
VS Code (Copilot Chat with MCP)
Add to your MCP servers config — same shape as Claude Desktop / Cursor.
Claude Code
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:
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/sdkv1 - 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
Links
- 🔗 twitterapi.io — REST API homepage + signup
- 📖 twitterapi.io docs — full API reference
- 🧰 Model Context Protocol — protocol homepage
- 🐛 Report issues
License
MIT © twitterapi.io
来源:README.md,提交 e2b312b
工具
0版本历史
1- v1.0.0最新Oct 6, 2026

