twitterapi-docs-mcp
MCP (Model Context Protocol) server providing offline access to TwitterAPI.io documentation for Claude and other AI assistants.
README
twitterapi-docs-mcp
MCP (Model Context Protocol) server providing offline access to TwitterAPI.io documentation for Claude and other AI assistants.
Disclaimer: This is an unofficial community project. Not affiliated with, endorsed by, or sponsored by TwitterAPI.io. TwitterAPI.io is a trademark of its respective owner.
Why I Built This
I'm an independent developer who uses TwitterAPI.io for my projects. I found myself constantly switching between my code editor and the documentation website, searching for endpoint details, checking rate limits, and looking up authentication requirements.
So I built this MCP server to have instant access to the entire documentation right inside Claude. No more tab-switching, no more searching — just ask Claude and get the answer.
I'm sharing this with the community because if it helped me, it might help you too. 🚀
Features
- 52 API endpoints documented
- 8 guide pages (pricing, QPS limits, filter rules, changelog, etc.)
- 5 blog articles (pricing comparison, analytics guide, etc.)
- Offline-first - Works without network access
- Fast search with fuzzy matching and camelCase support
- Hybrid caching for optimal performance
Installation
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"twitterapi-docs": {
"command": "npx",
"args": ["-y", "twitterapi-docs-mcp"]
}
}
}
Claude Code
# Add globally (all projects)
claude mcp add --scope user twitterapi-docs -- npx -y twitterapi-docs-mcp
# Or add to current project only
claude mcp add twitterapi-docs -- npx -y twitterapi-docs-mcp
Verify installation:
claude mcp list
Available Tools
| Tool | Description |
|---|---|
search_twitterapi_docs |
Full-text search across all docs (endpoints, guides, blogs) |
get_twitterapi_endpoint |
Get detailed info for a specific API endpoint |
list_twitterapi_endpoints |
List all endpoints with optional category filter |
get_twitterapi_guide |
Get guide pages (pricing, qps_limits, authentication, etc.) |
get_twitterapi_pricing |
Quick access to pricing information |
get_twitterapi_auth |
Quick access to authentication guide |
Available Resources
| Resource URI | Description |
|---|---|
twitterapi://guides/pricing |
Pricing guide |
twitterapi://guides/qps-limits |
QPS limits and rate limiting |
twitterapi://guides/filter-rules |
Tweet filter rules syntax |
twitterapi://guides/changelog |
API changelog |
twitterapi://guides/introduction |
Introduction to TwitterAPI.io |
twitterapi://guides/authentication |
Authentication guide |
twitterapi://endpoints/list |
Full endpoint listing |
twitterapi://status/freshness |
Data freshness status |
Usage Examples
Once installed, you can ask Claude questions like:
- "What are the QPS limits for TwitterAPI.io?"
- "Show me the advanced search endpoint"
- "How do webhook filter rules work?"
- "How do I get user followers?"
- "What's the pricing structure?"
- "How do I authenticate with the API?"
API Endpoint Categories
| Category | Count | Examples |
|---|---|---|
| User | 9 | get_user_by_username, get_user_followers, get_user_followings |
| Tweet | 7 | tweet_advanced_search, get_tweet_reply, get_tweet_quote |
| Community | 5 | get_community_by_id, get_community_members |
| Webhook | 4 | add_webhook_rule, get_webhook_rules |
| Stream | 2 | add_user_to_monitor_tweet |
| Action | 16 | create_tweet, like_tweet, follow_user_v2 |
| DM | 2 | send_dm_v2, get_dm_history_by_user_id |
| List | 2 | get_list_followers, get_list_members |
| Trend | 1 | get_trends |
How It Works
This MCP server bundles a snapshot of TwitterAPI.io documentation (scraped with permission patterns). When Claude or another MCP-compatible AI assistant needs information about TwitterAPI.io:
- The assistant calls one of the available tools
- The server searches/retrieves from the local documentation cache
- Results are returned instantly without network latency
The documentation includes:
- Complete API reference with request/response examples
- Authentication guides
- Rate limiting information
- Pricing details
- Best practices
Updating Documentation
If TwitterAPI.io updates their documentation, clone the repo and run the scraper:
git clone https://github.com/dorukardahan/twitterapi-docs-mcp.git
cd twitterapi-docs-mcp
npm install
node scrape-all.cjs
Note: The scraper is included in the repository but not in the npm package.
Development
# Clone repository
git clone https://github.com/dorukardahan/twitterapi-docs-mcp.git
cd twitterapi-docs-mcp
# Install dependencies
npm install
# Run tests
npm test
# Start server locally
npm start
Technical Details
- Runtime: Node.js 18.18.0+
- Module System: ES Modules (no build step)
- Protocol: MCP (Model Context Protocol) via stdio
- Caching: Hybrid (memory + disk) with 24-hour TTL
- Search: Advanced tokenization with n-gram fuzzy matching
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT - see LICENSE file for details.
Acknowledgments
- TwitterAPI.io for providing excellent Twitter/X API access
- Anthropic for the Model Context Protocol
- MCP SDK for the server framework
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。