atproto-mcp 0.3.0 → 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/README.md +73 -102
- package/dist/cli.d.ts +8 -1
- package/dist/cli.js +25 -7
- package/dist/health-check.d.ts +0 -1
- package/dist/health-check.js +2 -2
- package/dist/index.d.ts +6 -1
- package/dist/index.js +219 -86
- package/dist/prompts/index.d.ts +12 -4
- package/dist/prompts/index.js +21 -11
- package/dist/resources/base.d.ts +0 -1
- package/dist/resources/base.js +0 -1
- package/dist/resources/conversation-context-resource.d.ts +7 -8
- package/dist/resources/conversation-context-resource.js +10 -12
- package/dist/resources/index.d.ts +1 -3
- package/dist/resources/index.js +6 -6
- package/dist/tools/implementations/advanced-social-tools.d.ts +326 -48
- package/dist/tools/implementations/advanced-social-tools.js +311 -101
- package/dist/tools/implementations/analytics-tools.d.ts +80 -168
- package/dist/tools/implementations/analytics-tools.js +138 -493
- package/dist/tools/implementations/analyze-account-tool.d.ts +586 -0
- package/dist/tools/implementations/analyze-account-tool.js +1145 -0
- package/dist/tools/implementations/base-tool.d.ts +100 -1
- package/dist/tools/implementations/base-tool.js +203 -6
- package/dist/tools/implementations/batch-operations-tools.d.ts +60 -116
- package/dist/tools/implementations/batch-operations-tools.js +234 -230
- package/dist/tools/implementations/composite-tools.d.ts +287 -9
- package/dist/tools/implementations/composite-tools.js +402 -72
- package/dist/tools/implementations/content-discovery-tools.d.ts +214 -77
- package/dist/tools/implementations/content-discovery-tools.js +334 -269
- package/dist/tools/implementations/content-management-tools.d.ts +160 -13
- package/dist/tools/implementations/content-management-tools.js +155 -60
- package/dist/tools/implementations/create-post-tool.d.ts +506 -16
- package/dist/tools/implementations/create-post-tool.js +273 -97
- package/dist/tools/implementations/create-thread-tool.d.ts +69 -2
- package/dist/tools/implementations/create-thread-tool.js +121 -11
- package/dist/tools/implementations/discover-tool.d.ts +345 -0
- package/dist/tools/implementations/discover-tool.js +773 -0
- package/dist/tools/implementations/follow-user-tool.d.ts +69 -7
- package/dist/tools/implementations/follow-user-tool.js +102 -62
- package/dist/tools/implementations/get-author-feed-tool.d.ts +163 -0
- package/dist/tools/implementations/get-author-feed-tool.js +146 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts +113 -1
- package/dist/tools/implementations/get-user-profile-tool.js +150 -25
- package/dist/tools/implementations/index.d.ts +11 -13
- package/dist/tools/implementations/index.js +12 -16
- package/dist/tools/implementations/like-post-tool.d.ts +72 -4
- package/dist/tools/implementations/like-post-tool.js +76 -23
- package/dist/tools/implementations/media-tools.d.ts +271 -230
- package/dist/tools/implementations/media-tools.js +514 -258
- package/dist/tools/implementations/moderation-tools.d.ts +324 -4
- package/dist/tools/implementations/moderation-tools.js +372 -28
- package/dist/tools/implementations/reply-to-post-tool.d.ts +49 -4
- package/dist/tools/implementations/reply-to-post-tool.js +78 -43
- package/dist/tools/implementations/repost-tool.d.ts +80 -3
- package/dist/tools/implementations/repost-tool.js +142 -22
- package/dist/tools/implementations/rich-media-tools.d.ts +66 -99
- package/dist/tools/implementations/rich-media-tools.js +64 -192
- package/dist/tools/implementations/search-actors-tool.d.ts +108 -0
- package/dist/tools/implementations/search-actors-tool.js +109 -0
- package/dist/tools/implementations/search-posts-tool.d.ts +116 -37
- package/dist/tools/implementations/search-posts-tool.js +127 -123
- package/dist/tools/implementations/social-graph-tools.d.ts +226 -49
- package/dist/tools/implementations/social-graph-tools.js +271 -149
- package/dist/tools/implementations/timeline-tools.d.ts +91 -32
- package/dist/tools/implementations/timeline-tools.js +79 -128
- package/dist/tools/index.d.ts +13 -1
- package/dist/tools/index.js +8 -28
- package/dist/types/index.d.ts +44 -17
- package/dist/types/index.js +6 -12
- package/dist/utils/atp-client.d.ts +37 -4
- package/dist/utils/atp-client.js +157 -21
- package/dist/utils/config.d.ts +15 -2
- package/dist/utils/config.js +55 -44
- package/dist/utils/firehose-client.d.ts +19 -2
- package/dist/utils/firehose-client.js +96 -15
- package/dist/utils/logger.d.ts +16 -1
- package/dist/utils/logger.js +29 -5
- package/dist/utils/oauth-client.d.ts +0 -1
- package/dist/utils/oauth-client.js +10 -7
- package/dist/utils/performance.d.ts +0 -1
- package/dist/utils/performance.js +0 -1
- package/dist/utils/security.d.ts +8 -1
- package/dist/utils/security.js +31 -7
- package/dist/utils/url-safety.d.ts +0 -1
- package/dist/utils/url-safety.js +37 -1
- package/package.json +15 -11
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/health-check.d.ts.map +0 -1
- package/dist/health-check.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/prompts/index.d.ts.map +0 -1
- package/dist/prompts/index.js.map +0 -1
- package/dist/resources/base.d.ts.map +0 -1
- package/dist/resources/base.js.map +0 -1
- package/dist/resources/conversation-context-resource.d.ts.map +0 -1
- package/dist/resources/conversation-context-resource.js.map +0 -1
- package/dist/resources/index.d.ts.map +0 -1
- package/dist/resources/index.js.map +0 -1
- package/dist/test/integration-config.d.ts +0 -60
- package/dist/test/integration-config.d.ts.map +0 -1
- package/dist/test/integration-config.js +0 -93
- package/dist/test/integration-config.js.map +0 -1
- package/dist/test/setup.d.ts +0 -78
- package/dist/test/setup.d.ts.map +0 -1
- package/dist/test/setup.js +0 -138
- package/dist/test/setup.js.map +0 -1
- package/dist/tools/implementations/advanced-social-tools.d.ts.map +0 -1
- package/dist/tools/implementations/advanced-social-tools.js.map +0 -1
- package/dist/tools/implementations/analytics-tools.d.ts.map +0 -1
- package/dist/tools/implementations/analytics-tools.js.map +0 -1
- package/dist/tools/implementations/analyze-engagement-tool.d.ts +0 -105
- package/dist/tools/implementations/analyze-engagement-tool.d.ts.map +0 -1
- package/dist/tools/implementations/analyze-engagement-tool.js +0 -229
- package/dist/tools/implementations/analyze-engagement-tool.js.map +0 -1
- package/dist/tools/implementations/base-tool.d.ts.map +0 -1
- package/dist/tools/implementations/base-tool.js.map +0 -1
- package/dist/tools/implementations/batch-operations-tools.d.ts.map +0 -1
- package/dist/tools/implementations/batch-operations-tools.js.map +0 -1
- package/dist/tools/implementations/composite-tools.d.ts.map +0 -1
- package/dist/tools/implementations/composite-tools.js.map +0 -1
- package/dist/tools/implementations/content-discovery-tools.d.ts.map +0 -1
- package/dist/tools/implementations/content-discovery-tools.js.map +0 -1
- package/dist/tools/implementations/content-management-tools.d.ts.map +0 -1
- package/dist/tools/implementations/content-management-tools.js.map +0 -1
- package/dist/tools/implementations/create-post-tool.d.ts.map +0 -1
- package/dist/tools/implementations/create-post-tool.js.map +0 -1
- package/dist/tools/implementations/create-thread-tool.d.ts.map +0 -1
- package/dist/tools/implementations/create-thread-tool.js.map +0 -1
- package/dist/tools/implementations/discover-trending-tool.d.ts +0 -107
- package/dist/tools/implementations/discover-trending-tool.d.ts.map +0 -1
- package/dist/tools/implementations/discover-trending-tool.js +0 -284
- package/dist/tools/implementations/discover-trending-tool.js.map +0 -1
- package/dist/tools/implementations/follow-user-tool.d.ts.map +0 -1
- package/dist/tools/implementations/follow-user-tool.js.map +0 -1
- package/dist/tools/implementations/generate-alt-text-tool.d.ts +0 -77
- package/dist/tools/implementations/generate-alt-text-tool.d.ts.map +0 -1
- package/dist/tools/implementations/generate-alt-text-tool.js +0 -128
- package/dist/tools/implementations/generate-alt-text-tool.js.map +0 -1
- package/dist/tools/implementations/get-user-profile-tool.d.ts.map +0 -1
- package/dist/tools/implementations/get-user-profile-tool.js.map +0 -1
- package/dist/tools/implementations/index.d.ts.map +0 -1
- package/dist/tools/implementations/index.js.map +0 -1
- package/dist/tools/implementations/like-post-tool.d.ts.map +0 -1
- package/dist/tools/implementations/like-post-tool.js.map +0 -1
- package/dist/tools/implementations/media-tools.d.ts.map +0 -1
- package/dist/tools/implementations/media-tools.js.map +0 -1
- package/dist/tools/implementations/moderation-tools.d.ts.map +0 -1
- package/dist/tools/implementations/moderation-tools.js.map +0 -1
- package/dist/tools/implementations/oauth-tools.d.ts +0 -108
- package/dist/tools/implementations/oauth-tools.d.ts.map +0 -1
- package/dist/tools/implementations/oauth-tools.js +0 -202
- package/dist/tools/implementations/oauth-tools.js.map +0 -1
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +0 -1
- package/dist/tools/implementations/reply-to-post-tool.js.map +0 -1
- package/dist/tools/implementations/repost-tool.d.ts.map +0 -1
- package/dist/tools/implementations/repost-tool.js.map +0 -1
- package/dist/tools/implementations/rich-media-tools.d.ts.map +0 -1
- package/dist/tools/implementations/rich-media-tools.js.map +0 -1
- package/dist/tools/implementations/search-posts-tool.d.ts.map +0 -1
- package/dist/tools/implementations/search-posts-tool.js.map +0 -1
- package/dist/tools/implementations/social-graph-tools.d.ts.map +0 -1
- package/dist/tools/implementations/social-graph-tools.js.map +0 -1
- package/dist/tools/implementations/streaming-tools.d.ts +0 -221
- package/dist/tools/implementations/streaming-tools.d.ts.map +0 -1
- package/dist/tools/implementations/streaming-tools.js +0 -445
- package/dist/tools/implementations/streaming-tools.js.map +0 -1
- package/dist/tools/implementations/timeline-tools.d.ts.map +0 -1
- package/dist/tools/implementations/timeline-tools.js.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/utils/atp-client.d.ts.map +0 -1
- package/dist/utils/atp-client.js.map +0 -1
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/firehose-client.d.ts.map +0 -1
- package/dist/utils/firehose-client.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/oauth-client.d.ts.map +0 -1
- package/dist/utils/oauth-client.js.map +0 -1
- package/dist/utils/performance.d.ts.map +0 -1
- package/dist/utils/performance.js.map +0 -1
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/utils/security.js.map +0 -1
- package/dist/utils/url-safety.d.ts.map +0 -1
- package/dist/utils/url-safety.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,13 +35,15 @@ direct access to the AT Protocol ecosystem, enabling seamless interaction with
|
|
|
35
35
|
Bluesky and other AT Protocol-based social networks.
|
|
36
36
|
|
|
37
37
|
**Supports both authenticated and unauthenticated modes** - Start immediately
|
|
38
|
-
with public data access (view profiles,
|
|
39
|
-
authentication for full functionality (search,
|
|
40
|
-
feeds).
|
|
38
|
+
with public data access (view profiles, search accounts, fetch
|
|
39
|
+
follower/following lists), or add authentication for full functionality (search,
|
|
40
|
+
write operations, private data, feeds).
|
|
41
41
|
|
|
42
|
+
> **Zero-config launch**: `npx atproto-mcp` runs the server in unauthenticated
|
|
43
|
+
> public-data mode — no credentials required.
|
|
44
|
+
>
|
|
42
45
|
> **Recent additions**: Batch operations for bulk actions, advanced analytics
|
|
43
|
-
> and insights, intelligent content discovery
|
|
44
|
-
> scratchpad resource.
|
|
46
|
+
> and insights, and intelligent content discovery.
|
|
45
47
|
|
|
46
48
|
## Architecture
|
|
47
49
|
|
|
@@ -91,22 +93,24 @@ server to access AT Protocol functionality.
|
|
|
91
93
|
|
|
92
94
|
### Core Features
|
|
93
95
|
|
|
94
|
-
- **Unauthenticated Mode**:
|
|
95
|
-
profiles
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
- **Zero-config Unauthenticated Mode**: Run `npx atproto-mcp` to access public
|
|
97
|
+
data without any setup - view profiles, search accounts, and fetch
|
|
98
|
+
follower/following lists
|
|
99
|
+
- **Optional Authentication**: Enable full functionality with app passwords for
|
|
100
|
+
write operations, feeds, and private data
|
|
98
101
|
- **Complete AT Protocol Integration**: Full implementation using official
|
|
99
102
|
`@atproto/api`
|
|
100
103
|
- **MCP Server Compliance**: Built with `@modelcontextprotocol/sdk` following
|
|
101
104
|
MCP specification
|
|
102
105
|
- **Type-Safe**: Written in TypeScript with strict type checking
|
|
103
|
-
- **Comprehensive Tools**:
|
|
104
|
-
- **Real-time Support** _(experimental)_: WebSocket firehose scaffolding with
|
|
105
|
-
keyword/user buffer scanning — frame decoding is not yet implemented, so no
|
|
106
|
-
live events are delivered yet
|
|
106
|
+
- **Comprehensive Tools**: 43 MCP tools for social networking operations
|
|
107
107
|
- **Rate Limiting**: Built-in respect for AT Protocol rate limits
|
|
108
108
|
- **Extensible**: Modular architecture for easy customization
|
|
109
109
|
|
|
110
|
+
> **Planned**: OAuth login and real-time firehose streaming are on the roadmap
|
|
111
|
+
> but not yet functional. App-password authentication is the supported auth path
|
|
112
|
+
> today.
|
|
113
|
+
|
|
110
114
|
## Who Is This For?
|
|
111
115
|
|
|
112
116
|
### Primary Audience: LLM Clients
|
|
@@ -151,14 +155,30 @@ should either:
|
|
|
151
155
|
|
|
152
156
|
## Installation
|
|
153
157
|
|
|
158
|
+
Run it with no install and no configuration — `npx atproto-mcp` launches the
|
|
159
|
+
server in unauthenticated public-data mode immediately:
|
|
160
|
+
|
|
154
161
|
```bash
|
|
155
|
-
|
|
162
|
+
npx atproto-mcp
|
|
156
163
|
```
|
|
157
164
|
|
|
158
|
-
Or
|
|
165
|
+
Or install globally:
|
|
159
166
|
|
|
160
167
|
```bash
|
|
161
|
-
|
|
168
|
+
npm install -g atproto-mcp
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Claude Desktop
|
|
172
|
+
|
|
173
|
+
Add this to your Claude Desktop MCP configuration to run the server with zero
|
|
174
|
+
config:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"atproto": { "command": "npx", "args": ["-y", "atproto-mcp"] }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
162
182
|
```
|
|
163
183
|
|
|
164
184
|
## Quick Start
|
|
@@ -192,22 +212,24 @@ npx atproto-mcp
|
|
|
192
212
|
|
|
193
213
|
- View user profiles (`get_user_profile` - works without auth, provides
|
|
194
214
|
additional viewer-specific data when authenticated)
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
`
|
|
215
|
+
- Search for accounts by handle or name (`search_actors`)
|
|
216
|
+
- List a user's posts (`get_author_feed`)
|
|
217
|
+
- View follower/following lists (`get_user_connections` with
|
|
218
|
+
`direction: 'followers' | 'follows'` - ENHANCED mode: works without auth,
|
|
219
|
+
enriches the underlying API call when authenticated)
|
|
199
220
|
|
|
200
221
|
**Note:** The following features require authentication:
|
|
201
222
|
|
|
202
223
|
- Searching posts and hashtags (`search_posts`) - **API changed in 2025 to
|
|
203
224
|
require authentication**
|
|
204
|
-
- Browsing feeds and threads (`
|
|
225
|
+
- Browsing feeds and threads (`get_post_context`, `get_custom_feed`,
|
|
226
|
+
`get_timeline`)
|
|
205
227
|
- All write operations (create, like, repost, follow, etc.)
|
|
206
228
|
- Resources (timeline, profile, notifications) - these are listed but require
|
|
207
|
-
authentication to return data
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
229
|
+
authentication to return data
|
|
230
|
+
|
|
231
|
+
Prompts (content composition, reply templates) are pure text templates and work
|
|
232
|
+
without authentication.
|
|
211
233
|
|
|
212
234
|
**Important:** All tools, resources, and prompts are listed by the MCP server
|
|
213
235
|
regardless of authentication state. Most tools and resources that require
|
|
@@ -247,7 +269,7 @@ credentials.
|
|
|
247
269
|
|
|
248
270
|
## Available Tools
|
|
249
271
|
|
|
250
|
-
The server provides **
|
|
272
|
+
The server provides **43 MCP tools** across multiple categories. See the
|
|
251
273
|
[complete API documentation](https://cameronrye.github.io/atproto-mcp/api/) for
|
|
252
274
|
detailed information on each tool.
|
|
253
275
|
|
|
@@ -257,34 +279,20 @@ detailed information on each tool.
|
|
|
257
279
|
|
|
258
280
|
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works
|
|
259
281
|
without auth, provides additional viewer-specific data when authenticated)
|
|
260
|
-
- `
|
|
261
|
-
|
|
262
|
-
- `
|
|
282
|
+
- `get_user_summary` - Get a profile with recent posts and engagement stats in
|
|
283
|
+
one call (ENHANCED mode)
|
|
284
|
+
- `search_actors` - Find accounts by handle or display name (ENHANCED mode)
|
|
285
|
+
- `get_author_feed` - List a specific user's posts (ENHANCED mode)
|
|
286
|
+
- `get_user_connections` - Get follower or following lists via
|
|
287
|
+
`direction: 'followers' | 'follows'` (ENHANCED mode: works without auth,
|
|
263
288
|
enriches the underlying API call when authenticated)
|
|
289
|
+
- `get_post_context` - Get a post with optional thread, author profile,
|
|
290
|
+
engagement metrics, and media (ENHANCED mode)
|
|
264
291
|
|
|
265
292
|
**Rich Media**
|
|
266
293
|
|
|
267
|
-
- `generate_alt_text` - Generate descriptive alt text for images (PUBLIC mode:
|
|
268
|
-
no auth required; experimental — returns an alt-text writing
|
|
269
|
-
template/guidance, does not analyze image pixels)
|
|
270
294
|
- `analyze_image` - Report blob-declared size and MIME type for an image (PUBLIC
|
|
271
295
|
mode: no auth required; does not decode pixels, so no dimensions/aspect ratio)
|
|
272
|
-
- `extract_media_from_post` - Extract media from posts (ENHANCED mode: works
|
|
273
|
-
without auth)
|
|
274
|
-
|
|
275
|
-
**OAuth Management** _(experimental — token exchange not implemented)_
|
|
276
|
-
|
|
277
|
-
> ⚠️ Only the authorization-URL step is functional. The token-exchange steps
|
|
278
|
-
> (`handle_oauth_callback`, `refresh_oauth_tokens`, `revoke_oauth_tokens`) are
|
|
279
|
-
> **not implemented** and return an error. For working authentication, use app
|
|
280
|
-
> passwords (`ATPROTO_IDENTIFIER` + `ATPROTO_PASSWORD`).
|
|
281
|
-
|
|
282
|
-
- `start_oauth_flow` - Generate a PKCE authorization URL (experimental)
|
|
283
|
-
- `handle_oauth_callback` - Complete OAuth flow (not implemented — returns
|
|
284
|
-
error)
|
|
285
|
-
- `refresh_oauth_tokens` - Refresh authentication tokens (not implemented —
|
|
286
|
-
returns error)
|
|
287
|
-
- `revoke_oauth_tokens` - Revoke OAuth tokens (not implemented — returns error)
|
|
288
296
|
|
|
289
297
|
**Note:** As of 2025, the AT Protocol API has changed to require authentication
|
|
290
298
|
for most endpoints that were previously public, including `search_posts`.
|
|
@@ -293,8 +301,9 @@ for most endpoints that were previously public, including `search_posts`.
|
|
|
293
301
|
|
|
294
302
|
**Social Operations**
|
|
295
303
|
|
|
296
|
-
- `create_post` - Create
|
|
297
|
-
|
|
304
|
+
- `create_post` - Create posts with text, auto-detected or explicit richtext
|
|
305
|
+
facets, replies, image/external embeds, and quote posts
|
|
306
|
+
- `create_thread` - Create multi-post threads in one call
|
|
298
307
|
- `reply_to_post` - Reply to existing posts with threading
|
|
299
308
|
- `like_post` / `unlike_post` - Like and unlike posts
|
|
300
309
|
- `repost` / `unrepost` - Repost content with optional quotes
|
|
@@ -304,10 +313,11 @@ for most endpoints that were previously public, including `search_posts`.
|
|
|
304
313
|
|
|
305
314
|
- `search_posts` - Search for posts and content across the network (⚠️ API
|
|
306
315
|
changed in 2025 to require auth)
|
|
307
|
-
- `get_thread` - View post threads and conversations
|
|
308
316
|
- `get_custom_feed` - Access custom feeds
|
|
309
317
|
- `get_timeline` - Retrieve personalized timelines
|
|
310
|
-
- `get_notifications` - Access notification feeds
|
|
318
|
+
- `get_notifications` - Access notification feeds (use `countOnly: true` for a
|
|
319
|
+
cheap unread badge count)
|
|
320
|
+
- `mark_notifications_seen` - Mark notifications as seen up to a timestamp
|
|
311
321
|
|
|
312
322
|
**Content Management**
|
|
313
323
|
|
|
@@ -327,56 +337,25 @@ for most endpoints that were previously public, including `search_posts`.
|
|
|
327
337
|
- `mute_user` / `unmute_user` - Mute and unmute users
|
|
328
338
|
- `block_user` / `unblock_user` - Block and unblock users
|
|
329
339
|
- `report_content` / `report_user` - Report content and users
|
|
330
|
-
|
|
331
|
-
**Real-time Streaming & Intelligence** _(experimental — not yet functional)_
|
|
332
|
-
|
|
333
|
-
> ⚠️ Firehose frame (CAR/DAG-CBOR) decoding is **not implemented** yet, so these
|
|
334
|
-
> tools currently decode no events: `start_streaming` returns a
|
|
335
|
-
> `not_implemented` status, and the buffer-scanning tools always return empty
|
|
336
|
-
> results. The tool descriptions and responses disclose this. Tracked for a
|
|
337
|
-
> future release.
|
|
338
|
-
|
|
339
|
-
- `start_streaming` - Start a real-time event stream (returns `not_implemented`)
|
|
340
|
-
- `stop_streaming` - Stop an event stream subscription
|
|
341
|
-
- `get_streaming_status` - Check streaming status (reports decoding
|
|
342
|
-
availability)
|
|
343
|
-
- `get_recent_events` - Retrieve buffered events (empty until decoding lands)
|
|
344
|
-
- `monitor_keywords` - Scan the event buffer for keywords (empty until decoding
|
|
345
|
-
lands)
|
|
346
|
-
- `track_users` - Scan the event buffer for specific users (empty until decoding
|
|
347
|
-
lands)
|
|
340
|
+
- `analyze_moderation_status` - Check moderation status of content
|
|
348
341
|
|
|
349
342
|
**Batch Operations**
|
|
350
343
|
|
|
351
|
-
- `
|
|
352
|
-
|
|
353
|
-
- `batch_repost` - Repost multiple posts at once (up to 25)
|
|
344
|
+
- `batch_action` - Apply one action across up to 25 targets in a single call via
|
|
345
|
+
`action: 'follow' | 'like' | 'repost'`
|
|
354
346
|
|
|
355
347
|
**Analytics & Insights**
|
|
356
348
|
|
|
357
|
-
- `
|
|
358
|
-
|
|
359
|
-
- `suggest_content_strategy` - Get content strategy recommendations based on
|
|
360
|
-
performance
|
|
349
|
+
- `analyze_account` - Analyze a single account along one dimension via
|
|
350
|
+
`dimension: 'engagement' | 'network' | 'strategy'`
|
|
361
351
|
- `find_influential_users` - Find influential users in a topic area
|
|
362
352
|
|
|
363
353
|
**Content Discovery**
|
|
364
354
|
|
|
365
|
-
- `
|
|
355
|
+
- `discover` - Surface timeline content via `mode: 'trending' | 'recommended'`
|
|
366
356
|
- `find_similar_users` - Find users similar to a given user
|
|
367
|
-
- `recommend_content` - Get personalized content recommendations
|
|
368
357
|
- `discover_communities` - Discover communities around topics
|
|
369
358
|
|
|
370
|
-
**Composite Operations**
|
|
371
|
-
|
|
372
|
-
- `get_user_summary` - Get complete user profile with stats and analysis
|
|
373
|
-
- `get_post_context` - Get post with thread, author, and engagement data
|
|
374
|
-
- `create_thread` - Create multi-post threads in one call
|
|
375
|
-
|
|
376
|
-
**Enhanced Moderation**
|
|
377
|
-
|
|
378
|
-
- `analyze_moderation_status` - Check moderation status of content
|
|
379
|
-
|
|
380
359
|
## Documentation
|
|
381
360
|
|
|
382
361
|
Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
@@ -400,17 +379,8 @@ export ATPROTO_PASSWORD="your-app-password"
|
|
|
400
379
|
atproto-mcp
|
|
401
380
|
```
|
|
402
381
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
> ⚠️ OAuth token exchange is not implemented, so this cannot complete a login
|
|
406
|
-
> yet. App passwords (above) are the recommended/working method. The variables
|
|
407
|
-
> below configure the experimental authorization-URL generator.
|
|
408
|
-
|
|
409
|
-
```bash
|
|
410
|
-
export ATPROTO_CLIENT_ID="your-client-id"
|
|
411
|
-
export ATPROTO_CLIENT_SECRET="your-client-secret" # optional for public clients
|
|
412
|
-
atproto-mcp --auth oauth
|
|
413
|
-
```
|
|
382
|
+
App passwords are the supported authentication path. OAuth login is planned but
|
|
383
|
+
not yet functional.
|
|
414
384
|
|
|
415
385
|
## Development
|
|
416
386
|
|
|
@@ -508,8 +478,9 @@ npm run test:integration
|
|
|
508
478
|
|
|
509
479
|
**What's tested:**
|
|
510
480
|
|
|
511
|
-
- Public/enhanced tools (`get_user_profile`, `
|
|
512
|
-
authenticated tools (`search_posts`,
|
|
481
|
+
- Public/enhanced tools (`get_user_profile`, `get_user_connections`,
|
|
482
|
+
`get_author_feed`) and authenticated tools (`search_posts`,
|
|
483
|
+
`get_post_context`, `get_custom_feed`)
|
|
513
484
|
- DID and handle resolution
|
|
514
485
|
- Pagination support
|
|
515
486
|
- Error handling
|
package/dist/cli.d.ts
CHANGED
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
* Main CLI function
|
|
7
7
|
*/
|
|
8
8
|
declare function main(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Detect whether a module is the process entry point. Node realpath-resolves
|
|
11
|
+
* import.meta.url for the main module, but argv[1] stays the literal invoked
|
|
12
|
+
* path — and npm installs bins as symlinks — so a naive string comparison
|
|
13
|
+
* against `file://${argv[1]}` breaks symlinked, relative, and space-containing
|
|
14
|
+
* paths. Compare realpath-resolved file URLs instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isMainModule(importMetaUrl: string, argv1: string | undefined): boolean;
|
|
9
17
|
export { main as runCli };
|
|
10
|
-
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Command-line interface for the AT Protocol MCP Server
|
|
4
4
|
*/
|
|
5
5
|
import { parseArgs } from 'node:util';
|
|
6
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
6
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
7
7
|
import { dirname, join } from 'node:path';
|
|
8
|
-
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
9
9
|
import { ConfigurationError } from './types/index.js';
|
|
10
10
|
import { AtpMcpServer } from './index.js';
|
|
11
11
|
import { LogLevel, Logger } from './utils/logger.js';
|
|
@@ -73,7 +73,7 @@ const CLI_OPTIONS = {
|
|
|
73
73
|
},
|
|
74
74
|
host: {
|
|
75
75
|
type: 'string',
|
|
76
|
-
short: '
|
|
76
|
+
short: 'H',
|
|
77
77
|
description: 'Server host (default: localhost)',
|
|
78
78
|
},
|
|
79
79
|
service: {
|
|
@@ -93,6 +93,7 @@ const CLI_OPTIONS = {
|
|
|
93
93
|
},
|
|
94
94
|
help: {
|
|
95
95
|
type: 'boolean',
|
|
96
|
+
short: 'h',
|
|
96
97
|
description: 'Show help message',
|
|
97
98
|
},
|
|
98
99
|
version: {
|
|
@@ -118,11 +119,11 @@ currently have no effect.
|
|
|
118
119
|
|
|
119
120
|
Options:
|
|
120
121
|
-p, --port <number> Server port (reserved; stdio transport ignores it)
|
|
121
|
-
-
|
|
122
|
+
-H, --host <string> Server host (reserved; stdio transport ignores it)
|
|
122
123
|
-s, --service <url> AT Protocol service URL (default: https://bsky.social)
|
|
123
124
|
-a, --auth <method> Authentication method: app-password|oauth (optional)
|
|
124
125
|
-l, --log-level <level> Log level: debug|info|warn|error (default: info)
|
|
125
|
-
|
|
126
|
+
-h, --help Show this help message
|
|
126
127
|
-v, --version Show version information
|
|
127
128
|
|
|
128
129
|
🔓 Unauthenticated Mode (Default):
|
|
@@ -311,12 +312,29 @@ async function main() {
|
|
|
311
312
|
process.exit(1);
|
|
312
313
|
}
|
|
313
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Detect whether a module is the process entry point. Node realpath-resolves
|
|
317
|
+
* import.meta.url for the main module, but argv[1] stays the literal invoked
|
|
318
|
+
* path — and npm installs bins as symlinks — so a naive string comparison
|
|
319
|
+
* against `file://${argv[1]}` breaks symlinked, relative, and space-containing
|
|
320
|
+
* paths. Compare realpath-resolved file URLs instead.
|
|
321
|
+
*/
|
|
322
|
+
export function isMainModule(importMetaUrl, argv1) {
|
|
323
|
+
if (argv1 == null || argv1 === '') {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
return importMetaUrl === pathToFileURL(realpathSync(argv1)).href;
|
|
328
|
+
}
|
|
329
|
+
catch {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
314
333
|
// Run CLI if this file is executed directly
|
|
315
|
-
if (import.meta.url
|
|
334
|
+
if (isMainModule(import.meta.url, process.argv[1])) {
|
|
316
335
|
main().catch(error => {
|
|
317
336
|
console.error('Fatal error:', error);
|
|
318
337
|
process.exit(1);
|
|
319
338
|
});
|
|
320
339
|
}
|
|
321
340
|
export { main as runCli };
|
|
322
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/health-check.d.ts
CHANGED
package/dist/health-check.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* connection counts of the running server — a fresh process cannot observe those
|
|
11
11
|
* and reporting them would be misleading.
|
|
12
12
|
*/
|
|
13
|
+
import { isMainModule } from './cli.js';
|
|
13
14
|
import { AtpMcpServer } from './index.js';
|
|
14
15
|
function healthCheck() {
|
|
15
16
|
try {
|
|
@@ -47,7 +48,6 @@ function healthCheck() {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
// Run health check if this script is executed directly
|
|
50
|
-
if (import.meta.url
|
|
51
|
+
if (isMainModule(import.meta.url, process.argv[1])) {
|
|
51
52
|
void healthCheck();
|
|
52
53
|
}
|
|
53
|
-
//# sourceMappingURL=health-check.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,12 @@ export declare class AtpMcpServer {
|
|
|
36
36
|
* Register MCP tools with the server
|
|
37
37
|
*/
|
|
38
38
|
private registerTools;
|
|
39
|
+
/**
|
|
40
|
+
* Normalize an error thrown inside a resource/prompt handler into an McpError:
|
|
41
|
+
* pass an existing McpError through, otherwise log + sanitize and wrap it as an
|
|
42
|
+
* InternalError. Returned (not thrown) so the caller writes `throw this.…`.
|
|
43
|
+
*/
|
|
44
|
+
private toHandlerMcpError;
|
|
39
45
|
/**
|
|
40
46
|
* Register MCP resources with the server
|
|
41
47
|
*/
|
|
@@ -125,4 +131,3 @@ export declare class AtpMcpServer {
|
|
|
125
131
|
* await server.start();
|
|
126
132
|
*/
|
|
127
133
|
export default AtpMcpServer;
|
|
128
|
-
//# sourceMappingURL=index.d.ts.map
|