atproto-mcp 0.2.1 → 0.3.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 +240 -134
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +67 -9
- package/dist/cli.js.map +1 -1
- package/dist/health-check.d.ts +9 -2
- package/dist/health-check.d.ts.map +1 -1
- package/dist/health-check.js +13 -17
- package/dist/health-check.js.map +1 -1
- package/dist/index.d.ts +10 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173 -172
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +16 -8
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/conversation-context-resource.d.ts +1 -1
- package/dist/resources/conversation-context-resource.d.ts.map +1 -1
- package/dist/resources/conversation-context-resource.js +4 -1
- package/dist/resources/conversation-context-resource.js.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +18 -13
- package/dist/resources/index.js.map +1 -1
- package/dist/test/integration-config.d.ts.map +1 -1
- package/dist/test/integration-config.js +11 -4
- package/dist/test/integration-config.js.map +1 -1
- package/dist/tools/implementations/advanced-social-tools.d.ts.map +1 -1
- package/dist/tools/implementations/advanced-social-tools.js +40 -10
- package/dist/tools/implementations/advanced-social-tools.js.map +1 -1
- package/dist/tools/implementations/analytics-tools.d.ts +9 -0
- package/dist/tools/implementations/analytics-tools.d.ts.map +1 -1
- package/dist/tools/implementations/analytics-tools.js +35 -4
- package/dist/tools/implementations/analytics-tools.js.map +1 -1
- package/dist/tools/implementations/base-tool.d.ts +21 -0
- package/dist/tools/implementations/base-tool.d.ts.map +1 -1
- package/dist/tools/implementations/base-tool.js +40 -0
- package/dist/tools/implementations/base-tool.js.map +1 -1
- package/dist/tools/implementations/batch-operations-tools.d.ts +6 -4
- package/dist/tools/implementations/batch-operations-tools.d.ts.map +1 -1
- package/dist/tools/implementations/batch-operations-tools.js +39 -82
- package/dist/tools/implementations/batch-operations-tools.js.map +1 -1
- package/dist/tools/implementations/content-discovery-tools.d.ts +9 -2
- package/dist/tools/implementations/content-discovery-tools.d.ts.map +1 -1
- package/dist/tools/implementations/content-discovery-tools.js +47 -8
- package/dist/tools/implementations/content-discovery-tools.js.map +1 -1
- package/dist/tools/implementations/content-management-tools.d.ts.map +1 -1
- package/dist/tools/implementations/content-management-tools.js +16 -16
- package/dist/tools/implementations/content-management-tools.js.map +1 -1
- package/dist/tools/implementations/create-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/create-post-tool.js +39 -18
- package/dist/tools/implementations/create-post-tool.js.map +1 -1
- package/dist/tools/implementations/create-thread-tool.d.ts.map +1 -1
- package/dist/tools/implementations/create-thread-tool.js +16 -3
- package/dist/tools/implementations/create-thread-tool.js.map +1 -1
- package/dist/tools/implementations/discover-trending-tool.d.ts.map +1 -1
- package/dist/tools/implementations/discover-trending-tool.js +4 -1
- package/dist/tools/implementations/discover-trending-tool.js.map +1 -1
- package/dist/tools/implementations/generate-alt-text-tool.d.ts.map +1 -1
- package/dist/tools/implementations/generate-alt-text-tool.js +7 -5
- package/dist/tools/implementations/generate-alt-text-tool.js.map +1 -1
- package/dist/tools/implementations/like-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/like-post-tool.js +7 -22
- package/dist/tools/implementations/like-post-tool.js.map +1 -1
- package/dist/tools/implementations/media-tools.d.ts +38 -33
- package/dist/tools/implementations/media-tools.d.ts.map +1 -1
- package/dist/tools/implementations/media-tools.js +108 -62
- package/dist/tools/implementations/media-tools.js.map +1 -1
- package/dist/tools/implementations/moderation-tools.d.ts.map +1 -1
- package/dist/tools/implementations/moderation-tools.js +35 -15
- package/dist/tools/implementations/moderation-tools.js.map +1 -1
- package/dist/tools/implementations/oauth-tools.d.ts.map +1 -1
- package/dist/tools/implementations/oauth-tools.js +64 -45
- package/dist/tools/implementations/oauth-tools.js.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.js +15 -7
- package/dist/tools/implementations/reply-to-post-tool.js.map +1 -1
- package/dist/tools/implementations/rich-media-tools.d.ts +5 -3
- package/dist/tools/implementations/rich-media-tools.d.ts.map +1 -1
- package/dist/tools/implementations/rich-media-tools.js +8 -4
- package/dist/tools/implementations/rich-media-tools.js.map +1 -1
- package/dist/tools/implementations/search-posts-tool.d.ts +1 -1
- package/dist/tools/implementations/search-posts-tool.d.ts.map +1 -1
- package/dist/tools/implementations/search-posts-tool.js +12 -2
- package/dist/tools/implementations/search-posts-tool.js.map +1 -1
- package/dist/tools/implementations/social-graph-tools.d.ts.map +1 -1
- package/dist/tools/implementations/social-graph-tools.js +5 -3
- package/dist/tools/implementations/social-graph-tools.js.map +1 -1
- package/dist/tools/implementations/streaming-tools.d.ts +10 -0
- package/dist/tools/implementations/streaming-tools.d.ts.map +1 -1
- package/dist/tools/implementations/streaming-tools.js +57 -6
- package/dist/tools/implementations/streaming-tools.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +89 -83
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +9 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/atp-client.d.ts +5 -1
- package/dist/utils/atp-client.d.ts.map +1 -1
- package/dist/utils/atp-client.js +15 -33
- package/dist/utils/atp-client.js.map +1 -1
- package/dist/utils/config.d.ts +6 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +39 -8
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/firehose-client.d.ts +30 -4
- package/dist/utils/firehose-client.d.ts.map +1 -1
- package/dist/utils/firehose-client.js +48 -31
- package/dist/utils/firehose-client.js.map +1 -1
- package/dist/utils/logger.d.ts +13 -2
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +29 -12
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/oauth-client.d.ts +6 -0
- package/dist/utils/oauth-client.d.ts.map +1 -1
- package/dist/utils/oauth-client.js +60 -98
- package/dist/utils/oauth-client.js.map +1 -1
- package/dist/utils/performance.d.ts +10 -84
- package/dist/utils/performance.d.ts.map +1 -1
- package/dist/utils/performance.js +16 -279
- package/dist/utils/performance.js.map +1 -1
- package/dist/utils/security.d.ts +10 -31
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +24 -70
- package/dist/utils/security.js.map +1 -1
- package/dist/utils/url-safety.d.ts +45 -0
- package/dist/utils/url-safety.d.ts.map +1 -0
- package/dist/utils/url-safety.js +338 -0
- package/dist/utils/url-safety.js.map +1 -0
- package/package.json +54 -36
package/README.md
CHANGED
|
@@ -1,43 +1,52 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img src="docs/public/logo.svg" alt="AT Protocol MCP Server Logo" width="200" height="200">
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
# AT Protocol MCP Server
|
|
5
|
+
|
|
6
|
+
[](https://badge.fury.io/js/atproto-mcp)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
|
|
10
|
+
[](https://github.com/cameronrye/atproto-mcp/actions/workflows/ci.yml)
|
|
11
|
+
[](https://github.com/cameronrye/atproto-mcp/actions/workflows/integration-tests.yml)
|
|
12
|
+
[](https://github.com/cameronrye/atproto-mcp/actions/workflows/docs.yml)
|
|
13
|
+
[](https://github.com/cameronrye/atproto-mcp/actions/workflows/release.yml)
|
|
14
|
+
[](https://codecov.io/gh/cameronrye/atproto-mcp)
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+
|
|
21
|
+

|
|
22
|
+

|
|
23
|
+

|
|
24
|
+

|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
[](https://cameronrye.github.io/atproto-mcp)
|
|
28
|
+
[](SECURITY.md)
|
|
29
|
+

|
|
30
|
+
|
|
30
31
|
</div>
|
|
31
32
|
|
|
32
|
-
A comprehensive Model Context Protocol (MCP) server that provides LLMs with
|
|
33
|
+
A comprehensive Model Context Protocol (MCP) server that provides LLMs with
|
|
34
|
+
direct access to the AT Protocol ecosystem, enabling seamless interaction with
|
|
35
|
+
Bluesky and other AT Protocol-based social networks.
|
|
33
36
|
|
|
34
|
-
**Supports both authenticated and unauthenticated modes** - Start immediately
|
|
37
|
+
**Supports both authenticated and unauthenticated modes** - Start immediately
|
|
38
|
+
with public data access (view profiles, fetch follower/following lists), or add
|
|
39
|
+
authentication for full functionality (search, write operations, private data,
|
|
40
|
+
feeds).
|
|
35
41
|
|
|
36
|
-
> **
|
|
42
|
+
> **Recent additions**: Batch operations for bulk actions, advanced analytics
|
|
43
|
+
> and insights, intelligent content discovery, and a conversation-context
|
|
44
|
+
> scratchpad resource.
|
|
37
45
|
|
|
38
46
|
## Architecture
|
|
39
47
|
|
|
40
|
-
This MCP server acts as a bridge between LLM clients and the AT Protocol
|
|
48
|
+
This MCP server acts as a bridge between LLM clients and the AT Protocol
|
|
49
|
+
ecosystem:
|
|
41
50
|
|
|
42
51
|
```
|
|
43
52
|
┌─────────────────┐
|
|
@@ -63,26 +72,38 @@ This MCP server acts as a bridge between LLM clients and the AT Protocol ecosyst
|
|
|
63
72
|
└─────────────────┘
|
|
64
73
|
```
|
|
65
74
|
|
|
66
|
-
**Key Point**: Users don't interact with this server directly. Instead, they
|
|
75
|
+
**Key Point**: Users don't interact with this server directly. Instead, they
|
|
76
|
+
talk to their LLM client in natural language, and the LLM client uses this MCP
|
|
77
|
+
server to access AT Protocol functionality.
|
|
67
78
|
|
|
68
79
|
## Features
|
|
69
80
|
|
|
70
|
-
###
|
|
81
|
+
### Highlights
|
|
71
82
|
|
|
72
|
-
- **Batch Operations**: Perform multiple operations in a single call
|
|
73
|
-
|
|
74
|
-
- **
|
|
75
|
-
|
|
83
|
+
- **Batch Operations**: Perform multiple operations in a single call
|
|
84
|
+
(follow/like/repost up to 25 items at once)
|
|
85
|
+
- **Analytics & Insights**: Analyze engagement patterns, network connections,
|
|
86
|
+
and get content strategy recommendations
|
|
87
|
+
- **Content Discovery**: Find similar users, trending topics, and influential
|
|
88
|
+
voices in your areas of interest
|
|
89
|
+
- **Conversation Context**: An MCP resource that acts as a scratchpad for
|
|
90
|
+
conversation state (not auto-populated yet)
|
|
76
91
|
|
|
77
92
|
### Core Features
|
|
78
93
|
|
|
79
|
-
- **Unauthenticated Mode**: Access public data without any setup - view basic
|
|
80
|
-
|
|
81
|
-
- **
|
|
82
|
-
|
|
94
|
+
- **Unauthenticated Mode**: Access public data without any setup - view basic
|
|
95
|
+
profiles and manage OAuth flows
|
|
96
|
+
- **Optional Authentication**: Enable full functionality with app passwords or
|
|
97
|
+
OAuth for write operations, feeds, and private data
|
|
98
|
+
- **Complete AT Protocol Integration**: Full implementation using official
|
|
99
|
+
`@atproto/api`
|
|
100
|
+
- **MCP Server Compliance**: Built with `@modelcontextprotocol/sdk` following
|
|
101
|
+
MCP specification
|
|
83
102
|
- **Type-Safe**: Written in TypeScript with strict type checking
|
|
84
|
-
- **Comprehensive Tools**:
|
|
85
|
-
- **Real-time Support
|
|
103
|
+
- **Comprehensive Tools**: 60 MCP tools for social networking operations
|
|
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
|
|
86
107
|
- **Rate Limiting**: Built-in respect for AT Protocol rate limits
|
|
87
108
|
- **Extensible**: Modular architecture for easy customization
|
|
88
109
|
|
|
@@ -90,21 +111,27 @@ This MCP server acts as a bridge between LLM clients and the AT Protocol ecosyst
|
|
|
90
111
|
|
|
91
112
|
### Primary Audience: LLM Clients
|
|
92
113
|
|
|
93
|
-
This is an **MCP (Model Context Protocol) server** designed to be consumed by
|
|
114
|
+
This is an **MCP (Model Context Protocol) server** designed to be consumed by
|
|
115
|
+
**LLM clients** such as:
|
|
116
|
+
|
|
94
117
|
- Claude Desktop
|
|
95
118
|
- Other MCP-compatible AI assistants
|
|
96
119
|
- Custom LLM applications using the MCP SDK
|
|
97
120
|
|
|
98
121
|
**How it works:**
|
|
122
|
+
|
|
99
123
|
```
|
|
100
124
|
User → LLM Client (Claude Desktop) → MCP Protocol → This Server → AT Protocol → Bluesky
|
|
101
125
|
```
|
|
102
126
|
|
|
103
|
-
Users interact with their LLM client in natural language (e.g., "search for
|
|
127
|
+
Users interact with their LLM client in natural language (e.g., "search for
|
|
128
|
+
posts about AI"), and the LLM client uses this MCP server to fulfill those
|
|
129
|
+
requests by calling the appropriate tools via the MCP protocol.
|
|
104
130
|
|
|
105
131
|
### Secondary Audience: Developers
|
|
106
132
|
|
|
107
133
|
This project is also for developers who want to:
|
|
134
|
+
|
|
108
135
|
- **Deploy** the MCP server for their LLM clients to connect to
|
|
109
136
|
- **Extend** the server with custom MCP tools and resources
|
|
110
137
|
- **Contribute** to the open-source project
|
|
@@ -115,9 +142,12 @@ This project is also for developers who want to:
|
|
|
115
142
|
- A JavaScript/TypeScript library to import into your app
|
|
116
143
|
- An end-user application
|
|
117
144
|
|
|
118
|
-
If you're building an application that needs AT Protocol functionality, you
|
|
145
|
+
If you're building an application that needs AT Protocol functionality, you
|
|
146
|
+
should either:
|
|
147
|
+
|
|
119
148
|
1. Use the official `@atproto/api` package directly, OR
|
|
120
|
-
2. Build an LLM-powered application that uses this MCP server through an LLM
|
|
149
|
+
2. Build an LLM-powered application that uses this MCP server through an LLM
|
|
150
|
+
client
|
|
121
151
|
|
|
122
152
|
## Installation
|
|
123
153
|
|
|
@@ -137,9 +167,11 @@ npx atproto-mcp
|
|
|
137
167
|
|
|
138
168
|
**Perfect for LLM clients that need to access public AT Protocol data:**
|
|
139
169
|
|
|
140
|
-
1. **Configure your LLM client** (e.g., Claude Desktop) to launch the MCP
|
|
170
|
+
1. **Configure your LLM client** (e.g., Claude Desktop) to launch the MCP
|
|
171
|
+
server:
|
|
141
172
|
|
|
142
173
|
Add to your LLM client's MCP configuration:
|
|
174
|
+
|
|
143
175
|
```json
|
|
144
176
|
{
|
|
145
177
|
"mcpServers": {
|
|
@@ -153,21 +185,34 @@ npx atproto-mcp
|
|
|
153
185
|
|
|
154
186
|
2. **Start your LLM client** - it will automatically launch the MCP server
|
|
155
187
|
|
|
156
|
-
3. **Interact in natural language** - Ask your LLM to search posts, view
|
|
188
|
+
3. **Interact in natural language** - Ask your LLM to search posts, view
|
|
189
|
+
profiles, etc.
|
|
157
190
|
|
|
158
191
|
**What your LLM can do in unauthenticated mode:**
|
|
159
|
-
|
|
160
|
-
-
|
|
192
|
+
|
|
193
|
+
- View user profiles (`get_user_profile` - works without auth, provides
|
|
194
|
+
additional viewer-specific data when authenticated)
|
|
195
|
+
- View follower/following lists (`get_followers`, `get_follows` - ENHANCED mode:
|
|
196
|
+
work without auth, enrich the underlying API call when authenticated)
|
|
197
|
+
- Manage OAuth authentication flows (`start_oauth_flow`,
|
|
198
|
+
`handle_oauth_callback`, `refresh_oauth_tokens`, `revoke_oauth_tokens`)
|
|
161
199
|
|
|
162
200
|
**Note:** The following features require authentication:
|
|
163
|
-
|
|
164
|
-
-
|
|
201
|
+
|
|
202
|
+
- Searching posts and hashtags (`search_posts`) - **API changed in 2025 to
|
|
203
|
+
require authentication**
|
|
165
204
|
- Browsing feeds and threads (`get_thread`, `get_custom_feed`, `get_timeline`)
|
|
166
205
|
- All write operations (create, like, repost, follow, etc.)
|
|
167
|
-
- Resources (timeline, profile, notifications) - these are listed but
|
|
168
|
-
|
|
206
|
+
- Resources (timeline, profile, notifications) - these are listed but require
|
|
207
|
+
authentication to return data (the `conversation-context` scratchpad resource
|
|
208
|
+
is readable without auth and simply returns near-empty placeholder content)
|
|
209
|
+
- Prompts (content composition, reply templates) - these are listed but require
|
|
210
|
+
authentication to be available
|
|
169
211
|
|
|
170
|
-
**Important:** All tools, resources, and prompts are listed by the MCP server
|
|
212
|
+
**Important:** All tools, resources, and prompts are listed by the MCP server
|
|
213
|
+
regardless of authentication state. Most tools and resources that require
|
|
214
|
+
authentication will return a clear error message when called without proper
|
|
215
|
+
credentials.
|
|
171
216
|
|
|
172
217
|
### Option 2: Authenticated Mode (For full functionality)
|
|
173
218
|
|
|
@@ -193,6 +238,7 @@ npx atproto-mcp
|
|
|
193
238
|
2. **Start your LLM client** - it will launch the authenticated MCP server
|
|
194
239
|
|
|
195
240
|
**What your LLM can do in authenticated mode:**
|
|
241
|
+
|
|
196
242
|
- Create, edit, and delete posts
|
|
197
243
|
- Follow/unfollow users
|
|
198
244
|
- Like and repost content
|
|
@@ -201,24 +247,52 @@ npx atproto-mcp
|
|
|
201
247
|
|
|
202
248
|
## Available Tools
|
|
203
249
|
|
|
204
|
-
The server provides **
|
|
250
|
+
The server provides **60 MCP tools** across multiple categories. See the
|
|
251
|
+
[complete API documentation](https://cameronrye.github.io/atproto-mcp/api/) for
|
|
252
|
+
detailed information on each tool.
|
|
205
253
|
|
|
206
254
|
### Public Tools (No Authentication Required)
|
|
207
255
|
|
|
208
256
|
**Data Retrieval**
|
|
209
|
-
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works without auth, provides additional viewer-specific data when authenticated)
|
|
210
257
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- `
|
|
214
|
-
|
|
215
|
-
- `
|
|
258
|
+
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works
|
|
259
|
+
without auth, provides additional viewer-specific data when authenticated)
|
|
260
|
+
- `get_followers` - Get follower lists (ENHANCED mode: works without auth,
|
|
261
|
+
enriches the underlying API call when authenticated)
|
|
262
|
+
- `get_follows` - Get following lists (ENHANCED mode: works without auth,
|
|
263
|
+
enriches the underlying API call when authenticated)
|
|
264
|
+
|
|
265
|
+
**Rich Media**
|
|
266
|
+
|
|
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
|
+
- `analyze_image` - Report blob-declared size and MIME type for an image (PUBLIC
|
|
271
|
+
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)_
|
|
216
276
|
|
|
217
|
-
|
|
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
|
+
|
|
289
|
+
**Note:** As of 2025, the AT Protocol API has changed to require authentication
|
|
290
|
+
for most endpoints that were previously public, including `search_posts`.
|
|
218
291
|
|
|
219
292
|
### Private Tools (Authentication Required)
|
|
220
293
|
|
|
221
294
|
**Social Operations**
|
|
295
|
+
|
|
222
296
|
- `create_post` - Create new posts with rich text support
|
|
223
297
|
- `create_rich_text_post` - Create posts with advanced formatting
|
|
224
298
|
- `reply_to_post` - Reply to existing posts with threading
|
|
@@ -227,66 +301,80 @@ The server provides **57 MCP tools** across multiple categories. See the [comple
|
|
|
227
301
|
- `follow_user` / `unfollow_user` - Follow and unfollow users
|
|
228
302
|
|
|
229
303
|
**Data Retrieval**
|
|
230
|
-
|
|
231
|
-
- `
|
|
232
|
-
|
|
304
|
+
|
|
305
|
+
- `search_posts` - Search for posts and content across the network (⚠️ API
|
|
306
|
+
changed in 2025 to require auth)
|
|
233
307
|
- `get_thread` - View post threads and conversations
|
|
234
308
|
- `get_custom_feed` - Access custom feeds
|
|
235
309
|
- `get_timeline` - Retrieve personalized timelines
|
|
236
310
|
- `get_notifications` - Access notification feeds
|
|
237
311
|
|
|
238
312
|
**Content Management**
|
|
313
|
+
|
|
239
314
|
- `upload_image` / `upload_video` - Upload media content
|
|
240
315
|
- `delete_post` - Remove posts
|
|
241
316
|
- `update_profile` - Modify profile and settings
|
|
242
317
|
- `generate_link_preview` - Generate link previews for posts
|
|
243
318
|
|
|
244
319
|
**List Management**
|
|
320
|
+
|
|
245
321
|
- `create_list` - Create user lists
|
|
246
322
|
- `add_to_list` / `remove_from_list` - Manage list members
|
|
247
323
|
- `get_list` - Retrieve list information
|
|
248
324
|
|
|
249
325
|
**Moderation**
|
|
326
|
+
|
|
250
327
|
- `mute_user` / `unmute_user` - Mute and unmute users
|
|
251
328
|
- `block_user` / `unblock_user` - Block and unblock users
|
|
252
329
|
- `report_content` / `report_user` - Report content and users
|
|
253
330
|
|
|
254
|
-
**Real-time Streaming & Intelligence**
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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)
|
|
261
348
|
|
|
262
349
|
**Batch Operations**
|
|
350
|
+
|
|
263
351
|
- `batch_follow` - Follow multiple users at once (up to 25)
|
|
264
352
|
- `batch_like` - Like multiple posts at once (up to 25)
|
|
265
353
|
- `batch_repost` - Repost multiple posts at once (up to 25)
|
|
266
354
|
|
|
267
355
|
**Analytics & Insights**
|
|
356
|
+
|
|
268
357
|
- `analyze_engagement` - Analyze engagement patterns across posts
|
|
269
358
|
- `analyze_network` - Analyze user's network and connections
|
|
270
|
-
- `suggest_content_strategy` - Get content strategy recommendations based on
|
|
359
|
+
- `suggest_content_strategy` - Get content strategy recommendations based on
|
|
360
|
+
performance
|
|
271
361
|
- `find_influential_users` - Find influential users in a topic area
|
|
272
362
|
|
|
273
363
|
**Content Discovery**
|
|
364
|
+
|
|
274
365
|
- `discover_trending` - Discover trending topics and posts
|
|
275
366
|
- `find_similar_users` - Find users similar to a given user
|
|
276
367
|
- `recommend_content` - Get personalized content recommendations
|
|
277
368
|
- `discover_communities` - Discover communities around topics
|
|
278
369
|
|
|
279
370
|
**Composite Operations**
|
|
371
|
+
|
|
280
372
|
- `get_user_summary` - Get complete user profile with stats and analysis
|
|
281
373
|
- `get_post_context` - Get post with thread, author, and engagement data
|
|
282
374
|
- `create_thread` - Create multi-post threads in one call
|
|
283
375
|
|
|
284
|
-
**Rich Media**
|
|
285
|
-
- `generate_alt_text` - Generate descriptive alt text for images
|
|
286
|
-
- `analyze_image` - Analyze image metadata and properties
|
|
287
|
-
- `extract_media_from_post` - Extract all media from posts
|
|
288
|
-
|
|
289
376
|
**Enhanced Moderation**
|
|
377
|
+
|
|
290
378
|
- `analyze_moderation_status` - Check moderation status of content
|
|
291
379
|
|
|
292
380
|
## Documentation
|
|
@@ -301,19 +389,26 @@ Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
|
301
389
|
|
|
302
390
|
## Authentication (Optional)
|
|
303
391
|
|
|
304
|
-
The server works perfectly without authentication for accessing public data.
|
|
392
|
+
The server works perfectly without authentication for accessing public data.
|
|
393
|
+
Authentication is only needed for write operations and private data access.
|
|
305
394
|
|
|
306
395
|
### App Passwords (Recommended for Development)
|
|
396
|
+
|
|
307
397
|
```bash
|
|
308
398
|
export ATPROTO_IDENTIFIER="your-handle.bsky.social"
|
|
309
399
|
export ATPROTO_PASSWORD="your-app-password"
|
|
310
400
|
atproto-mcp
|
|
311
401
|
```
|
|
312
402
|
|
|
313
|
-
### OAuth (
|
|
403
|
+
### OAuth (experimental — not yet functional)
|
|
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
|
+
|
|
314
409
|
```bash
|
|
315
410
|
export ATPROTO_CLIENT_ID="your-client-id"
|
|
316
|
-
export ATPROTO_CLIENT_SECRET="your-client-secret"
|
|
411
|
+
export ATPROTO_CLIENT_SECRET="your-client-secret" # optional for public clients
|
|
317
412
|
atproto-mcp --auth oauth
|
|
318
413
|
```
|
|
319
414
|
|
|
@@ -341,7 +436,8 @@ pnpm build # or: npm run build
|
|
|
341
436
|
|
|
342
437
|
### Available Commands
|
|
343
438
|
|
|
344
|
-
This project provides cross-platform npm scripts that work on Windows, macOS,
|
|
439
|
+
This project provides cross-platform npm scripts that work on Windows, macOS,
|
|
440
|
+
and Linux:
|
|
345
441
|
|
|
346
442
|
```bash
|
|
347
443
|
# Show all available commands
|
|
@@ -379,8 +475,9 @@ npm run deps:audit # Audit for security issues
|
|
|
379
475
|
|
|
380
476
|
### Cross-Platform Compatibility
|
|
381
477
|
|
|
382
|
-
All build commands work on **Windows, macOS, and Linux** without requiring
|
|
383
|
-
Simply use npm scripts on any platform (e.g., `npm run dev`,
|
|
478
|
+
All build commands work on **Windows, macOS, and Linux** without requiring
|
|
479
|
+
additional tools. Simply use npm scripts on any platform (e.g., `npm run dev`,
|
|
480
|
+
`npm test`, `npm run build`).
|
|
384
481
|
|
|
385
482
|
## Testing
|
|
386
483
|
|
|
@@ -401,7 +498,8 @@ pnpm test:ui
|
|
|
401
498
|
|
|
402
499
|
### Integration Tests
|
|
403
500
|
|
|
404
|
-
Comprehensive integration tests that connect to real AT Protocol servers to
|
|
501
|
+
Comprehensive integration tests that connect to real AT Protocol servers to
|
|
502
|
+
validate all public-facing functionality:
|
|
405
503
|
|
|
406
504
|
```bash
|
|
407
505
|
# Run integration tests (requires internet connection)
|
|
@@ -409,18 +507,24 @@ npm run test:integration
|
|
|
409
507
|
```
|
|
410
508
|
|
|
411
509
|
**What's tested:**
|
|
412
|
-
|
|
510
|
+
|
|
511
|
+
- Public/enhanced tools (`get_user_profile`, `get_followers`, `get_follows`) and
|
|
512
|
+
authenticated tools (`search_posts`, `get_thread`, `get_custom_feed`)
|
|
413
513
|
- DID and handle resolution
|
|
414
514
|
- Pagination support
|
|
415
515
|
- Error handling
|
|
416
516
|
- AT Protocol specification compliance
|
|
417
517
|
- Rate limiting behavior
|
|
418
518
|
|
|
419
|
-
**Note:** Integration tests are opt-in and disabled by default to avoid hitting
|
|
519
|
+
**Note:** Integration tests are opt-in and disabled by default to avoid hitting
|
|
520
|
+
real servers during normal development. See
|
|
521
|
+
[Integration Tests Documentation](src/__tests__/INTEGRATION_TESTS.md) for
|
|
522
|
+
details.
|
|
420
523
|
|
|
421
524
|
## Contributing
|
|
422
525
|
|
|
423
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
|
|
526
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
|
|
527
|
+
for details.
|
|
424
528
|
|
|
425
529
|
1. Fork the repository
|
|
426
530
|
2. Create a feature branch
|
|
@@ -434,8 +538,10 @@ This project is licensed under the MIT License.
|
|
|
434
538
|
|
|
435
539
|
## Acknowledgments
|
|
436
540
|
|
|
437
|
-
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the
|
|
438
|
-
|
|
541
|
+
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the
|
|
542
|
+
excellent protocol and SDK
|
|
543
|
+
- [Anthropic](https://github.com/modelcontextprotocol) for the Model Context
|
|
544
|
+
Protocol
|
|
439
545
|
- The open source community for inspiration and contributions
|
|
440
546
|
|
|
441
547
|
## Support
|
|
@@ -444,76 +550,74 @@ This project is licensed under the MIT License.
|
|
|
444
550
|
- [Issue Tracker](https://github.com/cameronrye/atproto-mcp/issues)
|
|
445
551
|
- [Discussions](https://github.com/cameronrye/atproto-mcp/discussions)
|
|
446
552
|
|
|
447
|
-
##
|
|
553
|
+
## Deployment
|
|
448
554
|
|
|
449
|
-
|
|
555
|
+
This is a **stdio MCP server**: it is normally launched by an MCP client (e.g.
|
|
556
|
+
Claude Desktop) via `npx atproto-mcp` and communicates over stdin/stdout. It
|
|
557
|
+
does not listen on a network port, so there is no HTTP endpoint to expose or
|
|
558
|
+
scale.
|
|
450
559
|
|
|
451
|
-
###
|
|
452
|
-
- **Performance Optimization**: Connection pooling, caching, and WebSocket management
|
|
453
|
-
- **Security Hardening**: Input sanitization, rate limiting, and secure credential storage
|
|
454
|
-
- **Monitoring**: Health checks, metrics, and comprehensive logging
|
|
455
|
-
- **Docker Support**: Multi-stage builds with security best practices
|
|
456
|
-
- **Kubernetes Ready**: Helm charts and deployment manifests
|
|
457
|
-
- **Observability**: Prometheus metrics and Grafana dashboards
|
|
560
|
+
### Built-in safeguards
|
|
458
561
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
562
|
+
- **Error sanitization**: in `NODE_ENV=production`, internal error details are
|
|
563
|
+
redacted before being returned to the client.
|
|
564
|
+
- **Rate limiting**: per-tool invocation rate limiting guards against runaway
|
|
565
|
+
loops.
|
|
566
|
+
- **SSRF protection**: outbound URL/media fetches reject private/internal
|
|
567
|
+
network destinations and cap response size and time.
|
|
568
|
+
- **Path-traversal protection**: local file reads are confined to an allowed
|
|
569
|
+
base directory (`ATPROTO_MEDIA_DIR`, default: working directory).
|
|
570
|
+
|
|
571
|
+
### Running in Docker
|
|
572
|
+
|
|
573
|
+
The container runs the same stdio server, so attach to it via your MCP client
|
|
574
|
+
rather than mapping a port:
|
|
463
575
|
|
|
464
|
-
|
|
576
|
+
```bash
|
|
465
577
|
docker build -t atproto-mcp .
|
|
466
|
-
docker run -
|
|
467
|
-
-e ATPROTO_IDENTIFIER=your.handle \
|
|
468
|
-
-e ATPROTO_PASSWORD=your-password \
|
|
578
|
+
docker run -i --rm \
|
|
579
|
+
-e ATPROTO_IDENTIFIER=your.handle.bsky.social \
|
|
580
|
+
-e ATPROTO_PASSWORD=your-app-password \
|
|
469
581
|
atproto-mcp
|
|
470
582
|
```
|
|
471
583
|
|
|
472
|
-
### Environment
|
|
584
|
+
### Environment configuration
|
|
585
|
+
|
|
473
586
|
```bash
|
|
474
|
-
# Copy example environment file
|
|
587
|
+
# Copy the example environment file and edit it (loaded automatically by the CLI)
|
|
475
588
|
cp .env.example .env
|
|
589
|
+
```
|
|
476
590
|
|
|
477
|
-
|
|
591
|
+
```dotenv
|
|
478
592
|
ATPROTO_IDENTIFIER=your.handle.bsky.social
|
|
479
593
|
ATPROTO_PASSWORD=your-app-password
|
|
480
594
|
NODE_ENV=production
|
|
481
595
|
LOG_LEVEL=info
|
|
482
596
|
```
|
|
483
597
|
|
|
484
|
-
|
|
598
|
+
See [.env.example](.env.example) for the full list of variables the server
|
|
599
|
+
reads.
|
|
485
600
|
|
|
486
601
|
## Security
|
|
487
602
|
|
|
488
|
-
Security is a top priority for this project. Please review our security
|
|
603
|
+
Security is a top priority for this project. Please review our security
|
|
604
|
+
practices and policies:
|
|
489
605
|
|
|
490
606
|
### Security Best Practices
|
|
491
607
|
|
|
492
608
|
**Before deploying to production:**
|
|
493
609
|
|
|
494
|
-
1. **
|
|
495
|
-
- Set `GRAFANA_ADMIN_PASSWORD` environment variable (don't use default)
|
|
496
|
-
- Configure Redis password if using Redis
|
|
497
|
-
- Generate strong random keys for `SECURITY_SECRET_KEY`
|
|
498
|
-
|
|
499
|
-
2. **Configure CORS Properly**
|
|
500
|
-
- Replace wildcard `*` origins with specific domains
|
|
501
|
-
- Set `CORS_ORIGINS` in your environment configuration
|
|
502
|
-
- Example: `CORS_ORIGINS=https://yourdomain.com,https://app.yourdomain.com`
|
|
503
|
-
|
|
504
|
-
3. **Secure Your Credentials**
|
|
610
|
+
1. **Secure Your Credentials**
|
|
505
611
|
- Never commit `.env` files to version control
|
|
506
|
-
- Use app passwords instead of main account
|
|
612
|
+
- Use app passwords instead of your main account password
|
|
507
613
|
- Rotate credentials regularly
|
|
508
|
-
- Use secret management
|
|
614
|
+
- Use a secret management system where available (AWS Secrets Manager,
|
|
615
|
+
HashiCorp Vault, etc.)
|
|
509
616
|
|
|
510
|
-
|
|
511
|
-
-
|
|
512
|
-
- Configure `TRUSTED_PROXIES` if behind a reverse proxy
|
|
513
|
-
- Enable rate limiting
|
|
514
|
-
- Restrict access to internal services (Redis, Prometheus, Grafana)
|
|
617
|
+
2. **Run in production mode**
|
|
618
|
+
- Set `NODE_ENV=production` so returned error messages are sanitized
|
|
515
619
|
|
|
516
|
-
|
|
620
|
+
3. **Keep Dependencies Updated**
|
|
517
621
|
```bash
|
|
518
622
|
pnpm audit
|
|
519
623
|
pnpm update
|
|
@@ -521,9 +625,11 @@ Security is a top priority for this project. Please review our security practice
|
|
|
521
625
|
|
|
522
626
|
### Reporting Security Vulnerabilities
|
|
523
627
|
|
|
524
|
-
If you discover a security vulnerability, please review our
|
|
628
|
+
If you discover a security vulnerability, please review our
|
|
629
|
+
[Security Policy](SECURITY.md) for responsible disclosure guidelines.
|
|
525
630
|
|
|
526
|
-
**Do not open public issues for security vulnerabilities.** Instead, send me a
|
|
631
|
+
**Do not open public issues for security vulnerabilities.** Instead, send me a
|
|
632
|
+
message privately.
|
|
527
633
|
|
|
528
634
|
### Security Features
|
|
529
635
|
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AA4RH;;GAEG;AACH,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA8DnC;AAUD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,CAAC"}
|