atproto-mcp 0.2.1 → 0.4.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 -162
- 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 +16 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +231 -175
- 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 +326 -47
- package/dist/tools/implementations/advanced-social-tools.d.ts.map +1 -1
- package/dist/tools/implementations/advanced-social-tools.js +339 -110
- package/dist/tools/implementations/advanced-social-tools.js.map +1 -1
- package/dist/tools/implementations/analytics-tools.d.ts +67 -157
- package/dist/tools/implementations/analytics-tools.d.ts.map +1 -1
- package/dist/tools/implementations/analytics-tools.js +129 -457
- package/dist/tools/implementations/analytics-tools.js.map +1 -1
- package/dist/tools/implementations/analyze-account-tool.d.ts +135 -0
- package/dist/tools/implementations/analyze-account-tool.d.ts.map +1 -0
- package/dist/tools/implementations/analyze-account-tool.js +757 -0
- package/dist/tools/implementations/analyze-account-tool.js.map +1 -0
- package/dist/tools/implementations/base-tool.d.ts +78 -0
- package/dist/tools/implementations/base-tool.d.ts.map +1 -1
- package/dist/tools/implementations/base-tool.js +207 -5
- package/dist/tools/implementations/base-tool.js.map +1 -1
- package/dist/tools/implementations/batch-operations-tools.d.ts +49 -117
- package/dist/tools/implementations/batch-operations-tools.d.ts.map +1 -1
- package/dist/tools/implementations/batch-operations-tools.js +143 -285
- package/dist/tools/implementations/batch-operations-tools.js.map +1 -1
- package/dist/tools/implementations/composite-tools.d.ts +287 -8
- package/dist/tools/implementations/composite-tools.d.ts.map +1 -1
- package/dist/tools/implementations/composite-tools.js +402 -71
- package/dist/tools/implementations/composite-tools.js.map +1 -1
- package/dist/tools/implementations/content-discovery-tools.d.ts +216 -77
- package/dist/tools/implementations/content-discovery-tools.d.ts.map +1 -1
- package/dist/tools/implementations/content-discovery-tools.js +276 -205
- package/dist/tools/implementations/content-discovery-tools.js.map +1 -1
- package/dist/tools/implementations/content-management-tools.d.ts +71 -6
- package/dist/tools/implementations/content-management-tools.d.ts.map +1 -1
- package/dist/tools/implementations/content-management-tools.js +142 -66
- package/dist/tools/implementations/content-management-tools.js.map +1 -1
- package/dist/tools/implementations/create-post-tool.d.ts +111 -9
- package/dist/tools/implementations/create-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/create-post-tool.js +195 -81
- package/dist/tools/implementations/create-post-tool.js.map +1 -1
- package/dist/tools/implementations/create-thread-tool.d.ts +68 -0
- package/dist/tools/implementations/create-thread-tool.d.ts.map +1 -1
- package/dist/tools/implementations/create-thread-tool.js +116 -9
- package/dist/tools/implementations/create-thread-tool.js.map +1 -1
- package/dist/tools/implementations/discover-tool.d.ts +111 -0
- package/dist/tools/implementations/discover-tool.d.ts.map +1 -0
- package/dist/tools/implementations/discover-tool.js +556 -0
- package/dist/tools/implementations/discover-tool.js.map +1 -0
- package/dist/tools/implementations/follow-user-tool.d.ts +69 -6
- package/dist/tools/implementations/follow-user-tool.d.ts.map +1 -1
- package/dist/tools/implementations/follow-user-tool.js +102 -61
- package/dist/tools/implementations/follow-user-tool.js.map +1 -1
- package/dist/tools/implementations/get-author-feed-tool.d.ts +164 -0
- package/dist/tools/implementations/get-author-feed-tool.d.ts.map +1 -0
- package/dist/tools/implementations/get-author-feed-tool.js +147 -0
- package/dist/tools/implementations/get-author-feed-tool.js.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts +113 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts.map +1 -1
- package/dist/tools/implementations/get-user-profile-tool.js +150 -24
- package/dist/tools/implementations/get-user-profile-tool.js.map +1 -1
- package/dist/tools/implementations/index.d.ts +11 -12
- package/dist/tools/implementations/index.d.ts.map +1 -1
- package/dist/tools/implementations/index.js +12 -15
- package/dist/tools/implementations/index.js.map +1 -1
- package/dist/tools/implementations/like-post-tool.d.ts +63 -1
- package/dist/tools/implementations/like-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/like-post-tool.js +70 -41
- package/dist/tools/implementations/like-post-tool.js.map +1 -1
- package/dist/tools/implementations/media-tools.d.ts +184 -220
- package/dist/tools/implementations/media-tools.d.ts.map +1 -1
- package/dist/tools/implementations/media-tools.js +299 -229
- package/dist/tools/implementations/media-tools.js.map +1 -1
- package/dist/tools/implementations/moderation-tools.d.ts +324 -3
- package/dist/tools/implementations/moderation-tools.d.ts.map +1 -1
- package/dist/tools/implementations/moderation-tools.js +407 -42
- package/dist/tools/implementations/moderation-tools.js.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.d.ts +44 -2
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.js +73 -43
- package/dist/tools/implementations/reply-to-post-tool.js.map +1 -1
- package/dist/tools/implementations/repost-tool.d.ts +77 -1
- package/dist/tools/implementations/repost-tool.d.ts.map +1 -1
- package/dist/tools/implementations/repost-tool.js +149 -21
- package/dist/tools/implementations/repost-tool.js.map +1 -1
- package/dist/tools/implementations/rich-media-tools.d.ts +58 -87
- package/dist/tools/implementations/rich-media-tools.d.ts.map +1 -1
- package/dist/tools/implementations/rich-media-tools.js +82 -191
- package/dist/tools/implementations/rich-media-tools.js.map +1 -1
- package/dist/tools/implementations/search-actors-tool.d.ts +109 -0
- package/dist/tools/implementations/search-actors-tool.d.ts.map +1 -0
- package/dist/tools/implementations/search-actors-tool.js +110 -0
- package/dist/tools/implementations/search-actors-tool.js.map +1 -0
- package/dist/tools/implementations/search-posts-tool.d.ts +114 -6
- package/dist/tools/implementations/search-posts-tool.d.ts.map +1 -1
- package/dist/tools/implementations/search-posts-tool.js +138 -64
- package/dist/tools/implementations/search-posts-tool.js.map +1 -1
- package/dist/tools/implementations/social-graph-tools.d.ts +227 -48
- package/dist/tools/implementations/social-graph-tools.d.ts.map +1 -1
- package/dist/tools/implementations/social-graph-tools.js +270 -148
- package/dist/tools/implementations/social-graph-tools.js.map +1 -1
- package/dist/tools/implementations/timeline-tools.d.ts +91 -4
- package/dist/tools/implementations/timeline-tools.d.ts.map +1 -1
- package/dist/tools/implementations/timeline-tools.js +81 -56
- package/dist/tools/implementations/timeline-tools.js.map +1 -1
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +71 -84
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +14 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +9 -10
- package/dist/types/index.js.map +1 -1
- package/dist/utils/atp-client.d.ts +27 -3
- package/dist/utils/atp-client.d.ts.map +1 -1
- package/dist/utils/atp-client.js +113 -48
- package/dist/utils/atp-client.js.map +1 -1
- package/dist/utils/config.d.ts +18 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +84 -45
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/firehose-client.d.ts +49 -5
- package/dist/utils/firehose-client.d.ts.map +1 -1
- package/dist/utils/firehose-client.js +144 -45
- package/dist/utils/firehose-client.js.map +1 -1
- package/dist/utils/logger.d.ts +21 -2
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +41 -13
- 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 +64 -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 +18 -31
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +55 -76
- 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 +375 -0
- package/dist/utils/url-safety.js.map +1 -0
- package/package.json +53 -36
- 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/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 -281
- package/dist/tools/implementations/discover-trending-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 -126
- package/dist/tools/implementations/generate-alt-text-tool.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 -183
- package/dist/tools/implementations/oauth-tools.js.map +0 -1
- package/dist/tools/implementations/streaming-tools.d.ts +0 -211
- package/dist/tools/implementations/streaming-tools.d.ts.map +0 -1
- package/dist/tools/implementations/streaming-tools.js +0 -394
- package/dist/tools/implementations/streaming-tools.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,43 +1,55 @@
|
|
|
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, search accounts, fetch
|
|
39
|
+
follower/following lists), or add authentication for full functionality (search,
|
|
40
|
+
write operations, private data, feeds).
|
|
35
41
|
|
|
36
|
-
> **
|
|
42
|
+
> **Zero-config launch**: `npx atproto-mcp` runs the server in unauthenticated
|
|
43
|
+
> public-data mode — no credentials required.
|
|
44
|
+
>
|
|
45
|
+
> **Recent additions**: Batch operations for bulk actions, advanced analytics
|
|
46
|
+
> and insights, intelligent content discovery, and a conversation-context
|
|
47
|
+
> scratchpad resource.
|
|
37
48
|
|
|
38
49
|
## Architecture
|
|
39
50
|
|
|
40
|
-
This MCP server acts as a bridge between LLM clients and the AT Protocol
|
|
51
|
+
This MCP server acts as a bridge between LLM clients and the AT Protocol
|
|
52
|
+
ecosystem:
|
|
41
53
|
|
|
42
54
|
```
|
|
43
55
|
┌─────────────────┐
|
|
@@ -63,48 +75,68 @@ This MCP server acts as a bridge between LLM clients and the AT Protocol ecosyst
|
|
|
63
75
|
└─────────────────┘
|
|
64
76
|
```
|
|
65
77
|
|
|
66
|
-
**Key Point**: Users don't interact with this server directly. Instead, they
|
|
78
|
+
**Key Point**: Users don't interact with this server directly. Instead, they
|
|
79
|
+
talk to their LLM client in natural language, and the LLM client uses this MCP
|
|
80
|
+
server to access AT Protocol functionality.
|
|
67
81
|
|
|
68
82
|
## Features
|
|
69
83
|
|
|
70
|
-
###
|
|
84
|
+
### Highlights
|
|
71
85
|
|
|
72
|
-
- **Batch Operations**: Perform multiple operations in a single call
|
|
73
|
-
|
|
74
|
-
- **
|
|
75
|
-
|
|
86
|
+
- **Batch Operations**: Perform multiple operations in a single call
|
|
87
|
+
(follow/like/repost up to 25 items at once)
|
|
88
|
+
- **Analytics & Insights**: Analyze engagement patterns, network connections,
|
|
89
|
+
and get content strategy recommendations
|
|
90
|
+
- **Content Discovery**: Find similar users, trending topics, and influential
|
|
91
|
+
voices in your areas of interest
|
|
92
|
+
- **Conversation Context**: An MCP resource that acts as a scratchpad for
|
|
93
|
+
conversation state (not auto-populated yet)
|
|
76
94
|
|
|
77
95
|
### Core Features
|
|
78
96
|
|
|
79
|
-
- **Unauthenticated Mode**:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- **
|
|
97
|
+
- **Zero-config Unauthenticated Mode**: Run `npx atproto-mcp` to access public
|
|
98
|
+
data without any setup - view profiles, search accounts, and fetch
|
|
99
|
+
follower/following lists
|
|
100
|
+
- **Optional Authentication**: Enable full functionality with app passwords for
|
|
101
|
+
write operations, feeds, and private data
|
|
102
|
+
- **Complete AT Protocol Integration**: Full implementation using official
|
|
103
|
+
`@atproto/api`
|
|
104
|
+
- **MCP Server Compliance**: Built with `@modelcontextprotocol/sdk` following
|
|
105
|
+
MCP specification
|
|
83
106
|
- **Type-Safe**: Written in TypeScript with strict type checking
|
|
84
|
-
- **Comprehensive Tools**:
|
|
85
|
-
- **Real-time Support**: WebSocket connections for live data streams with intelligent filtering and keyword monitoring
|
|
107
|
+
- **Comprehensive Tools**: 43 MCP tools for social networking operations
|
|
86
108
|
- **Rate Limiting**: Built-in respect for AT Protocol rate limits
|
|
87
109
|
- **Extensible**: Modular architecture for easy customization
|
|
88
110
|
|
|
111
|
+
> **Planned**: OAuth login and real-time firehose streaming are on the roadmap
|
|
112
|
+
> but not yet functional. App-password authentication is the supported auth path
|
|
113
|
+
> today.
|
|
114
|
+
|
|
89
115
|
## Who Is This For?
|
|
90
116
|
|
|
91
117
|
### Primary Audience: LLM Clients
|
|
92
118
|
|
|
93
|
-
This is an **MCP (Model Context Protocol) server** designed to be consumed by
|
|
119
|
+
This is an **MCP (Model Context Protocol) server** designed to be consumed by
|
|
120
|
+
**LLM clients** such as:
|
|
121
|
+
|
|
94
122
|
- Claude Desktop
|
|
95
123
|
- Other MCP-compatible AI assistants
|
|
96
124
|
- Custom LLM applications using the MCP SDK
|
|
97
125
|
|
|
98
126
|
**How it works:**
|
|
127
|
+
|
|
99
128
|
```
|
|
100
129
|
User → LLM Client (Claude Desktop) → MCP Protocol → This Server → AT Protocol → Bluesky
|
|
101
130
|
```
|
|
102
131
|
|
|
103
|
-
Users interact with their LLM client in natural language (e.g., "search for
|
|
132
|
+
Users interact with their LLM client in natural language (e.g., "search for
|
|
133
|
+
posts about AI"), and the LLM client uses this MCP server to fulfill those
|
|
134
|
+
requests by calling the appropriate tools via the MCP protocol.
|
|
104
135
|
|
|
105
136
|
### Secondary Audience: Developers
|
|
106
137
|
|
|
107
138
|
This project is also for developers who want to:
|
|
139
|
+
|
|
108
140
|
- **Deploy** the MCP server for their LLM clients to connect to
|
|
109
141
|
- **Extend** the server with custom MCP tools and resources
|
|
110
142
|
- **Contribute** to the open-source project
|
|
@@ -115,20 +147,39 @@ This project is also for developers who want to:
|
|
|
115
147
|
- A JavaScript/TypeScript library to import into your app
|
|
116
148
|
- An end-user application
|
|
117
149
|
|
|
118
|
-
If you're building an application that needs AT Protocol functionality, you
|
|
150
|
+
If you're building an application that needs AT Protocol functionality, you
|
|
151
|
+
should either:
|
|
152
|
+
|
|
119
153
|
1. Use the official `@atproto/api` package directly, OR
|
|
120
|
-
2. Build an LLM-powered application that uses this MCP server through an LLM
|
|
154
|
+
2. Build an LLM-powered application that uses this MCP server through an LLM
|
|
155
|
+
client
|
|
121
156
|
|
|
122
157
|
## Installation
|
|
123
158
|
|
|
159
|
+
Run it with no install and no configuration — `npx atproto-mcp` launches the
|
|
160
|
+
server in unauthenticated public-data mode immediately:
|
|
161
|
+
|
|
124
162
|
```bash
|
|
125
|
-
|
|
163
|
+
npx atproto-mcp
|
|
126
164
|
```
|
|
127
165
|
|
|
128
|
-
Or
|
|
166
|
+
Or install globally:
|
|
129
167
|
|
|
130
168
|
```bash
|
|
131
|
-
|
|
169
|
+
npm install -g atproto-mcp
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Claude Desktop
|
|
173
|
+
|
|
174
|
+
Add this to your Claude Desktop MCP configuration to run the server with zero
|
|
175
|
+
config:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"mcpServers": {
|
|
180
|
+
"atproto": { "command": "npx", "args": ["-y", "atproto-mcp"] }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
132
183
|
```
|
|
133
184
|
|
|
134
185
|
## Quick Start
|
|
@@ -137,9 +188,11 @@ npx atproto-mcp
|
|
|
137
188
|
|
|
138
189
|
**Perfect for LLM clients that need to access public AT Protocol data:**
|
|
139
190
|
|
|
140
|
-
1. **Configure your LLM client** (e.g., Claude Desktop) to launch the MCP
|
|
191
|
+
1. **Configure your LLM client** (e.g., Claude Desktop) to launch the MCP
|
|
192
|
+
server:
|
|
141
193
|
|
|
142
194
|
Add to your LLM client's MCP configuration:
|
|
195
|
+
|
|
143
196
|
```json
|
|
144
197
|
{
|
|
145
198
|
"mcpServers": {
|
|
@@ -153,21 +206,36 @@ npx atproto-mcp
|
|
|
153
206
|
|
|
154
207
|
2. **Start your LLM client** - it will automatically launch the MCP server
|
|
155
208
|
|
|
156
|
-
3. **Interact in natural language** - Ask your LLM to search posts, view
|
|
209
|
+
3. **Interact in natural language** - Ask your LLM to search posts, view
|
|
210
|
+
profiles, etc.
|
|
157
211
|
|
|
158
212
|
**What your LLM can do in unauthenticated mode:**
|
|
159
|
-
|
|
160
|
-
-
|
|
213
|
+
|
|
214
|
+
- View user profiles (`get_user_profile` - works without auth, provides
|
|
215
|
+
additional viewer-specific data when authenticated)
|
|
216
|
+
- Search for accounts by handle or name (`search_actors`)
|
|
217
|
+
- List a user's posts (`get_author_feed`)
|
|
218
|
+
- View follower/following lists (`get_user_connections` with
|
|
219
|
+
`direction: 'followers' | 'follows'` - ENHANCED mode: works without auth,
|
|
220
|
+
enriches the underlying API call when authenticated)
|
|
161
221
|
|
|
162
222
|
**Note:** The following features require authentication:
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
|
|
223
|
+
|
|
224
|
+
- Searching posts and hashtags (`search_posts`) - **API changed in 2025 to
|
|
225
|
+
require authentication**
|
|
226
|
+
- Browsing feeds and threads (`get_post_context`, `get_custom_feed`,
|
|
227
|
+
`get_timeline`)
|
|
166
228
|
- All write operations (create, like, repost, follow, etc.)
|
|
167
|
-
- Resources (timeline, profile, notifications) - these are listed but
|
|
168
|
-
|
|
229
|
+
- Resources (timeline, profile, notifications) - these are listed but require
|
|
230
|
+
authentication to return data (the `conversation-context` scratchpad resource
|
|
231
|
+
is readable without auth and simply returns near-empty placeholder content)
|
|
232
|
+
- Prompts (content composition, reply templates) - these are listed but require
|
|
233
|
+
authentication to be available
|
|
169
234
|
|
|
170
|
-
**Important:** All tools, resources, and prompts are listed by the MCP server
|
|
235
|
+
**Important:** All tools, resources, and prompts are listed by the MCP server
|
|
236
|
+
regardless of authentication state. Most tools and resources that require
|
|
237
|
+
authentication will return a clear error message when called without proper
|
|
238
|
+
credentials.
|
|
171
239
|
|
|
172
240
|
### Option 2: Authenticated Mode (For full functionality)
|
|
173
241
|
|
|
@@ -193,6 +261,7 @@ npx atproto-mcp
|
|
|
193
261
|
2. **Start your LLM client** - it will launch the authenticated MCP server
|
|
194
262
|
|
|
195
263
|
**What your LLM can do in authenticated mode:**
|
|
264
|
+
|
|
196
265
|
- Create, edit, and delete posts
|
|
197
266
|
- Follow/unfollow users
|
|
198
267
|
- Like and repost content
|
|
@@ -201,94 +270,93 @@ npx atproto-mcp
|
|
|
201
270
|
|
|
202
271
|
## Available Tools
|
|
203
272
|
|
|
204
|
-
The server provides **
|
|
273
|
+
The server provides **43 MCP tools** across multiple categories. See the
|
|
274
|
+
[complete API documentation](https://cameronrye.github.io/atproto-mcp/api/) for
|
|
275
|
+
detailed information on each tool.
|
|
205
276
|
|
|
206
277
|
### Public Tools (No Authentication Required)
|
|
207
278
|
|
|
208
279
|
**Data Retrieval**
|
|
209
|
-
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works without auth, provides additional viewer-specific data when authenticated)
|
|
210
280
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- `
|
|
214
|
-
|
|
215
|
-
- `
|
|
281
|
+
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works
|
|
282
|
+
without auth, provides additional viewer-specific data when authenticated)
|
|
283
|
+
- `get_user_summary` - Get a profile with recent posts and engagement stats in
|
|
284
|
+
one call (ENHANCED mode)
|
|
285
|
+
- `search_actors` - Find accounts by handle or display name (ENHANCED mode)
|
|
286
|
+
- `get_author_feed` - List a specific user's posts (ENHANCED mode)
|
|
287
|
+
- `get_user_connections` - Get follower or following lists via
|
|
288
|
+
`direction: 'followers' | 'follows'` (ENHANCED mode: works without auth,
|
|
289
|
+
enriches the underlying API call when authenticated)
|
|
290
|
+
- `get_post_context` - Get a post with optional thread, author profile,
|
|
291
|
+
engagement metrics, and media (ENHANCED mode)
|
|
216
292
|
|
|
217
|
-
**
|
|
293
|
+
**Rich Media**
|
|
294
|
+
|
|
295
|
+
- `analyze_image` - Report blob-declared size and MIME type for an image (PUBLIC
|
|
296
|
+
mode: no auth required; does not decode pixels, so no dimensions/aspect ratio)
|
|
297
|
+
|
|
298
|
+
**Note:** As of 2025, the AT Protocol API has changed to require authentication
|
|
299
|
+
for most endpoints that were previously public, including `search_posts`.
|
|
218
300
|
|
|
219
301
|
### Private Tools (Authentication Required)
|
|
220
302
|
|
|
221
303
|
**Social Operations**
|
|
222
|
-
|
|
223
|
-
- `
|
|
304
|
+
|
|
305
|
+
- `create_post` - Create posts with text, auto-detected or explicit richtext
|
|
306
|
+
facets, replies, image/external embeds, and quote posts
|
|
307
|
+
- `create_thread` - Create multi-post threads in one call
|
|
224
308
|
- `reply_to_post` - Reply to existing posts with threading
|
|
225
309
|
- `like_post` / `unlike_post` - Like and unlike posts
|
|
226
310
|
- `repost` / `unrepost` - Repost content with optional quotes
|
|
227
311
|
- `follow_user` / `unfollow_user` - Follow and unfollow users
|
|
228
312
|
|
|
229
313
|
**Data Retrieval**
|
|
230
|
-
|
|
231
|
-
- `
|
|
232
|
-
|
|
233
|
-
- `get_thread` - View post threads and conversations
|
|
314
|
+
|
|
315
|
+
- `search_posts` - Search for posts and content across the network (⚠️ API
|
|
316
|
+
changed in 2025 to require auth)
|
|
234
317
|
- `get_custom_feed` - Access custom feeds
|
|
235
318
|
- `get_timeline` - Retrieve personalized timelines
|
|
236
|
-
- `get_notifications` - Access notification feeds
|
|
319
|
+
- `get_notifications` - Access notification feeds (use `countOnly: true` for a
|
|
320
|
+
cheap unread badge count)
|
|
321
|
+
- `mark_notifications_seen` - Mark notifications as seen up to a timestamp
|
|
237
322
|
|
|
238
323
|
**Content Management**
|
|
324
|
+
|
|
239
325
|
- `upload_image` / `upload_video` - Upload media content
|
|
240
326
|
- `delete_post` - Remove posts
|
|
241
327
|
- `update_profile` - Modify profile and settings
|
|
242
328
|
- `generate_link_preview` - Generate link previews for posts
|
|
243
329
|
|
|
244
330
|
**List Management**
|
|
331
|
+
|
|
245
332
|
- `create_list` - Create user lists
|
|
246
333
|
- `add_to_list` / `remove_from_list` - Manage list members
|
|
247
334
|
- `get_list` - Retrieve list information
|
|
248
335
|
|
|
249
336
|
**Moderation**
|
|
337
|
+
|
|
250
338
|
- `mute_user` / `unmute_user` - Mute and unmute users
|
|
251
339
|
- `block_user` / `unblock_user` - Block and unblock users
|
|
252
340
|
- `report_content` / `report_user` - Report content and users
|
|
253
|
-
|
|
254
|
-
**Real-time Streaming & Intelligence**
|
|
255
|
-
- `start_streaming` - Start real-time event stream with filtering
|
|
256
|
-
- `stop_streaming` - Stop event stream
|
|
257
|
-
- `get_streaming_status` - Check streaming status
|
|
258
|
-
- `get_recent_events` - Retrieve recent events from stream
|
|
259
|
-
- `monitor_keywords` - Monitor firehose for specific keywords in real-time
|
|
260
|
-
- `track_users` - Track activity from specific users in real-time
|
|
341
|
+
- `analyze_moderation_status` - Check moderation status of content
|
|
261
342
|
|
|
262
343
|
**Batch Operations**
|
|
263
|
-
|
|
264
|
-
- `
|
|
265
|
-
|
|
344
|
+
|
|
345
|
+
- `batch_action` - Apply one action across up to 25 targets in a single call via
|
|
346
|
+
`action: 'follow' | 'like' | 'repost'`
|
|
266
347
|
|
|
267
348
|
**Analytics & Insights**
|
|
268
|
-
|
|
269
|
-
- `
|
|
270
|
-
|
|
349
|
+
|
|
350
|
+
- `analyze_account` - Analyze a single account along one dimension via
|
|
351
|
+
`dimension: 'engagement' | 'network' | 'strategy'`
|
|
271
352
|
- `find_influential_users` - Find influential users in a topic area
|
|
272
353
|
|
|
273
354
|
**Content Discovery**
|
|
274
|
-
|
|
355
|
+
|
|
356
|
+
- `discover` - Surface timeline content via `mode: 'trending' | 'recommended'`
|
|
275
357
|
- `find_similar_users` - Find users similar to a given user
|
|
276
|
-
- `recommend_content` - Get personalized content recommendations
|
|
277
358
|
- `discover_communities` - Discover communities around topics
|
|
278
359
|
|
|
279
|
-
**Composite Operations**
|
|
280
|
-
- `get_user_summary` - Get complete user profile with stats and analysis
|
|
281
|
-
- `get_post_context` - Get post with thread, author, and engagement data
|
|
282
|
-
- `create_thread` - Create multi-post threads in one call
|
|
283
|
-
|
|
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
|
-
**Enhanced Moderation**
|
|
290
|
-
- `analyze_moderation_status` - Check moderation status of content
|
|
291
|
-
|
|
292
360
|
## Documentation
|
|
293
361
|
|
|
294
362
|
Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
@@ -301,21 +369,19 @@ Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
|
301
369
|
|
|
302
370
|
## Authentication (Optional)
|
|
303
371
|
|
|
304
|
-
The server works perfectly without authentication for accessing public data.
|
|
372
|
+
The server works perfectly without authentication for accessing public data.
|
|
373
|
+
Authentication is only needed for write operations and private data access.
|
|
305
374
|
|
|
306
375
|
### App Passwords (Recommended for Development)
|
|
376
|
+
|
|
307
377
|
```bash
|
|
308
378
|
export ATPROTO_IDENTIFIER="your-handle.bsky.social"
|
|
309
379
|
export ATPROTO_PASSWORD="your-app-password"
|
|
310
380
|
atproto-mcp
|
|
311
381
|
```
|
|
312
382
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
export ATPROTO_CLIENT_ID="your-client-id"
|
|
316
|
-
export ATPROTO_CLIENT_SECRET="your-client-secret"
|
|
317
|
-
atproto-mcp --auth oauth
|
|
318
|
-
```
|
|
383
|
+
App passwords are the supported authentication path. OAuth login is planned but
|
|
384
|
+
not yet functional.
|
|
319
385
|
|
|
320
386
|
## Development
|
|
321
387
|
|
|
@@ -341,7 +407,8 @@ pnpm build # or: npm run build
|
|
|
341
407
|
|
|
342
408
|
### Available Commands
|
|
343
409
|
|
|
344
|
-
This project provides cross-platform npm scripts that work on Windows, macOS,
|
|
410
|
+
This project provides cross-platform npm scripts that work on Windows, macOS,
|
|
411
|
+
and Linux:
|
|
345
412
|
|
|
346
413
|
```bash
|
|
347
414
|
# Show all available commands
|
|
@@ -379,8 +446,9 @@ npm run deps:audit # Audit for security issues
|
|
|
379
446
|
|
|
380
447
|
### Cross-Platform Compatibility
|
|
381
448
|
|
|
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`,
|
|
449
|
+
All build commands work on **Windows, macOS, and Linux** without requiring
|
|
450
|
+
additional tools. Simply use npm scripts on any platform (e.g., `npm run dev`,
|
|
451
|
+
`npm test`, `npm run build`).
|
|
384
452
|
|
|
385
453
|
## Testing
|
|
386
454
|
|
|
@@ -401,7 +469,8 @@ pnpm test:ui
|
|
|
401
469
|
|
|
402
470
|
### Integration Tests
|
|
403
471
|
|
|
404
|
-
Comprehensive integration tests that connect to real AT Protocol servers to
|
|
472
|
+
Comprehensive integration tests that connect to real AT Protocol servers to
|
|
473
|
+
validate all public-facing functionality:
|
|
405
474
|
|
|
406
475
|
```bash
|
|
407
476
|
# Run integration tests (requires internet connection)
|
|
@@ -409,18 +478,25 @@ npm run test:integration
|
|
|
409
478
|
```
|
|
410
479
|
|
|
411
480
|
**What's tested:**
|
|
412
|
-
|
|
481
|
+
|
|
482
|
+
- Public/enhanced tools (`get_user_profile`, `get_user_connections`,
|
|
483
|
+
`get_author_feed`) and authenticated tools (`search_posts`,
|
|
484
|
+
`get_post_context`, `get_custom_feed`)
|
|
413
485
|
- DID and handle resolution
|
|
414
486
|
- Pagination support
|
|
415
487
|
- Error handling
|
|
416
488
|
- AT Protocol specification compliance
|
|
417
489
|
- Rate limiting behavior
|
|
418
490
|
|
|
419
|
-
**Note:** Integration tests are opt-in and disabled by default to avoid hitting
|
|
491
|
+
**Note:** Integration tests are opt-in and disabled by default to avoid hitting
|
|
492
|
+
real servers during normal development. See
|
|
493
|
+
[Integration Tests Documentation](src/__tests__/INTEGRATION_TESTS.md) for
|
|
494
|
+
details.
|
|
420
495
|
|
|
421
496
|
## Contributing
|
|
422
497
|
|
|
423
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
|
|
498
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
|
|
499
|
+
for details.
|
|
424
500
|
|
|
425
501
|
1. Fork the repository
|
|
426
502
|
2. Create a feature branch
|
|
@@ -434,8 +510,10 @@ This project is licensed under the MIT License.
|
|
|
434
510
|
|
|
435
511
|
## Acknowledgments
|
|
436
512
|
|
|
437
|
-
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the
|
|
438
|
-
|
|
513
|
+
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the
|
|
514
|
+
excellent protocol and SDK
|
|
515
|
+
- [Anthropic](https://github.com/modelcontextprotocol) for the Model Context
|
|
516
|
+
Protocol
|
|
439
517
|
- The open source community for inspiration and contributions
|
|
440
518
|
|
|
441
519
|
## Support
|
|
@@ -444,76 +522,74 @@ This project is licensed under the MIT License.
|
|
|
444
522
|
- [Issue Tracker](https://github.com/cameronrye/atproto-mcp/issues)
|
|
445
523
|
- [Discussions](https://github.com/cameronrye/atproto-mcp/discussions)
|
|
446
524
|
|
|
447
|
-
##
|
|
525
|
+
## Deployment
|
|
448
526
|
|
|
449
|
-
|
|
527
|
+
This is a **stdio MCP server**: it is normally launched by an MCP client (e.g.
|
|
528
|
+
Claude Desktop) via `npx atproto-mcp` and communicates over stdin/stdout. It
|
|
529
|
+
does not listen on a network port, so there is no HTTP endpoint to expose or
|
|
530
|
+
scale.
|
|
450
531
|
|
|
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
|
|
532
|
+
### Built-in safeguards
|
|
458
533
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
534
|
+
- **Error sanitization**: in `NODE_ENV=production`, internal error details are
|
|
535
|
+
redacted before being returned to the client.
|
|
536
|
+
- **Rate limiting**: per-tool invocation rate limiting guards against runaway
|
|
537
|
+
loops.
|
|
538
|
+
- **SSRF protection**: outbound URL/media fetches reject private/internal
|
|
539
|
+
network destinations and cap response size and time.
|
|
540
|
+
- **Path-traversal protection**: local file reads are confined to an allowed
|
|
541
|
+
base directory (`ATPROTO_MEDIA_DIR`, default: working directory).
|
|
463
542
|
|
|
464
|
-
|
|
543
|
+
### Running in Docker
|
|
544
|
+
|
|
545
|
+
The container runs the same stdio server, so attach to it via your MCP client
|
|
546
|
+
rather than mapping a port:
|
|
547
|
+
|
|
548
|
+
```bash
|
|
465
549
|
docker build -t atproto-mcp .
|
|
466
|
-
docker run -
|
|
467
|
-
-e ATPROTO_IDENTIFIER=your.handle \
|
|
468
|
-
-e ATPROTO_PASSWORD=your-password \
|
|
550
|
+
docker run -i --rm \
|
|
551
|
+
-e ATPROTO_IDENTIFIER=your.handle.bsky.social \
|
|
552
|
+
-e ATPROTO_PASSWORD=your-app-password \
|
|
469
553
|
atproto-mcp
|
|
470
554
|
```
|
|
471
555
|
|
|
472
|
-
### Environment
|
|
556
|
+
### Environment configuration
|
|
557
|
+
|
|
473
558
|
```bash
|
|
474
|
-
# Copy example environment file
|
|
559
|
+
# Copy the example environment file and edit it (loaded automatically by the CLI)
|
|
475
560
|
cp .env.example .env
|
|
561
|
+
```
|
|
476
562
|
|
|
477
|
-
|
|
563
|
+
```dotenv
|
|
478
564
|
ATPROTO_IDENTIFIER=your.handle.bsky.social
|
|
479
565
|
ATPROTO_PASSWORD=your-app-password
|
|
480
566
|
NODE_ENV=production
|
|
481
567
|
LOG_LEVEL=info
|
|
482
568
|
```
|
|
483
569
|
|
|
484
|
-
|
|
570
|
+
See [.env.example](.env.example) for the full list of variables the server
|
|
571
|
+
reads.
|
|
485
572
|
|
|
486
573
|
## Security
|
|
487
574
|
|
|
488
|
-
Security is a top priority for this project. Please review our security
|
|
575
|
+
Security is a top priority for this project. Please review our security
|
|
576
|
+
practices and policies:
|
|
489
577
|
|
|
490
578
|
### Security Best Practices
|
|
491
579
|
|
|
492
580
|
**Before deploying to production:**
|
|
493
581
|
|
|
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**
|
|
582
|
+
1. **Secure Your Credentials**
|
|
505
583
|
- Never commit `.env` files to version control
|
|
506
|
-
- Use app passwords instead of main account
|
|
584
|
+
- Use app passwords instead of your main account password
|
|
507
585
|
- Rotate credentials regularly
|
|
508
|
-
- Use secret management
|
|
586
|
+
- Use a secret management system where available (AWS Secrets Manager,
|
|
587
|
+
HashiCorp Vault, etc.)
|
|
509
588
|
|
|
510
|
-
|
|
511
|
-
-
|
|
512
|
-
- Configure `TRUSTED_PROXIES` if behind a reverse proxy
|
|
513
|
-
- Enable rate limiting
|
|
514
|
-
- Restrict access to internal services (Redis, Prometheus, Grafana)
|
|
589
|
+
2. **Run in production mode**
|
|
590
|
+
- Set `NODE_ENV=production` so returned error messages are sanitized
|
|
515
591
|
|
|
516
|
-
|
|
592
|
+
3. **Keep Dependencies Updated**
|
|
517
593
|
```bash
|
|
518
594
|
pnpm audit
|
|
519
595
|
pnpm update
|
|
@@ -521,9 +597,11 @@ Security is a top priority for this project. Please review our security practice
|
|
|
521
597
|
|
|
522
598
|
### Reporting Security Vulnerabilities
|
|
523
599
|
|
|
524
|
-
If you discover a security vulnerability, please review our
|
|
600
|
+
If you discover a security vulnerability, please review our
|
|
601
|
+
[Security Policy](SECURITY.md) for responsible disclosure guidelines.
|
|
525
602
|
|
|
526
|
-
**Do not open public issues for security vulnerabilities.** Instead, send me a
|
|
603
|
+
**Do not open public issues for security vulnerabilities.** Instead, send me a
|
|
604
|
+
message privately.
|
|
527
605
|
|
|
528
606
|
### Security Features
|
|
529
607
|
|
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"}
|