This MCP server provides offline access to TwitterAPI.io documentation for AI assistants, enabling instant lookup of 54 API endpoints, guides, and blog posts without internet access.
Core Capabilities:
Search documentation - Full-text fuzzy search across all endpoints, guides, and blog posts with camelCase/underscore support and typo tolerance
Get endpoint details - Retrieve complete API documentation including HTTP methods, paths, parameters, cURL examples, and code snippets
Browse endpoints by category - List all 54 endpoints organized by 9 categories (user, tweet, community, webhook, stream, action, dm, list, trend)
Access guide pages - Fetch full content of documentation pages like pricing, authentication, QPS limits, filter rules, privacy policy, terms of service, and changelogs
Fetch content by URL - Retrieve content from specific TwitterAPI.io URLs using the offline snapshot with optional live fetching fallback
Get pricing information - Quick access to pricing tiers, credit costs per endpoint, and QPS rate limits
Get authentication guide - Comprehensive authentication setup with API key headers, base URLs, and code examples in cURL, Python, and JavaScript
Key Features:
Offline-first operation with hybrid caching (memory + disk, 24-hour TTL) for optimal performance
Tool chaining support with suggested follow-up actions in search results
Instant retrieval without network latency
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@twitterapi-io-mcpsearch for rate limit information"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
twitterapi-io-mcp
npm packages
twitterapi-io-mcp(recommended, canonical)twitterapi-docs-mcp(deprecated compatibility wrapper → delegates totwitterapi-io-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.
Links
npm (recommended): https://www.npmjs.com/package/twitterapi-io-mcp
npm (legacy): https://www.npmjs.com/package/twitterapi-docs-mcp
Context7 (canonical): https://context7.com/dorukardahan/twitterapi-io-mcp
Context7 (legacy slugs): https://context7.com/dorukardahan/twitterapi-docs-mcp, https://context7.com/dorukardahan/twitterapi.io-mcp
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
54 API endpoints documented
Site + docs pages via sitemap + internal link crawl (pricing, QPS limits, privacy, contact, terms, acceptable use, dashboard, etc.)
Blog posts via blog index crawl (and internal discovery)
Offline-first - Works without network access
Fast search with fuzzy matching and camelCase support
Hybrid caching for optimal performance
Installation
Prerequisites
Node.js
>=18.18.0(required to run the MCP server)Claude Code users: the
claudeCLI installed (forclaude mcp add)
Note: This MCP server serves an offline docs snapshot. You do not need a TwitterAPI.io key just to use the docs tools.
Claude Desktop
Requires Node.js >=18.18.0 (because this runs via npx).
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude Code
Requires Node.js >=18.18.0 (because this runs via npx).
Verify installation:
Troubleshooting:
claude: command not found→ install Claude Code / theclaudeCLI firstnpxfails or shows syntax errors → upgrade Node.js to>=18.18.0Corporate networks → ensure npm can reach the registry (or configure your proxy/registry)
Quick preflight:
node -vandclaude --versionshould both work before runningclaude mcp add
Optional Configuration
TWITTERAPI_MCP_DISK_CACHE=0disables disk cache across sessions (default: on). TTL cleanup runs hourly.
Available Tools
Tool | Description |
| Full-text search across all docs (endpoints, guides, blogs) |
| Get detailed info for a specific API endpoint |
| List all endpoints with optional category filter |
| Get a page by key (guides + other site/docs pages) |
| Fetch by URL, bare path ( |
| Quick access to pricing information |
| Quick access to authentication guide |
Available Resources
Note: resources are optional. The canonical guide fetch is get_twitterapi_guide (e.g., guide_name: "changelog").
Resource URI | Description |
| Pricing guide |
| QPS limits and rate limiting |
| Tweet filter rules syntax |
| Introduction to TwitterAPI.io |
| Authentication guide |
| Full endpoint listing |
| Data freshness status |
MCP Tool Recipes
If you’re evaluating this MCP via Context7 or want copy/pasteable “tool chaining” patterns, see CONTEXT7.md.
Focused, single-purpose recipes are in recipes/ (e.g. recipes/01-auth-summary.md, recipes/07-rate-limits.md).
Common workflows:
Rate limits:
search_twitterapi_docs("rate limit qps") →get_twitterapi_guide("qps_limits")Typos are OK:
search_twitterapi_docsis fuzzy/typo-tolerant (e.g.,"twet object")Tweets Lookup:
get_twitterapi_endpoint("get_tweet_by_ids")
Context7 Quick Recipes (copy/paste)
Search → refine → endpoint details (Q2)
Filter to type: "endpoint" results. If none, retry with a narrower query like "advanced search endpoint".
Then fetch details using the returned name:
Ambiguity handling (if multiple endpoints are close in score):
Then pick the top type: "endpoint" result and call get_twitterapi_endpoint with its name.
Routing tips (dynamic refinement):
If a result includes
next, you can directly callnext.toolwithnext.arguments.If you get only
page/blogresults, route toget_twitterapi_guideorget_twitterapi_urlinstead ofget_twitterapi_endpoint.
Changelogs via get_twitterapi_guide (Q7)
Do not use resources/read for this question; the canonical tool is get_twitterapi_guide.
Tweets Lookup endpoint details (Q9)
Tweets Lookup maps to endpoint_name: "get_tweet_by_ids".
Auth metadata (Q1)
Endpoint details also include an auth block (header/base URL). For per-endpoint extras, scan description/parameters for login_cookie or proxy.
Authentication page snapshot (Q6)
Fallback if the snapshot is missing:
Pagination search (Q5)
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 | 11 | get_user_by_username, get_user_followers, batch_get_user_by_userids |
Tweet | 7 | tweet_advanced_search, get_tweet_by_ids, get_tweet_quote |
Community | 9 | create_community_v2, get_community_by_id, join_community_v2 |
Webhook | 4 | add_webhook_rule, get_webhook_rules |
Stream | 2 | add_user_to_monitor_tweet, remove_user_to_monitor_tweet |
Action | 15 | create_tweet_v2, like_tweet_v2, upload_media_v2 |
DM | 2 | send_dm_v2, get_dm_history_by_user_id |
List | 2 | get_list_followers, get_list_members |
Trend | 1 | get_trends |
Other | 1 | get_space_detail |
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:
Note: The scraper is included in the repository but not in the npm package.
Development
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