@twitterapis/mcp 0.3.1 → 0.5.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0 (2026-07-06)
4
+
5
+ ### Added
6
+
7
+ - `twitter_user_followers_v2` and `twitter_user_following_v2` — the v2 response shape (richer profile fields and more reliable cursoring for large follower/following audiences). Same inputs as the v1 tools (`username` / `user_id` + `cursor`). Catalog is now **40 tools** (29 reads + 11 write actions).
8
+
9
+ ### No breaking changes
10
+
3
11
  ## 0.3.0 (2026-06-29)
4
12
 
5
13
  ### Added
package/README.md CHANGED
@@ -87,7 +87,7 @@ Restart Claude Desktop. The `twitter_*` tools appear in the tool picker.
87
87
 
88
88
  ## Tools
89
89
 
90
- 37 tools: 27 reads and 10 write actions. Most user endpoints accept `username` (handle without @) **or** `user_id` (`twitter_user_likes` and `twitter_user_tweets_complete` require `user_id`); tweet endpoints accept `id` **or** `url`; paginated endpoints return a `cursor` you pass back to get the next page.
90
+ 40 tools: 29 reads and 11 write actions. Most user endpoints accept `username` (handle without @) **or** `user_id` (`twitter_user_likes` and `twitter_user_tweets_complete` require `user_id`); tweet endpoints accept `id` **or** `url`; paginated endpoints return a `cursor` you pass back to get the next page.
91
91
 
92
92
  Public reads (search, profiles, tweets, followers, likes) work with just your API key. The **account-only** reads (bookmarks, DMs, home timeline, followers-you-know) and **all write actions** act AS an authenticated X account, so they need a session linked to your key first (returns HTTP 409 until then). Alternatively, pass **per-call inline credentials** on any of those tools (`auth_token` + `ct0`, with optional `proxy_url` / `user_agent`) to act AS that account for a single call without pre-registering a session, so one API key can act as many accounts. For write actions, set `proxy_url` to a residential proxy, since X soft-blocks writes that egress from datacenter IPs. Each write tool is annotated `readOnlyHint: false`; reversing actions (delete, unfollow, unlike, unretweet, unbookmark) are annotated `destructiveHint: true` so MCP clients can prompt before running them.
93
93
 
@@ -110,6 +110,8 @@ Public reads (search, profiles, tweets, followers, likes) work with just your AP
110
110
  | `twitter_user_likes` | Tweets a user has liked (public Likes tab) |
111
111
  | `twitter_user_followers` | Accounts that follow a user |
112
112
  | `twitter_user_following` | Accounts a user follows |
113
+ | `twitter_user_followers_v2` | Followers with the v2 response shape (richer fields, deeper cursoring) |
114
+ | `twitter_user_following_v2` | Following with the v2 response shape (richer fields, deeper cursoring) |
113
115
  | `twitter_user_verified_followers` | A user's verified followers only |
114
116
  | `twitter_followers_you_know` | Followers of a target that your authenticated account also follows |
115
117
  | `twitter_tweet_detail` | Single tweet: text, author, metrics, media, quoted/reply context |
@@ -133,6 +135,7 @@ Public reads (search, profiles, tweets, followers, likes) work with just your AP
133
135
  | `twitter_retweet` / `twitter_unretweet` | Retweet / undo retweet |
134
136
  | `twitter_bookmark_tweet` / `twitter_unbookmark_tweet` | Bookmark / remove bookmark |
135
137
  | `twitter_follow_user` / `twitter_unfollow_user` | Follow / unfollow a user by id |
138
+ | `twitter_dm_send` | Send a Direct Message to a user by their numeric `recipient_id` |
136
139
 
137
140
  ## Usage examples
138
141
 
@@ -201,7 +204,7 @@ count: 50
201
204
 
202
205
  ## Pricing
203
206
 
204
- Calls are billed to your twitterapis.com account, every price 20% below getxapi.com per endpoint. Almost every endpoint is $0.0008/call: all reads (search, profiles, tweets, followers, likes) plus the simple write actions (like, retweet, bookmark, follow and their undos, delete, media upload). At the read rate that works out to $0.04 per 1,000 tweets, since each call returns about 20 tweets. The premium endpoints cost a little more: tweet creation and DM reads (`twitter_dm_list`, `twitter_dm_conversation`) at $0.0016/call, profile updates (name, avatar, banner) at $0.0016/call, full tweet history (`twitter_user_tweets_complete`) at $0.0024/call, and a full tweet thread (`twitter_tweet_thread`) at $0.004/call. Your first $0.50 is free. See [twitterapis.com/pricing](https://www.twitterapis.com/pricing).
207
+ Calls are billed to your twitterapis.com account, every price 20% below getxapi.com per endpoint. Almost every endpoint is $0.0008/call: all reads (search, profiles, tweets, followers, likes) plus the simple write actions (like, retweet, bookmark, follow and their undos, delete). At the read rate that works out to $0.04 per 1,000 tweets, since each call returns about 20 tweets. The premium endpoints cost a little more: tweet creation, sending a DM (`twitter_dm_send`), and DM reads (`twitter_dm_list`, `twitter_dm_conversation`) at $0.0016/call, full tweet history (`twitter_user_tweets_complete`) at $0.0024/call, and a full tweet thread (`twitter_tweet_thread`) at $0.004/call. Your first $0.50 is free. See [twitterapis.com/pricing](https://www.twitterapis.com/pricing).
205
208
 
206
209
  ## Links
207
210
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twitterapis/mcp",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "Official MCP server for twitterapis.com, the Twitter/X API (search, users, followers, tweets, threads, lists, likes, bookmarks, DMs) plus write actions (post/like/retweet/follow) as native tools for Claude, Cursor, and any MCP client.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/tools.js CHANGED
@@ -225,6 +225,20 @@ export const TOOLS = [
225
225
  "List the accounts that a given user follows. Returns profile data for each account followed. Paginate with cursor. Useful for mapping a user's information sources, influencer networks, or competitor monitoring lists.",
226
226
  shape: { ...USER_REF, ...PAGINATION },
227
227
  },
228
+ {
229
+ name: "twitter_user_followers_v2",
230
+ path: "/twitter/user/followers_v2",
231
+ description:
232
+ "List a user's followers using the v2 response shape (richer profile fields and more reliable cursoring for large audiences). Same inputs as twitter_user_followers; prefer this when you need the fuller v2 payload or are paging deep follower lists.",
233
+ shape: { ...USER_REF, ...PAGINATION },
234
+ },
235
+ {
236
+ name: "twitter_user_following_v2",
237
+ path: "/twitter/user/following_v2",
238
+ description:
239
+ "List the accounts a user follows using the v2 response shape (richer profile fields and more reliable cursoring). Same inputs as twitter_user_following; prefer this when you need the fuller v2 payload or are paging deep following lists.",
240
+ shape: { ...USER_REF, ...PAGINATION },
241
+ },
228
242
  {
229
243
  name: "twitter_user_verified_followers",
230
244
  path: "/twitter/user/verified_followers",
@@ -333,6 +347,23 @@ export const TOOLS = [
333
347
  ...INLINE,
334
348
  },
335
349
  },
350
+ {
351
+ name: "twitter_dm_send",
352
+ path: "/twitter/dm/send",
353
+ method: "POST",
354
+ write: true,
355
+ description:
356
+ "Send a Direct Message AS your authenticated account. Provide the recipient's numeric user id (recipient_id, resolve a @handle with twitter_user_info first) and the message text. Requires an authenticated session with write capability behind your key; X soft-blocks writes from datacenter IPs, so route through a residential proxy_url for reliability. Returns message_id and conversation_id. Delivers a real DM and is not silently reversible.",
357
+ shape: {
358
+ recipient_id: z.string().describe(
359
+ "Numeric Twitter/X user id of the recipient (e.g. '44196397'). Resolve a @handle to its id with twitter_user_info first. The recipient must allow DMs from you.",
360
+ ),
361
+ text: z.string().min(1).describe(
362
+ "The Direct Message body text to send (non-empty).",
363
+ ),
364
+ ...ACCOUNT, ...INLINE,
365
+ },
366
+ },
336
367
 
337
368
  // ── Writes: tweet authoring ────────────────────────────────────────────────
338
369
  {