twitterapi-io-mcp 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +176 -119
  2. package/index.js +1 -1
  3. package/package.json +9 -2
package/README.md CHANGED
@@ -1,59 +1,36 @@
1
1
  # twitterapi-io-mcp
2
2
 
3
- > **TL;DR**: Offline TwitterAPI.io documentation for Claude and AI assistants via MCP. No API key needed.
4
-
5
- ```bash
6
- # Quick Install (Claude Code)
7
- claude mcp add twitterapi-io -- npx -y twitterapi-io-mcp
8
- ```
3
+ > Offline TwitterAPI.io documentation for Claude and AI assistants via MCP. 59 endpoints, 19 guides, 21 blog posts. No API key needed.
9
4
 
10
5
  [![npm version](https://img.shields.io/npm/v/twitterapi-io-mcp.svg)](https://www.npmjs.com/package/twitterapi-io-mcp)
11
6
  [![npm downloads](https://img.shields.io/npm/dm/twitterapi-io-mcp.svg)](https://www.npmjs.com/package/twitterapi-io-mcp)
12
- [![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue?logo=anthropic)](https://registry.modelcontextprotocol.io)
7
+ [![Smithery](https://smithery.ai/badge/@dorukardahan/twitterapi-io-mcp)](https://smithery.ai/server/@dorukardahan/twitterapi-io-mcp)
8
+ [![GitHub stars](https://img.shields.io/github/stars/dorukardahan/twitterapi-io-mcp?style=social)](https://github.com/dorukardahan/twitterapi-io-mcp)
13
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
14
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18.18.0-brightgreen.svg)](https://nodejs.org/)
15
10
 
16
- ---
11
+ ```bash
12
+ # Quick install (Claude Code)
13
+ claude mcp add twitterapi-io -- npx -y twitterapi-io-mcp
14
+ ```
17
15
 
18
16
  ## What is this?
19
17
 
20
- An MCP (Model Context Protocol) server that gives Claude and other AI assistants **instant, offline access** to [TwitterAPI.io](https://twitterapi.io) documentation.
21
-
22
- **What's included:**
23
- - **59 API endpoints** with full documentation
24
- - **19 guide pages** (pricing, authentication, rate limits, etc.)
25
- - **21 blog posts** with tutorials and guides
26
-
27
- > **Disclaimer**: Unofficial community project. Not affiliated with TwitterAPI.io.
28
-
29
- ---
30
-
31
- ## For AI Assistants
32
-
33
- If you're an AI assistant using this MCP server, here's how to help users:
18
+ An MCP server that gives Claude, Cursor, VS Code Copilot, and other AI assistants **instant, offline access** to [TwitterAPI.io](https://twitterapi.io) documentation.
34
19
 
35
- | User wants... | Use this tool | Example |
36
- |---------------|---------------|---------|
37
- | Find an endpoint | `search_twitterapi_docs` | `query: "advanced search"` |
38
- | Endpoint details | `get_twitterapi_endpoint` | `endpoint_name: "tweet_advanced_search"` |
39
- | List all endpoints | `list_twitterapi_endpoints` | `category: "user"` (optional) |
40
- | Pricing info | `get_twitterapi_pricing` | - |
41
- | Auth guide | `get_twitterapi_auth` | - |
42
- | Any guide/page | `get_twitterapi_guide` | `guide_name: "qps_limits"` |
43
- | Fetch by URL | `get_twitterapi_url` | `url: "pricing"` |
20
+ - **59 API endpoints** with parameters, examples, and response schemas
21
+ - **19 guide pages** covering pricing, authentication, rate limits, webhooks
22
+ - **21 blog posts** with tutorials and use cases
23
+ - **Zero API key required** everything is bundled locally
44
24
 
45
- **Tips:**
46
- - Search is fuzzy/typo-tolerant: `"twet object"` still works
47
- - Use `max_results: 5` for focused results
48
- - Check `deprecation_notice` field for legacy endpoints
25
+ 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.
49
26
 
50
- ---
27
+ > **Disclaimer**: Independent community project. Not affiliated with TwitterAPI.io.
51
28
 
52
29
  ## Installation
53
30
 
54
- **Prerequisites:** Node.js `>=18.18.0`
31
+ **Requires:** Node.js 18.18.0+
55
32
 
56
- ### Claude Code (Recommended)
33
+ ### Claude Code (recommended)
57
34
 
58
35
  ```bash
59
36
  # Add globally (all projects)
@@ -84,58 +61,126 @@ Add to your config file:
84
61
  }
85
62
  ```
86
63
 
87
- ### Other MCP Clients
64
+ ### Cursor
88
65
 
89
- ```bash
90
- npx -y twitterapi-io-mcp
66
+ Add to `.cursor/mcp.json` in your project root:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "twitterapi-io": {
72
+ "command": "npx",
73
+ "args": ["-y", "twitterapi-io-mcp"]
74
+ }
75
+ }
76
+ }
91
77
  ```
92
78
 
93
- ---
79
+ ### VS Code / VS Code Insiders
80
+
81
+ Add to `.vscode/mcp.json` in your project root:
94
82
 
95
- ## Available Tools
83
+ ```json
84
+ {
85
+ "servers": {
86
+ "twitterapi-io": {
87
+ "command": "npx",
88
+ "args": ["-y", "twitterapi-io-mcp"]
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Windsurf
95
+
96
+ Add to `~/.codeium/windsurf/mcp_config.json`:
97
+
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "twitterapi-io": {
102
+ "command": "npx",
103
+ "args": ["-y", "twitterapi-io-mcp"]
104
+ }
105
+ }
106
+ }
107
+ ```
96
108
 
97
- | Tool | Description |
98
- |------|-------------|
99
- | `search_twitterapi_docs` | Full-text search across all docs (fuzzy matching) |
100
- | `get_twitterapi_endpoint` | Get detailed endpoint documentation |
101
- | `list_twitterapi_endpoints` | List endpoints by category |
102
- | `get_twitterapi_guide` | Get guide pages (pricing, auth, limits, etc.) |
103
- | `get_twitterapi_url` | Fetch content by URL or page key |
104
- | `get_twitterapi_pricing` | Quick pricing information |
105
- | `get_twitterapi_auth` | Quick authentication guide |
109
+ ### Docker
106
110
 
107
- ---
111
+ ```bash
112
+ docker run -i --rm $(docker build -q .) 2>/dev/null
113
+ ```
108
114
 
109
- ## API Endpoint Categories
115
+ Or build from source:
110
116
 
111
- | Category | Count | Examples |
112
- |----------|-------|----------|
113
- | **User** | 12 | get_user_by_username, get_user_followers, batch_get_user_by_userids |
114
- | **Tweet** | 8 | tweet_advanced_search, get_tweet_by_ids, get_tweet_replies_v2 |
115
- | **Community** | 9 | create_community_v2, get_community_by_id, join_community_v2 |
116
- | **Profile** | 3 | update_avatar_v2, update_banner_v2, update_profile_v2 |
117
- | **Webhook** | 4 | add_webhook_rule, get_webhook_rules, update_webhook_rule |
118
- | **Stream** | 3 | add_user_to_monitor_tweet, get_user_to_monitor_tweet |
119
- | **Action** | 14 | create_tweet_v2, like_tweet_v2, retweet_tweet_v2, upload_media_v2 |
120
- | **DM** | 2 | send_dm_v2, get_dm_history_by_user_id |
121
- | **List** | 2 | get_list_followers, get_list_members |
122
- | **Other** | 2 | get_trends, get_space_detail |
117
+ ```bash
118
+ git clone https://github.com/dorukardahan/twitterapi-io-mcp.git
119
+ cd twitterapi-io-mcp && npm install
120
+ node index.js
121
+ ```
123
122
 
124
- **Total: 59 endpoints**
123
+ ## Available tools
125
124
 
126
- ---
125
+ | Tool | Description | Best for |
126
+ |------|-------------|----------|
127
+ | `search_twitterapi_docs` | Full-text search across all docs (fuzzy matching, typo-tolerant) | Finding endpoints, guides, or blog posts by keyword |
128
+ | `get_twitterapi_endpoint` | Get full endpoint documentation with params, examples, response schema | Deep dive into a specific API endpoint |
129
+ | `list_twitterapi_endpoints` | List endpoints, optionally filtered by category | Browsing what's available in a category |
130
+ | `get_twitterapi_guide` | Get guide pages (pricing, auth, rate limits, webhooks, etc.) | Understanding platform rules and setup |
131
+ | `get_twitterapi_url` | Fetch content by URL path or page key | When you have a direct link to docs |
132
+ | `get_twitterapi_pricing` | Quick pricing overview | Cost questions |
133
+ | `get_twitterapi_auth` | Quick authentication guide | Auth setup and API key usage |
127
134
 
128
- ## Usage Examples
135
+ ## For AI assistants
129
136
 
130
- Ask Claude:
137
+ If you're an AI assistant using this MCP server, here's a quick reference:
131
138
 
132
- - *"What are the rate limits for TwitterAPI.io?"*
133
- - *"Show me the tweet advanced search endpoint"*
134
- - *"How do I authenticate with the API?"*
135
- - *"What's the pricing?"*
136
- - *"How do webhook filter rules work?"*
139
+ | User wants... | Use this tool | Example |
140
+ |---------------|---------------|---------|
141
+ | Find an endpoint | `search_twitterapi_docs` | `query: "advanced search"` |
142
+ | Endpoint details | `get_twitterapi_endpoint` | `endpoint_name: "tweet_advanced_search"` |
143
+ | List all endpoints | `list_twitterapi_endpoints` | `category: "user"` (optional) |
144
+ | Pricing info | `get_twitterapi_pricing` | No params needed |
145
+ | Auth guide | `get_twitterapi_auth` | No params needed |
146
+ | Any guide/page | `get_twitterapi_guide` | `guide_name: "qps_limits"` |
147
+ | Fetch by URL | `get_twitterapi_url` | `url: "pricing"` |
137
148
 
138
- ---
149
+ **Tips:**
150
+ - Search is fuzzy and typo-tolerant: `"twet object"` still finds results
151
+ - Use `max_results: 5` for focused results
152
+ - Check the `deprecation_notice` field — some legacy endpoints have v2 replacements
153
+
154
+ ## What can you ask?
155
+
156
+ Here are real prompts that work well with this MCP server:
157
+
158
+ - *"What are the rate limits for TwitterAPI.io?"* — triggers `get_twitterapi_guide`
159
+ - *"Show me the tweet advanced search endpoint"* — triggers `get_twitterapi_endpoint`
160
+ - *"How do I authenticate with the API?"* — triggers `get_twitterapi_auth`
161
+ - *"What's the pricing?"* — triggers `get_twitterapi_pricing`
162
+ - *"List all user-related endpoints"* — triggers `list_twitterapi_endpoints` with `category: "user"`
163
+ - *"How do webhook filter rules work?"* — triggers `search_twitterapi_docs`
164
+ - *"What endpoints are deprecated?"* — triggers `search_twitterapi_docs` with `query: "deprecated"`
165
+ - *"How do I upload media and create a tweet?"* — triggers sequential `get_twitterapi_endpoint` calls
166
+
167
+ <details>
168
+ <summary><strong>All 59 endpoints by category</strong></summary>
169
+
170
+ | Category | Count | Endpoints |
171
+ |----------|-------|-----------|
172
+ | **User** | 12 | `get_user_by_username`, `get_user_followers`, `get_user_followings`, `batch_get_user_by_userids`, and 8 more |
173
+ | **Tweet** | 8 | `tweet_advanced_search`, `get_tweet_by_ids`, `get_tweet_replies_v2`, `get_user_tweets`, and 4 more |
174
+ | **Community** | 9 | `create_community_v2`, `get_community_by_id`, `join_community_v2`, and 6 more |
175
+ | **Profile** | 3 | `update_avatar_v2`, `update_banner_v2`, `update_profile_v2` |
176
+ | **Webhook** | 4 | `add_webhook_rule`, `get_webhook_rules`, `update_webhook_rule`, `delete_webhook_rule` |
177
+ | **Stream** | 3 | `add_user_to_monitor_tweet`, `get_user_to_monitor_tweet`, `remove_user_from_monitor_tweet` |
178
+ | **Action** | 14 | `create_tweet_v2`, `like_tweet_v2`, `retweet_tweet_v2`, `upload_media_v2`, and 10 more |
179
+ | **DM** | 2 | `send_dm_v2`, `get_dm_history_by_user_id` |
180
+ | **List** | 2 | `get_list_followers`, `get_list_members` |
181
+ | **Other** | 2 | `get_trends`, `get_space_detail` |
182
+
183
+ </details>
139
184
 
140
185
  ## Configuration
141
186
 
@@ -143,79 +188,91 @@ Ask Claude:
143
188
  |---------------------|---------|-------------|
144
189
  | `TWITTERAPI_MCP_DISK_CACHE` | `1` (on) | Set to `0` to disable disk caching |
145
190
 
146
- ---
191
+ ## Troubleshooting
147
192
 
148
- ## How It Works
193
+ **`npx` hangs or fails on first run**
149
194
 
195
+ The first run downloads the package from npm. If it hangs, try:
196
+ ```bash
197
+ npx -y twitterapi-io-mcp@latest
150
198
  ```
151
- ┌─────────────┐ MCP Protocol ┌──────────────────┐
152
- │ Claude │ ◄──────────────────► │ twitterapi-io-mcp│
153
- │ (or any AI) │ │ │
154
- └─────────────┘ │ Local docs.json │
155
- │ (59 endpoints) │
156
- └──────────────────┘
157
- ```
199
+ Or install globally: `npm install -g twitterapi-io-mcp`
158
200
 
159
- 1. AI assistant calls MCP tools (search, get endpoint, etc.)
160
- 2. Server searches local documentation snapshot
161
- 3. Results returned instantly (no network needed)
201
+ **"Node.js version not supported"**
162
202
 
163
- ---
203
+ This server requires Node.js 18.18.0 or later. Check your version:
204
+ ```bash
205
+ node --version
206
+ ```
164
207
 
165
- ## Development
208
+ **`claude mcp add` not recognized**
166
209
 
210
+ Make sure Claude Code CLI is installed and up to date:
167
211
  ```bash
168
- git clone https://github.com/dorukardahan/twitterapi-io-mcp.git
169
- cd twitterapi-io-mcp
170
- npm install
171
- npm test # Run tests
172
- npm start # Start server
173
- npm run scrape # Update docs snapshot
212
+ claude --version
174
213
  ```
175
214
 
176
- ---
215
+ **Server starts but no tools appear**
216
+
217
+ Restart your MCP client after adding the server config. Most clients (Claude Desktop, Cursor) need a restart to detect new MCP servers.
218
+
219
+ ## How it works
177
220
 
178
- ## Technical Details
221
+ ```
222
+ ┌─────────────┐ MCP (stdio) ┌──────────────────┐
223
+ │ Claude / │ ◄──────────────────► │ twitterapi-io-mcp│
224
+ │ Cursor / │ │ │
225
+ │ VS Code │ │ Bundled docs │
226
+ └─────────────┘ │ (59 endpoints) │
227
+ └──────────────────┘
228
+ No network needed
229
+ ```
179
230
 
180
231
  | Property | Value |
181
232
  |----------|-------|
182
- | Runtime | Node.js 18.18.0+ |
183
- | Module System | ES Modules (no build step) |
233
+ | Runtime | Node.js 18.18.0+ (ES Modules, no build step) |
184
234
  | Protocol | MCP via stdio |
185
235
  | Caching | Hybrid (memory + disk), 24h TTL |
186
- | Search | N-gram fuzzy matching |
236
+ | Search | N-gram tokenization with fuzzy matching |
187
237
 
188
- ---
238
+ 1. AI assistant calls an MCP tool (search, get endpoint, etc.)
239
+ 2. Server searches the bundled documentation snapshot
240
+ 3. Results return instantly with no network requests
189
241
 
190
- ## Links
242
+ ## Why I built this
191
243
 
192
- - **npm**: https://www.npmjs.com/package/twitterapi-io-mcp
193
- - **GitHub**: https://github.com/dorukardahan/twitterapi-io-mcp
194
- - **MCP Registry**: https://registry.modelcontextprotocol.io
195
- - **TwitterAPI.io**: https://twitterapi.io
244
+ I use [TwitterAPI.io](https://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.
196
245
 
197
- ---
246
+ 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.
198
247
 
199
- ## Why I Built This
248
+ ## Development
200
249
 
201
- I use [TwitterAPI.io](https://twitterapi.io) for my projects and got tired of switching between my editor and docs. Now I just ask Claude. If it helps me, maybe it helps you too.
250
+ ```bash
251
+ git clone https://github.com/dorukardahan/twitterapi-io-mcp.git
252
+ cd twitterapi-io-mcp
253
+ npm install
254
+ npm test # Run tests (52 tests)
255
+ npm start # Start server locally
256
+ npm run scrape # Update docs snapshot from twitterapi.io
257
+ ```
202
258
 
203
- ---
259
+ ## Links
204
260
 
205
- ## Contributing
261
+ - **npm**: [twitterapi-io-mcp](https://www.npmjs.com/package/twitterapi-io-mcp)
262
+ - **GitHub**: [dorukardahan/twitterapi-io-mcp](https://github.com/dorukardahan/twitterapi-io-mcp)
263
+ - **MCP Registry**: [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io)
264
+ - **TwitterAPI.io**: [twitterapi.io](https://twitterapi.io)
206
265
 
207
- PRs welcome! Fork → branch → commit → PR.
266
+ ## Contributing
208
267
 
209
- ---
268
+ 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](https://github.com/dorukardahan/twitterapi-io-mcp/issues).
210
269
 
211
270
  ## License
212
271
 
213
272
  [MIT](LICENSE)
214
273
 
215
- ---
216
-
217
274
  ## Acknowledgments
218
275
 
219
276
  - [TwitterAPI.io](https://twitterapi.io) for the API service
220
- - [Anthropic](https://anthropic.com) for MCP
221
- - [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk)
277
+ - [Anthropic](https://anthropic.com) for the Model Context Protocol
278
+ - [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * TwitterAPI.io Documentation MCP Server v1.0.17
3
+ * TwitterAPI.io Documentation MCP Server v1.0.18
4
4
  *
5
5
  * Production-ready MCP server with:
6
6
  * - Comprehensive error handling with ErrorType classification
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twitterapi-io-mcp",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "mcpName": "io.github.dorukardahan/twitterapi-io-mcp",
5
5
  "description": "TwitterAPI.io MCP server providing offline access to docs (endpoints, pages, blogs) for Claude and other AI assistants",
6
6
  "main": "index.js",
@@ -34,7 +34,14 @@
34
34
  "anthropic",
35
35
  "offline-docs",
36
36
  "claude-mcp",
37
- "twitter-docs"
37
+ "twitter-docs",
38
+ "mcp-server",
39
+ "claude-desktop",
40
+ "tweet-search",
41
+ "social-media-api",
42
+ "twitter-data",
43
+ "cursor-mcp",
44
+ "windsurf-mcp"
38
45
  ],
39
46
  "author": "Doruk Ardahan",
40
47
  "license": "MIT",