io.github.dorukardahan/twitterapi-docs-mcp

平台与服务

by dorukardahan

为 AI assistants 提供 TwitterAPI.io 文档离线访问,涵盖 52 个 endpoints、使用指南与定价信息。

什么是 io.github.dorukardahan/twitterapi-docs-mcp

为 AI assistants 提供 TwitterAPI.io 文档离线访问,涵盖 52 个 endpoints、使用指南与定价信息。

README

twitterapi-io-mcp

Offline TwitterAPI.io documentation for Claude and AI assistants via MCP. 67 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.

  • 67 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-only
claude mcp add twitterapi-io -- npx -y twitterapi-io-mcp

# Verify
claude 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.git
cd twitterapi-io-mcp && npm install
node 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
<details> <summary><strong>All 67 endpoints by category</strong></summary>
CategoryCountEndpoints
User11get_user_by_username, get_user_timeline, get_user_last_tweets, get_user_followers, get_user_followings, get_user_mention, get_user_verified_followers, get_user_about, batch_get_user_by_userids, check_follow_relationship, search_user
Tweet8tweet_advanced_search, get_tweet_by_ids, get_tweet_reply, get_tweet_replies_v2, get_tweet_quote, get_tweet_retweeter, get_tweet_thread_context, get_article
Action8create_tweet_v2, delete_tweet_v2, like_tweet_v2, unlike_tweet_v2, retweet_tweet_v2, follow_user_v2, unfollow_user_v2, upload_media_v2
Community9get_community_by_id, get_community_members, get_community_moderators, get_community_tweets, get_all_community_tweets, create_community_v2, delete_community_v2, join_community_v2, leave_community_v2
List6get_list_followers, get_list_members, get_list_tweets, list_timeline, add_list_member, remove_list_member
Profile3update_avatar_v2, update_banner_v2, update_profile_v2
Webhook4add_webhook_rule, get_webhook_rules, update_webhook_rule, delete_webhook_rule
Stream3add_user_to_monitor_tweet, get_user_to_monitor_tweet, remove_user_to_monitor_tweet
Auth1user_login_v2
DM2get_dm_history, send_dm_v2
Account1get_my_info
Other2get_trends, get_space_detail
</details>

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

code
┌─────────────┐     MCP (stdio)      ┌──────────────────┐
│   Claude /   │ ◄──────────────────► │ twitterapi-io-mcp│
│  Cursor /    │                      │                  │
│  VS Code     │                      │  Bundled docs    │
└─────────────┘                      │  (67 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.git
cd twitterapi-io-mcp
npm install
npm test        # Run tests (48 tests)
npm start       # Start server locally
npm 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 67 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

常见问题

io.github.dorukardahan/twitterapi-docs-mcp 是什么?

为 AI assistants 提供 TwitterAPI.io 文档离线访问,涵盖 52 个 endpoints、使用指南与定价信息。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论