twitterapi-io-mcp 1.0.9 → 1.0.10
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.
- package/README.md +93 -8
- package/data/docs.json +644 -164
- package/index.js +145 -38
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# twitterapi-io-mcp
|
|
2
2
|
|
|
3
3
|
**npm packages**
|
|
4
|
-
- `twitterapi-io-mcp` (recommended)
|
|
5
|
-
- `twitterapi-docs-mcp` (
|
|
4
|
+
- `twitterapi-io-mcp` (recommended, canonical)
|
|
5
|
+
- `twitterapi-docs-mcp` (deprecated compatibility wrapper → delegates to `twitterapi-io-mcp`)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/twitterapi-io-mcp)
|
|
8
8
|
[](https://www.npmjs.com/package/twitterapi-io-mcp)
|
|
@@ -32,7 +32,7 @@ I'm sharing this with the community because if it helped me, it might help you t
|
|
|
32
32
|
|
|
33
33
|
## Features
|
|
34
34
|
|
|
35
|
-
- **
|
|
35
|
+
- **54 API endpoints** documented
|
|
36
36
|
- **Site + docs pages** via sitemap + internal link crawl (pricing, QPS limits, privacy, contact, terms, acceptable use, dashboard, etc.)
|
|
37
37
|
- **Blog posts** via blog index crawl (and internal discovery)
|
|
38
38
|
- **Offline-first** - Works without network access
|
|
@@ -41,8 +41,16 @@ I'm sharing this with the community because if it helped me, it might help you t
|
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
44
|
+
**Prerequisites**
|
|
45
|
+
- Node.js `>=18.18.0` (required to run the MCP server)
|
|
46
|
+
- Claude Code users: the `claude` CLI installed (for `claude mcp add`)
|
|
47
|
+
|
|
48
|
+
Note: This MCP server serves an **offline docs snapshot**. You do **not** need a TwitterAPI.io key just to use the docs tools.
|
|
49
|
+
|
|
44
50
|
### Claude Desktop
|
|
45
51
|
|
|
52
|
+
Requires Node.js `>=18.18.0` (because this runs via `npx`).
|
|
53
|
+
|
|
46
54
|
Add to your Claude Desktop configuration file:
|
|
47
55
|
|
|
48
56
|
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
@@ -61,12 +69,17 @@ Add to your Claude Desktop configuration file:
|
|
|
61
69
|
|
|
62
70
|
### Claude Code
|
|
63
71
|
|
|
72
|
+
Requires Node.js `>=18.18.0` (because this runs via `npx`).
|
|
73
|
+
|
|
64
74
|
```bash
|
|
65
75
|
# Add globally (all projects)
|
|
66
76
|
claude mcp add --scope user twitterapi-io -- npx -y twitterapi-io-mcp
|
|
67
77
|
|
|
68
78
|
# Or add to current project only
|
|
69
79
|
claude mcp add twitterapi-io -- npx -y twitterapi-io-mcp
|
|
80
|
+
|
|
81
|
+
# Legacy name (still works, but deprecated)
|
|
82
|
+
claude mcp add --scope user twitterapi-docs -- npx -y twitterapi-docs-mcp
|
|
70
83
|
```
|
|
71
84
|
|
|
72
85
|
Verify installation:
|
|
@@ -74,6 +87,11 @@ Verify installation:
|
|
|
74
87
|
claude mcp list
|
|
75
88
|
```
|
|
76
89
|
|
|
90
|
+
Troubleshooting:
|
|
91
|
+
- `claude: command not found` → install Claude Code / the `claude` CLI first
|
|
92
|
+
- `npx` fails or shows syntax errors → upgrade Node.js to `>=18.18.0`
|
|
93
|
+
- Corporate networks → ensure npm can reach the registry (or configure your proxy/registry)
|
|
94
|
+
|
|
77
95
|
## Available Tools
|
|
78
96
|
|
|
79
97
|
| Tool | Description |
|
|
@@ -88,6 +106,8 @@ claude mcp list
|
|
|
88
106
|
|
|
89
107
|
## Available Resources
|
|
90
108
|
|
|
109
|
+
Note: resources are optional. The canonical guide fetch is `get_twitterapi_guide` (e.g., `guide_name: "changelog"`).
|
|
110
|
+
|
|
91
111
|
| Resource URI | Description |
|
|
92
112
|
|--------------|-------------|
|
|
93
113
|
| `twitterapi://guides/pricing` | Pricing guide |
|
|
@@ -99,6 +119,70 @@ claude mcp list
|
|
|
99
119
|
| `twitterapi://endpoints/list` | Full endpoint listing |
|
|
100
120
|
| `twitterapi://status/freshness` | Data freshness status |
|
|
101
121
|
|
|
122
|
+
## MCP Tool Recipes
|
|
123
|
+
|
|
124
|
+
If you’re evaluating this MCP via Context7 or want copy/pasteable “tool chaining” patterns, see `CONTEXT7.md`.
|
|
125
|
+
|
|
126
|
+
Focused, single-purpose recipes are in `recipes/` (e.g. `recipes/01-auth-summary.md`, `recipes/07-rate-limits.md`).
|
|
127
|
+
|
|
128
|
+
Common workflows:
|
|
129
|
+
- **Rate limits**: `search_twitterapi_docs` (`"rate limit qps"`) → `get_twitterapi_guide` (`"qps_limits"`)
|
|
130
|
+
- **Typos are OK**: `search_twitterapi_docs` is fuzzy/typo-tolerant (e.g., `"twet object"`)
|
|
131
|
+
- **Tweets Lookup**: `get_twitterapi_endpoint` (`"get_tweet_by_ids"`)
|
|
132
|
+
|
|
133
|
+
## Context7 Quick Recipes (copy/paste)
|
|
134
|
+
|
|
135
|
+
### Search → refine → endpoint details (Q2)
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{ "tool": "search_twitterapi_docs", "arguments": { "query": "advanced search", "max_results": 10 } }
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Filter to `type: "endpoint"` results. If none, retry with a narrower query like `"advanced search endpoint"`.
|
|
142
|
+
Then fetch details using the returned `name`:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{ "tool": "get_twitterapi_endpoint", "arguments": { "endpoint_name": "tweet_advanced_search" } }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Changelogs via `get_twitterapi_guide` (Q7)
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{ "tool": "get_twitterapi_guide", "arguments": { "guide_name": "changelog" } }
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Tweets Lookup endpoint details (Q9)
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{ "tool": "get_twitterapi_endpoint", "arguments": { "endpoint_name": "get_tweet_by_ids" } }
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Auth metadata (Q1)
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{ "tool": "get_twitterapi_auth", "arguments": {} }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Endpoint details also include an `auth` block (header/base URL). For per-endpoint extras, scan `description`/`parameters` for `login_cookie` or `proxy`.
|
|
167
|
+
|
|
168
|
+
### Authentication page snapshot (Q6)
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{ "tool": "get_twitterapi_url", "arguments": { "url": "/documentation/authentication" } }
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Fallback if the snapshot is missing:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{ "tool": "get_twitterapi_guide", "arguments": { "guide_name": "authentication" } }
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Pagination search (Q5)
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{ "tool": "search_twitterapi_docs", "arguments": { "query": "pagination cursor next_cursor", "max_results": 10 } }
|
|
184
|
+
```
|
|
185
|
+
|
|
102
186
|
## Usage Examples
|
|
103
187
|
|
|
104
188
|
Once installed, you can ask Claude questions like:
|
|
@@ -114,15 +198,16 @@ Once installed, you can ask Claude questions like:
|
|
|
114
198
|
|
|
115
199
|
| Category | Count | Examples |
|
|
116
200
|
|----------|-------|----------|
|
|
117
|
-
| **User** |
|
|
118
|
-
| **Tweet** | 7 | tweet_advanced_search,
|
|
119
|
-
| **Community** |
|
|
201
|
+
| **User** | 11 | get_user_by_username, get_user_followers, batch_get_user_by_userids |
|
|
202
|
+
| **Tweet** | 7 | tweet_advanced_search, get_tweet_by_ids, get_tweet_quote |
|
|
203
|
+
| **Community** | 9 | create_community_v2, get_community_by_id, join_community_v2 |
|
|
120
204
|
| **Webhook** | 4 | add_webhook_rule, get_webhook_rules |
|
|
121
|
-
| **Stream** | 2 | add_user_to_monitor_tweet |
|
|
122
|
-
| **Action** |
|
|
205
|
+
| **Stream** | 2 | add_user_to_monitor_tweet, remove_user_to_monitor_tweet |
|
|
206
|
+
| **Action** | 15 | create_tweet_v2, like_tweet_v2, upload_media_v2 |
|
|
123
207
|
| **DM** | 2 | send_dm_v2, get_dm_history_by_user_id |
|
|
124
208
|
| **List** | 2 | get_list_followers, get_list_members |
|
|
125
209
|
| **Trend** | 1 | get_trends |
|
|
210
|
+
| **Other** | 1 | get_space_detail |
|
|
126
211
|
|
|
127
212
|
## How It Works
|
|
128
213
|
|