Twitterapi Io Mcp

io.github.dorukardahan由 GitHub 账号 dorukardahan 发布v1.7.1更新于 Nov 7, 2026

Offline access to TwitterAPI.io docs for AI assistants. 67 endpoints, 32 pages, 24 blog posts.

发布方自己的服务:Twitterapi

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

内置 TwitterAPI.io 文档离线快照的 MCP 服务器,让助手在本地检索接口、指南、价格与鉴权信息。

可以做什么
  • 对内置文档做模糊全文搜索,覆盖接口、指南与博客文章
  • 查询单个接口的路径、参数、cURL 示例与响应结构
  • 按 user、tweet、community、webhook、stream、action、dm、list、trend 等分类浏览接口
  • 读取指南页面,或按 URL 与页面键获取内容,可选从线上站点抓取
  • 获取价格、积分消耗、QPS 限制以及 API 密钥鉴权说明
适用场景
适合基于 TwitterAPI.io 开发时使用,让助手不离开编辑器就能回答接口、参数、价格、速率限制或鉴权相关问题。若只是想直接调用 Twitter 接口则不需要,因为它只提供文档。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 18.18.0 或更高版本。文档已内置,无需 API 密钥或账号。可用一个可选环境变量关闭磁盘缓存。线上抓取仅限厂商自有域名。
安装前请注意
文档为快照,可能落后于线上服务,依赖前应核实。可选的线上抓取会向厂商文档域名发起请求。文档涉及使用登录 Cookie 与代理设置的写入类接口,相关凭据需自行保管。该项目为独立社区项目,与厂商无隶属关系。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

twitterapi-io-mcp

Offline TwitterAPI.io documentation for Claude and AI assistants via MCP. 76 active endpoints (with full method/params/body), 32 guides, 24 blog posts. No API key needed.

[npm version] [npm downloads] [Smithery] [GitHub stars] [License: MIT]

bash
# Quick install (Claude Code)claude mcp add twitterapi-io -- npx -y twitterapi-io-mcp

What is this?

An MCP server that gives Claude, Cursor, VS Code Copilot, and other AI assistants instant, offline access to TwitterAPI.io documentation.

  • 76 active API endpoints with full HTTP method, body/query parameters, cURL examples, and response schemas
  • 32 guide pages covering pricing, authentication, rate limits, webhooks, streaming
  • 24 blog posts with tutorials and use cases
  • All v2 write endpoints documented with login_cookies, proxy, and body params
  • All deprecated v1 endpoints removed — only current v2 endpoints remain
  • Zero API key required — everything is bundled locally

Unlike other Twitter MCP servers that proxy live API calls (and need your API key), this one ships a complete documentation snapshot. Your AI assistant reads it locally, instantly.

Recent Changes

  • v1.2.0: OpenAPI-first scraper rewrite — structured parameters with types, response schemas, eliminates Vercel checkpoint issues
  • v1.1.x: Added list_timeline + get_user_timeline, removed 7 deprecated V1 endpoints, security fixes (hono, ajv, express-rate-limit)
  • v1.0.23: Platform advisory — Twitter disabled since:/until: search operators. Use since_time:UNIX / until_time:UNIX instead
  • v1.0.22: Added 7 endpoints (get_space_detail, get_tweet_replies_v2, get_user_about, etc.)

See CHANGELOG.md for full history.

Disclaimer: Independent community project. Not affiliated with TwitterAPI.io.

Installation

Previously published as twitterapi-docs-mcp? Just change the package name — everything else stays the same.

Requires: Node.js 18.18.0+

Claude Code (recommended)

bash
# Add globally (all projects)claude mcp add --scope user twitterapi-io -- npx -y twitterapi-io-mcp
# Or project-onlyclaude mcp add twitterapi-io -- npx -y twitterapi-io-mcp
# Verifyclaude mcp list

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
json
{  "mcpServers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "twitterapi-io-mcp"]    }  }}

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "twitterapi-io-mcp"]    }  }}

VS Code / VS Code Insiders

Add to .vscode/mcp.json in your project root:

json
{  "servers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "twitterapi-io-mcp"]    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "twitterapi-io": {      "command": "npx",      "args": ["-y", "twitterapi-io-mcp"]    }  }}

Docker

bash
docker run -i --rm $(docker build -q .) 2>/dev/null

Or build from source:

bash
git clone https://github.com/dorukardahan/twitterapi-io-mcp.gitcd twitterapi-io-mcp && npm installnode index.js

Available tools

ToolDescriptionBest for
search_twitterapi_docsFull-text search across all docs (fuzzy matching, typo-tolerant)Finding endpoints, guides, or blog posts by keyword
get_twitterapi_endpointGet full endpoint documentation with params, examples, response schemaDeep dive into a specific API endpoint
list_twitterapi_endpointsList endpoints, optionally filtered by categoryBrowsing what's available in a category
get_twitterapi_guideGet guide pages (pricing, auth, rate limits, webhooks, etc.)Understanding platform rules and setup
get_twitterapi_urlFetch content by URL path or page keyWhen you have a direct link to docs
get_twitterapi_pricingQuick pricing overviewCost questions
get_twitterapi_authQuick authentication guideAuth setup and API key usage

For AI assistants

If you're an AI assistant using this MCP server, here's a quick reference:

User wants...Use this toolExample
Find an endpointsearch_twitterapi_docsquery: "advanced search"
Endpoint detailsget_twitterapi_endpointendpoint_name: "tweet_advanced_search"
List all endpointslist_twitterapi_endpointscategory: "user" (optional)
Pricing infoget_twitterapi_pricingNo params needed
Auth guideget_twitterapi_authNo params needed
Any guide/pageget_twitterapi_guideguide_name: "qps_limits"
Fetch by URLget_twitterapi_urlurl: "pricing"

Tips:

  • Search is fuzzy and typo-tolerant: "twet object" still finds results
  • Use max_results: 5 for focused results
  • All endpoints are current v2 — no deprecated endpoints remain

What can you ask?

Here are real prompts that work well with this MCP server:

  • "What are the rate limits for TwitterAPI.io?" — triggers get_twitterapi_guide
  • "Show me the tweet advanced search endpoint" — triggers get_twitterapi_endpoint
  • "How do I authenticate with the API?" — triggers get_twitterapi_auth
  • "What's the pricing?" — triggers get_twitterapi_pricing
  • "List all user-related endpoints" — triggers list_twitterapi_endpoints with category: "user"
  • "How do webhook filter rules work?" — triggers search_twitterapi_docs
  • "What write endpoints need login?" — triggers search_twitterapi_docs with query: "login_cookies"
  • "How do I upload media and create a tweet?" — triggers sequential get_twitterapi_endpoint calls
All 76 endpoints by category
CategoryCountEndpoints
User14get_user_by_username, get_user_about, search_user, batch_get_user_by_userids, get_user_last_tweets, get_user_timeline, get_user_mention, get_user_followers, get_user_verified_followers, get_user_followings, check_follow_relationship, get_my_info, get_user_followers_ids, get_user_subscriptions
Other2get_space_detail, bookmarks_v2
Trend1get_trends
Tweet10get_tweet_by_ids, get_article, get_tweet_reply, get_tweet_replies_v2, get_tweet_thread_context, get_tweet_quote, get_tweet_retweeter, tweet_advanced_search, bookmark_tweet_v2, unbookmark_tweet_v2
List6list_timeline, get_list_members, get_list_followers, add_list_member, remove_list_member, get_list_tweets
Community9get_all_community_tweets, create_community_v2, delete_community_v2, join_community_v2, leave_community_v2, get_community_by_id, get_community_members, get_community_moderators, get_community_tweets
Action25user_login_v2, create_tweet_v2, upload_media_v2, like_tweet_v2, unlike_tweet_v2, delete_tweet_v2, retweet_tweet_v2, follow_user_v2, unfollow_user_v2, update_avatar_v2, update_banner_v2, update_profile_v2, login_by_2fa, login_by_email_or_username, upload_image, create_tweet, like_tweet, retweet_tweet, block_user_v2, mute_user_v2, pin_tweet_v2, unblock_user_v2, unmute_user_v2, unpin_tweet_v2, unretweet_tweet_v2
Dm2send_dm_v2, get_dm_history
Webhook4get_webhook_rules, add_webhook_rule, update_webhook_rule, delete_webhook_rule
Stream3add_user_to_monitor_tweet, remove_user_to_monitor_tweet, get_user_to_monitor_tweet

Configuration

Environment VariableDefaultDescription
TWITTERAPI_MCP_DISK_CACHE1 (on)Set to 0 to disable disk caching

Troubleshooting

npx hangs or fails on first run

The first run downloads the package from npm. If it hangs, try:

bash
npx -y twitterapi-io-mcp@latest

Or install globally: npm install -g twitterapi-io-mcp

"Node.js version not supported"

This server requires Node.js 18.18.0 or later. Check your version:

bash
node --version

claude mcp add not recognized

Make sure Claude Code CLI is installed and up to date:

bash
claude --version

Server starts but no tools appear

Restart your MCP client after adding the server config. Most clients (Claude Desktop, Cursor) need a restart to detect new MCP servers.

How it works

┌─────────────┐     MCP (stdio)      ┌──────────────────┐│   Claude /   │ ◄──────────────────► │ twitterapi-io-mcp││  Cursor /    │                      │                  ││  VS Code     │                      │  Bundled docs    │└─────────────┘                      │  (76 endpoints)  │                                     └──────────────────┘                                       No network needed
PropertyValue
RuntimeNode.js 18.18.0+ (ES Modules, no build step)
ProtocolMCP via stdio
CachingHybrid (memory + disk), 24h TTL
SearchN-gram tokenization with fuzzy matching
  1. AI assistant calls an MCP tool (search, get endpoint, etc.)
  2. Server searches the bundled documentation snapshot
  3. Results return instantly with no network requests

Why I built this

I use TwitterAPI.io daily for my projects. Switching between my editor and their docs site got old fast. So I packaged the entire documentation into an MCP server. Now I ask Claude and get answers without leaving my terminal.

If you work with the Twitter/X API through TwitterAPI.io, this saves you the same context-switching. Install it, forget about it, and just ask.

Development

bash
git clone https://github.com/dorukardahan/twitterapi-io-mcp.gitcd twitterapi-io-mcpnpm installnpm test        # Run tests (48 tests)npm start       # Start server locallynpm run scrape  # Update docs snapshot from twitterapi.io

Not using MCP?

If your AI tool doesn't support MCP (like OpenClaw), use the skill version instead — a single markdown file with all 76 active endpoints:

👉 twitterapi-io-skill — works with OpenClaw, Claude, GPT, Gemini, and any LLM.

Links

Contributing

PRs welcome! Fork the repo, create a branch, make your changes, and open a pull request. Bug reports and feature requests go to GitHub Issues.

License

MIT

Acknowledgments

来源:README.md,提交 2e006a0

工具

7

search_twitterapi_docs

Search TwitterAPI.io documentation: API endpoints, guides (pricing, rate limits, filter rules), and blog posts. USE THIS WHEN: You need to find information across the entire documentation. RETURNS: Ranked results with endpoint paths, descriptions, and relevance scores. Examples: - "advanced search" → finds tweet search endpoints - "rate limit" → finds QPS limits and pricing info - "webhook" → finds webhook setup endpoints - "getUserInfo" → finds user info endpoints (supports camelCase)

输入参数query必填max_results

get_twitterapi_endpoint

Get complete documentation for a specific TwitterAPI.io endpoint. USE THIS WHEN: You know the exact endpoint name (e.g., from search results). RETURNS: Full details including path, parameters, cURL example, and code snippets. Common endpoints: - get_user_info, get_user_followers, get_user_following - tweet_advanced_search, get_tweet_by_id - add_webhook_rule, get_webhook_rules

输入参数endpoint_name必填

list_twitterapi_endpoints

List all TwitterAPI.io API endpoints organized by category. USE THIS WHEN: You need to browse available endpoints or find endpoints by category. CATEGORIES: user, tweet, community, webhook, stream, action, dm, list, trend RETURNS: Endpoint names with HTTP method and path for each category.

输入参数category

get_twitterapi_guide

Get a TwitterAPI.io page from the offline snapshot by page key. USE THIS WHEN: You need the full content of a specific page (guides, docs, policies, contact, etc.). TIP: Use search_twitterapi_docs if you don't know the page key. RETURNS: Full guide content with headers, paragraphs, and code examples.

输入参数guide_name必填

get_twitterapi_url

Fetch a TwitterAPI.io or docs.twitterapi.io URL. USE THIS WHEN: You have a specific link and want its full content. RETURNS: Parsed content from the offline snapshot. If not found, you can set fetch_live=true (restricted to twitterapi.io/docs.twitterapi.io).

输入参数url必填fetch_live

get_twitterapi_pricing

Get TwitterAPI.io pricing information: credit system, endpoint costs, QPS limits. USE THIS WHEN: You need to know API costs, credit calculations, or rate limits. RETURNS: Pricing tiers, credit costs per endpoint, QPS limits by balance level.

无需输入参数。

get_twitterapi_auth

Get TwitterAPI.io authentication guide: API key usage, headers, code examples. USE THIS WHEN: You need to set up authentication or see request examples. RETURNS: API key header format, base URL, cURL/Python/JavaScript examples.

无需输入参数。

版本历史

15
  1. v1.7.1最新Nov 6, 2026
  2. v1.7.0Nov 3, 2026
  3. v1.6.2Oct 29, 2026
  4. v1.6.1Oct 25, 2026
  5. v1.6.0Oct 24, 2026
  6. v1.5.31Oct 23, 2026
  7. v1.5.30Oct 21, 2026
  8. v1.5.29Oct 19, 2026
  9. v1.5.28Oct 18, 2026
  10. v1.5.26Oct 17, 2026
  11. v1.5.25Oct 16, 2026
  12. v1.5.24Oct 13, 2026
  13. v1.5.23Oct 7, 2026
  14. v1.5.22Oct 6, 2026
  15. v1.5.19Sep 16, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Twitterapi 集成