xbird-mcp 0.1.3

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 +135 -0
  2. package/dist/mcp.js +54 -0
  3. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # xbird-mcp — Twitter/X MCP Server with x402 Micropayments
2
+
3
+ MCP server that gives AI agents (Claude, Cursor, Windsurf) **30 Twitter/X tools** — reading, searching, posting, engagement, media upload — with per-call x402 micropayments on Base.
4
+
5
+ Runs locally on your machine using your Twitter cookies, so requests come from a residential IP (no datacenter blocks).
6
+
7
+ ## How It Works
8
+
9
+ ```
10
+ AI Agent (Claude Code / Cursor / Windsurf)
11
+ | MCP stdio
12
+ xbird-mcp (local process)
13
+ |-- Pay x402 --> xbird server (payment gateway)
14
+ '-- Execute --> Twitter API (your local IP)
15
+ ```
16
+
17
+ The xbird server only verifies payments. All Twitter API calls happen locally from your machine.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ bunx xbird-mcp
23
+ # or
24
+ npx xbird-mcp
25
+ ```
26
+
27
+ No global install needed — `bunx`/`npx` runs it directly.
28
+
29
+ ## Setup
30
+
31
+ ### Claude Code
32
+
33
+ Add to `~/.claude.json`:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "xbird": {
39
+ "command": "bunx",
40
+ "args": ["xbird-mcp"],
41
+ "env": {
42
+ "XBIRD_AUTH_TOKEN": "your_auth_token",
43
+ "XBIRD_CT0": "your_ct0",
44
+ "XBIRD_PRIVATE_KEY": "0x_your_wallet_private_key"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### Cursor / Windsurf
52
+
53
+ Same config in the MCP settings section of your IDE.
54
+
55
+ ## Getting Twitter Cookies
56
+
57
+ 1. Open [x.com](https://x.com) in your browser
58
+ 2. DevTools -> Application -> Cookies -> `https://x.com`
59
+ 3. Copy `auth_token` and `ct0` values
60
+
61
+ ## Environment Variables
62
+
63
+ | Variable | Required | Description |
64
+ |----------|----------|-------------|
65
+ | `XBIRD_AUTH_TOKEN` | Yes | Twitter `auth_token` cookie |
66
+ | `XBIRD_CT0` | Yes | Twitter `ct0` cookie |
67
+ | `XBIRD_PRIVATE_KEY` | Yes | Wallet private key for USDC payments (Base network) |
68
+ | `XBIRD_SERVER_URL` | No | Payment server URL (default: xbird production server) |
69
+
70
+ ## Tools (30)
71
+
72
+ ### Read — $0.001/call
73
+
74
+ | Tool | Description |
75
+ |------|-------------|
76
+ | `get_tweet` | Get a tweet by ID |
77
+ | `get_thread` | Get a tweet thread (conversation chain) |
78
+ | `get_replies` | Get replies to a tweet |
79
+ | `get_user` | Get user profile by handle |
80
+ | `get_user_about` | Get detailed user info (bio, location, joined date) |
81
+ | `get_current_user` | Get the authenticated user's profile |
82
+ | `get_home_timeline` | Get home timeline |
83
+ | `get_news` | Get trending news/topics |
84
+ | `get_lists` | Get owned Twitter lists |
85
+ | `get_list_timeline` | Get tweets from a list |
86
+
87
+ ### Search — $0.005/call
88
+
89
+ | Tool | Description |
90
+ |------|-------------|
91
+ | `search_tweets` | Search for tweets by query |
92
+ | `get_mentions` | Get mentions for a user |
93
+
94
+ ### Bulk — $0.01/call
95
+
96
+ | Tool | Description |
97
+ |------|-------------|
98
+ | `get_user_tweets` | Get tweets posted by a user |
99
+ | `get_followers` | Get a user's followers |
100
+ | `get_following` | Get users that a user follows |
101
+ | `get_likes` | Get tweets liked by a user |
102
+ | `get_bookmarks` | Get bookmarked tweets |
103
+ | `get_list_memberships` | Get lists the user is a member of |
104
+
105
+ ### Write — $0.01/call
106
+
107
+ | Tool | Description |
108
+ |------|-------------|
109
+ | `post_tweet` | Post a new tweet |
110
+ | `reply_to_tweet` | Reply to a tweet |
111
+ | `post_thread` | Post a thread (multiple tweets) |
112
+ | `like_tweet` | Like a tweet |
113
+ | `unlike_tweet` | Unlike a tweet |
114
+ | `retweet` | Retweet a tweet |
115
+ | `unretweet` | Remove a retweet |
116
+ | `bookmark_tweet` | Bookmark a tweet |
117
+ | `unbookmark_tweet` | Remove a bookmark |
118
+ | `follow_user` | Follow a user |
119
+ | `unfollow_user` | Unfollow a user |
120
+
121
+ ### Media — $0.05/call
122
+
123
+ | Tool | Description |
124
+ |------|-------------|
125
+ | `upload_media` | Upload image/video, returns mediaId for use in tweets |
126
+
127
+ ## Payments
128
+
129
+ Every tool call makes a micropayment via the [x402 protocol](https://www.x402.org/) on Base (L2). You need a wallet with USDC on Base.
130
+
131
+ Prices range from $0.001 (reading a tweet) to $0.05 (uploading media).
132
+
133
+ ## License
134
+
135
+ MIT