atproto-mcp 0.1.1 → 0.2.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 +326 -82
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +65 -130
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts +2 -2
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +2 -2
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/base.d.ts +38 -0
- package/dist/resources/base.d.ts.map +1 -0
- package/dist/resources/base.js +27 -0
- package/dist/resources/base.js.map +1 -0
- package/dist/resources/conversation-context-resource.d.ts +113 -0
- package/dist/resources/conversation-context-resource.d.ts.map +1 -0
- package/dist/resources/conversation-context-resource.js +177 -0
- package/dist/resources/conversation-context-resource.js.map +1 -0
- package/dist/resources/index.d.ts +7 -36
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +11 -25
- package/dist/resources/index.js.map +1 -1
- package/dist/test/integration-config.d.ts +60 -0
- package/dist/test/integration-config.d.ts.map +1 -0
- package/dist/test/integration-config.js +86 -0
- package/dist/test/integration-config.js.map +1 -0
- package/dist/tools/implementations/analytics-tools.d.ts +230 -0
- package/dist/tools/implementations/analytics-tools.d.ts.map +1 -0
- package/dist/tools/implementations/analytics-tools.js +588 -0
- package/dist/tools/implementations/analytics-tools.js.map +1 -0
- package/dist/tools/implementations/analyze-engagement-tool.d.ts +105 -0
- package/dist/tools/implementations/analyze-engagement-tool.d.ts.map +1 -0
- package/dist/tools/implementations/analyze-engagement-tool.js +229 -0
- package/dist/tools/implementations/analyze-engagement-tool.js.map +1 -0
- package/dist/tools/implementations/base-tool.d.ts +16 -0
- package/dist/tools/implementations/base-tool.d.ts.map +1 -1
- package/dist/tools/implementations/base-tool.js +38 -4
- package/dist/tools/implementations/base-tool.js.map +1 -1
- package/dist/tools/implementations/batch-operations-tools.d.ts +179 -0
- package/dist/tools/implementations/batch-operations-tools.d.ts.map +1 -0
- package/dist/tools/implementations/batch-operations-tools.js +562 -0
- package/dist/tools/implementations/batch-operations-tools.js.map +1 -0
- package/dist/tools/implementations/composite-tools.d.ts +154 -0
- package/dist/tools/implementations/composite-tools.d.ts.map +1 -0
- package/dist/tools/implementations/composite-tools.js +287 -0
- package/dist/tools/implementations/composite-tools.js.map +1 -0
- package/dist/tools/implementations/content-discovery-tools.d.ts +225 -0
- package/dist/tools/implementations/content-discovery-tools.d.ts.map +1 -0
- package/dist/tools/implementations/content-discovery-tools.js +580 -0
- package/dist/tools/implementations/content-discovery-tools.js.map +1 -0
- package/dist/tools/implementations/content-management-tools.js +1 -1
- package/dist/tools/implementations/content-management-tools.js.map +1 -1
- package/dist/tools/implementations/create-post-tool.d.ts +9 -2
- package/dist/tools/implementations/create-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/create-post-tool.js +47 -13
- package/dist/tools/implementations/create-post-tool.js.map +1 -1
- package/dist/tools/implementations/create-thread-tool.d.ts +73 -0
- package/dist/tools/implementations/create-thread-tool.d.ts.map +1 -0
- package/dist/tools/implementations/create-thread-tool.js +140 -0
- package/dist/tools/implementations/create-thread-tool.js.map +1 -0
- package/dist/tools/implementations/discover-trending-tool.d.ts +107 -0
- package/dist/tools/implementations/discover-trending-tool.d.ts.map +1 -0
- package/dist/tools/implementations/discover-trending-tool.js +281 -0
- package/dist/tools/implementations/discover-trending-tool.js.map +1 -0
- package/dist/tools/implementations/follow-user-tool.d.ts +8 -0
- package/dist/tools/implementations/follow-user-tool.d.ts.map +1 -1
- package/dist/tools/implementations/follow-user-tool.js +12 -4
- package/dist/tools/implementations/follow-user-tool.js.map +1 -1
- package/dist/tools/implementations/generate-alt-text-tool.d.ts +77 -0
- package/dist/tools/implementations/generate-alt-text-tool.d.ts.map +1 -0
- package/dist/tools/implementations/generate-alt-text-tool.js +126 -0
- package/dist/tools/implementations/generate-alt-text-tool.js.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts +16 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts.map +1 -1
- package/dist/tools/implementations/get-user-profile-tool.js +17 -1
- package/dist/tools/implementations/get-user-profile-tool.js.map +1 -1
- package/dist/tools/implementations/index.d.ts +11 -2
- package/dist/tools/implementations/index.d.ts.map +1 -1
- package/dist/tools/implementations/index.js +17 -2
- package/dist/tools/implementations/index.js.map +1 -1
- package/dist/tools/implementations/like-post-tool.d.ts +8 -0
- package/dist/tools/implementations/like-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/like-post-tool.js +12 -4
- package/dist/tools/implementations/like-post-tool.js.map +1 -1
- package/dist/tools/implementations/moderation-tools.d.ts +63 -0
- package/dist/tools/implementations/moderation-tools.d.ts.map +1 -1
- package/dist/tools/implementations/moderation-tools.js +157 -0
- package/dist/tools/implementations/moderation-tools.js.map +1 -1
- package/dist/tools/implementations/oauth-tools.js +1 -1
- package/dist/tools/implementations/oauth-tools.js.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.d.ts +4 -0
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +1 -1
- package/dist/tools/implementations/reply-to-post-tool.js +7 -3
- package/dist/tools/implementations/reply-to-post-tool.js.map +1 -1
- package/dist/tools/implementations/repost-tool.d.ts +8 -0
- package/dist/tools/implementations/repost-tool.d.ts.map +1 -1
- package/dist/tools/implementations/repost-tool.js +12 -4
- package/dist/tools/implementations/repost-tool.js.map +1 -1
- package/dist/tools/implementations/rich-media-tools.d.ts +177 -0
- package/dist/tools/implementations/rich-media-tools.d.ts.map +1 -0
- package/dist/tools/implementations/rich-media-tools.js +316 -0
- package/dist/tools/implementations/rich-media-tools.js.map +1 -0
- package/dist/tools/implementations/search-posts-tool.d.ts +5 -0
- package/dist/tools/implementations/search-posts-tool.d.ts.map +1 -1
- package/dist/tools/implementations/search-posts-tool.js +16 -6
- package/dist/tools/implementations/search-posts-tool.js.map +1 -1
- package/dist/tools/implementations/streaming-tools.d.ts +81 -0
- package/dist/tools/implementations/streaming-tools.d.ts.map +1 -1
- package/dist/tools/implementations/streaming-tools.js +153 -0
- package/dist/tools/implementations/streaming-tools.js.map +1 -1
- package/dist/tools/implementations/timeline-tools.js +1 -1
- package/dist/tools/implementations/timeline-tools.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +26 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +42 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +133 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/atp-client.d.ts +9 -1
- package/dist/utils/atp-client.d.ts.map +1 -1
- package/dist/utils/atp-client.js +17 -3
- package/dist/utils/atp-client.js.map +1 -1
- package/dist/utils/performance.js +2 -2
- package/dist/utils/performance.js.map +1 -1
- package/package.json +71 -36
package/README.md
CHANGED
|
@@ -6,27 +6,120 @@
|
|
|
6
6
|
[](https://badge.fury.io/js/atproto-mcp)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
9
|
-
|
|
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)
|
|
10
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
|
+

|
|
11
30
|
</div>
|
|
12
31
|
|
|
13
32
|
A comprehensive Model Context Protocol (MCP) server that provides LLMs with direct access to the AT Protocol ecosystem, enabling seamless interaction with Bluesky and other AT Protocol-based social networks.
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
**Supports both authenticated and unauthenticated modes** - Start immediately with public data access (search posts, view profiles), or add authentication for full functionality (write operations, private data, feeds).
|
|
35
|
+
|
|
36
|
+
> **New in v0.1.1**: Batch operations for bulk actions, advanced analytics and insights, intelligent content discovery, and conversation context tracking for better LLM awareness across interactions!
|
|
37
|
+
|
|
38
|
+
## Architecture
|
|
39
|
+
|
|
40
|
+
This MCP server acts as a bridge between LLM clients and the AT Protocol ecosystem:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
┌─────────────────┐
|
|
44
|
+
│ User │ "Search for posts about AI"
|
|
45
|
+
└────────┬────────┘
|
|
46
|
+
│ Natural Language
|
|
47
|
+
▼
|
|
48
|
+
┌─────────────────┐
|
|
49
|
+
│ LLM Client │ (Claude Desktop, etc.)
|
|
50
|
+
│ (MCP Client) │
|
|
51
|
+
└────────┬────────┘
|
|
52
|
+
│ MCP Protocol (JSON-RPC 2.0)
|
|
53
|
+
▼
|
|
54
|
+
┌─────────────────┐
|
|
55
|
+
│ This Server │ AT Protocol MCP Server
|
|
56
|
+
│ (MCP Server) │ - Tools, Resources, Prompts
|
|
57
|
+
└────────┬────────┘
|
|
58
|
+
│ AT Protocol API
|
|
59
|
+
▼
|
|
60
|
+
┌─────────────────┐
|
|
61
|
+
│ AT Protocol │ Bluesky, Custom PDS, etc.
|
|
62
|
+
│ Ecosystem │
|
|
63
|
+
└─────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Key Point**: Users don't interact with this server directly. Instead, they talk to their LLM client in natural language, and the LLM client uses this MCP server to access AT Protocol functionality.
|
|
67
|
+
|
|
68
|
+
## Features
|
|
69
|
+
|
|
70
|
+
### New in v0.1.1
|
|
71
|
+
|
|
72
|
+
- **Batch Operations**: Perform multiple operations in a single call (follow/like/repost up to 25 items at once)
|
|
73
|
+
- **Analytics & Insights**: Analyze engagement patterns, network connections, and get content strategy recommendations
|
|
74
|
+
- **Content Discovery**: Find similar users, trending topics, and influential voices in your areas of interest
|
|
75
|
+
- **Conversation Context**: Track conversation state across LLM interactions for better context awareness
|
|
16
76
|
|
|
17
|
-
|
|
77
|
+
### Core Features
|
|
18
78
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
79
|
+
- **Unauthenticated Mode**: Access public data without any setup - view basic profiles and manage OAuth flows
|
|
80
|
+
- **Optional Authentication**: Enable full functionality with app passwords or OAuth for write operations, feeds, and private data
|
|
21
81
|
- **Complete AT Protocol Integration**: Full implementation using official `@atproto/api`
|
|
22
82
|
- **MCP Server Compliance**: Built with `@modelcontextprotocol/sdk` following MCP specification
|
|
23
83
|
- **Type-Safe**: Written in TypeScript with strict type checking
|
|
24
|
-
- **Comprehensive Tools**:
|
|
25
|
-
- **Real-time Support**: WebSocket connections for live data streams
|
|
84
|
+
- **Comprehensive Tools**: 57 MCP tools for social networking operations
|
|
85
|
+
- **Real-time Support**: WebSocket connections for live data streams with intelligent filtering and keyword monitoring
|
|
26
86
|
- **Rate Limiting**: Built-in respect for AT Protocol rate limits
|
|
27
87
|
- **Extensible**: Modular architecture for easy customization
|
|
28
88
|
|
|
29
|
-
##
|
|
89
|
+
## Who Is This For?
|
|
90
|
+
|
|
91
|
+
### Primary Audience: LLM Clients
|
|
92
|
+
|
|
93
|
+
This is an **MCP (Model Context Protocol) server** designed to be consumed by **LLM clients** such as:
|
|
94
|
+
- Claude Desktop
|
|
95
|
+
- Other MCP-compatible AI assistants
|
|
96
|
+
- Custom LLM applications using the MCP SDK
|
|
97
|
+
|
|
98
|
+
**How it works:**
|
|
99
|
+
```
|
|
100
|
+
User → LLM Client (Claude Desktop) → MCP Protocol → This Server → AT Protocol → Bluesky
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Users interact with their LLM client in natural language (e.g., "search for posts about AI"), and the LLM client uses this MCP server to fulfill those requests by calling the appropriate tools via the MCP protocol.
|
|
104
|
+
|
|
105
|
+
### Secondary Audience: Developers
|
|
106
|
+
|
|
107
|
+
This project is also for developers who want to:
|
|
108
|
+
- **Deploy** the MCP server for their LLM clients to connect to
|
|
109
|
+
- **Extend** the server with custom MCP tools and resources
|
|
110
|
+
- **Contribute** to the open-source project
|
|
111
|
+
|
|
112
|
+
### This Is NOT:
|
|
113
|
+
|
|
114
|
+
- A direct-use REST API or SDK for application developers
|
|
115
|
+
- A JavaScript/TypeScript library to import into your app
|
|
116
|
+
- An end-user application
|
|
117
|
+
|
|
118
|
+
If you're building an application that needs AT Protocol functionality, you should either:
|
|
119
|
+
1. Use the official `@atproto/api` package directly, OR
|
|
120
|
+
2. Build an LLM-powered application that uses this MCP server through an LLM client
|
|
121
|
+
|
|
122
|
+
## Installation
|
|
30
123
|
|
|
31
124
|
```bash
|
|
32
125
|
npm install -g atproto-mcp
|
|
@@ -38,95 +131,165 @@ Or use with npx:
|
|
|
38
131
|
npx atproto-mcp
|
|
39
132
|
```
|
|
40
133
|
|
|
41
|
-
##
|
|
134
|
+
## Quick Start
|
|
42
135
|
|
|
43
136
|
### Option 1: Unauthenticated Mode (Recommended for most use cases)
|
|
44
137
|
|
|
45
138
|
**Perfect for LLM clients that need to access public AT Protocol data:**
|
|
46
139
|
|
|
47
|
-
1. **
|
|
48
|
-
|
|
49
|
-
|
|
140
|
+
1. **Configure your LLM client** (e.g., Claude Desktop) to launch the MCP server:
|
|
141
|
+
|
|
142
|
+
Add to your LLM client's MCP configuration:
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"atproto": {
|
|
147
|
+
"command": "npx",
|
|
148
|
+
"args": ["atproto-mcp"]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
50
152
|
```
|
|
51
153
|
|
|
52
|
-
2. **
|
|
154
|
+
2. **Start your LLM client** - it will automatically launch the MCP server
|
|
53
155
|
|
|
54
|
-
3. **
|
|
156
|
+
3. **Interact in natural language** - Ask your LLM to search posts, view profiles, etc.
|
|
55
157
|
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- ✅ Browse public feeds and threads
|
|
60
|
-
- ✅ Access public timelines
|
|
158
|
+
**What your LLM can do in unauthenticated mode:**
|
|
159
|
+
- View user profiles (`get_user_profile` - works without auth, provides additional viewer-specific data when authenticated)
|
|
160
|
+
- Manage OAuth authentication flows (`start_oauth_flow`, `handle_oauth_callback`, `refresh_oauth_tokens`, `revoke_oauth_tokens`)
|
|
61
161
|
|
|
62
|
-
|
|
162
|
+
**Note:** The following features require authentication:
|
|
163
|
+
- Searching posts and hashtags (`search_posts`) - **API changed in 2025 to require authentication**
|
|
164
|
+
- Viewing follower/following lists (`get_followers`, `get_follows`)
|
|
165
|
+
- Browsing feeds and threads (`get_thread`, `get_custom_feed`, `get_timeline`)
|
|
166
|
+
- All write operations (create, like, repost, follow, etc.)
|
|
167
|
+
- Resources (timeline, profile, notifications) - these are listed but will return an error when accessed without authentication
|
|
168
|
+
- Prompts (content composition, reply templates) - these are listed but will return an error when accessed without authentication
|
|
63
169
|
|
|
64
|
-
**
|
|
170
|
+
**Important:** All tools, resources, and prompts are listed by the MCP server regardless of authentication state. Tools and resources that require authentication will return a clear error message when called without proper credentials.
|
|
65
171
|
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# App Password method (recommended)
|
|
69
|
-
export ATPROTO_IDENTIFIER="your-handle.bsky.social"
|
|
70
|
-
export ATPROTO_PASSWORD="your-app-password"
|
|
172
|
+
### Option 2: Authenticated Mode (For full functionality)
|
|
71
173
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
174
|
+
**Enable write operations and private data access for your LLM:**
|
|
175
|
+
|
|
176
|
+
1. **Configure your LLM client** with AT Protocol credentials:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"mcpServers": {
|
|
181
|
+
"atproto": {
|
|
182
|
+
"command": "npx",
|
|
183
|
+
"args": ["atproto-mcp"],
|
|
184
|
+
"env": {
|
|
185
|
+
"ATPROTO_IDENTIFIER": "your-handle.bsky.social",
|
|
186
|
+
"ATPROTO_PASSWORD": "your-app-password"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
75
191
|
```
|
|
76
192
|
|
|
77
|
-
2. **Start the server
|
|
78
|
-
```bash
|
|
79
|
-
atproto-mcp
|
|
80
|
-
```
|
|
193
|
+
2. **Start your LLM client** - it will launch the authenticated MCP server
|
|
81
194
|
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
195
|
+
**What your LLM can do in authenticated mode:**
|
|
196
|
+
- Create, edit, and delete posts
|
|
197
|
+
- Follow/unfollow users
|
|
198
|
+
- Like and repost content
|
|
199
|
+
- Access personalized timelines and notifications
|
|
200
|
+
- Manage lists and moderation settings
|
|
88
201
|
|
|
89
|
-
##
|
|
202
|
+
## Available Tools
|
|
90
203
|
|
|
91
|
-
|
|
204
|
+
The server provides **57 MCP tools** across multiple categories. See the [complete API documentation](https://cameronrye.github.io/atproto-mcp/api/) for detailed information on each tool.
|
|
205
|
+
|
|
206
|
+
### Public Tools (No Authentication Required)
|
|
92
207
|
|
|
93
208
|
**Data Retrieval**
|
|
94
|
-
- `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- `
|
|
98
|
-
- `
|
|
99
|
-
- `
|
|
100
|
-
- `
|
|
209
|
+
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works without auth, provides additional viewer-specific data when authenticated)
|
|
210
|
+
|
|
211
|
+
**OAuth Management**
|
|
212
|
+
- `start_oauth_flow` - Initiate OAuth authentication
|
|
213
|
+
- `handle_oauth_callback` - Complete OAuth flow
|
|
214
|
+
- `refresh_oauth_tokens` - Refresh authentication tokens
|
|
215
|
+
- `revoke_oauth_tokens` - Revoke OAuth tokens
|
|
101
216
|
|
|
102
|
-
|
|
217
|
+
**Note:** As of 2025, the AT Protocol API has changed to require authentication for most endpoints that were previously public, including `search_posts`.
|
|
218
|
+
|
|
219
|
+
### Private Tools (Authentication Required)
|
|
103
220
|
|
|
104
221
|
**Social Operations**
|
|
105
222
|
- `create_post` - Create new posts with rich text support
|
|
223
|
+
- `create_rich_text_post` - Create posts with advanced formatting
|
|
106
224
|
- `reply_to_post` - Reply to existing posts with threading
|
|
107
225
|
- `like_post` / `unlike_post` - Like and unlike posts
|
|
108
226
|
- `repost` / `unrepost` - Repost content with optional quotes
|
|
109
227
|
- `follow_user` / `unfollow_user` - Follow and unfollow users
|
|
110
|
-
|
|
111
|
-
|
|
228
|
+
|
|
229
|
+
**Data Retrieval**
|
|
230
|
+
- `search_posts` - Search for posts and content across the network (⚠️ API changed in 2025 to require auth)
|
|
231
|
+
- `get_followers` - Get follower lists
|
|
232
|
+
- `get_follows` - Get following lists
|
|
233
|
+
- `get_thread` - View post threads and conversations
|
|
234
|
+
- `get_custom_feed` - Access custom feeds
|
|
235
|
+
- `get_timeline` - Retrieve personalized timelines
|
|
236
|
+
- `get_notifications` - Access notification feeds
|
|
112
237
|
|
|
113
238
|
**Content Management**
|
|
114
239
|
- `upload_image` / `upload_video` - Upload media content
|
|
115
|
-
- `delete_post` - Remove
|
|
116
|
-
- `update_profile` - Modify
|
|
117
|
-
- `
|
|
240
|
+
- `delete_post` - Remove posts
|
|
241
|
+
- `update_profile` - Modify profile and settings
|
|
242
|
+
- `generate_link_preview` - Generate link previews for posts
|
|
243
|
+
|
|
244
|
+
**List Management**
|
|
245
|
+
- `create_list` - Create user lists
|
|
246
|
+
- `add_to_list` / `remove_from_list` - Manage list members
|
|
247
|
+
- `get_list` - Retrieve list information
|
|
118
248
|
|
|
119
249
|
**Moderation**
|
|
120
250
|
- `mute_user` / `unmute_user` - Mute and unmute users
|
|
121
251
|
- `block_user` / `unblock_user` - Block and unblock users
|
|
122
252
|
- `report_content` / `report_user` - Report content and users
|
|
123
253
|
|
|
124
|
-
**
|
|
125
|
-
- `
|
|
126
|
-
- `
|
|
127
|
-
- `
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
261
|
+
|
|
262
|
+
**Batch Operations**
|
|
263
|
+
- `batch_follow` - Follow multiple users at once (up to 25)
|
|
264
|
+
- `batch_like` - Like multiple posts at once (up to 25)
|
|
265
|
+
- `batch_repost` - Repost multiple posts at once (up to 25)
|
|
266
|
+
|
|
267
|
+
**Analytics & Insights**
|
|
268
|
+
- `analyze_engagement` - Analyze engagement patterns across posts
|
|
269
|
+
- `analyze_network` - Analyze user's network and connections
|
|
270
|
+
- `suggest_content_strategy` - Get content strategy recommendations based on performance
|
|
271
|
+
- `find_influential_users` - Find influential users in a topic area
|
|
272
|
+
|
|
273
|
+
**Content Discovery**
|
|
274
|
+
- `discover_trending` - Discover trending topics and posts
|
|
275
|
+
- `find_similar_users` - Find users similar to a given user
|
|
276
|
+
- `recommend_content` - Get personalized content recommendations
|
|
277
|
+
- `discover_communities` - Discover communities around topics
|
|
278
|
+
|
|
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
|
+
## Documentation
|
|
130
293
|
|
|
131
294
|
Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
132
295
|
|
|
@@ -136,7 +299,7 @@ Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
|
136
299
|
- **Examples and Tutorials**
|
|
137
300
|
- **Troubleshooting**
|
|
138
301
|
|
|
139
|
-
##
|
|
302
|
+
## Authentication (Optional)
|
|
140
303
|
|
|
141
304
|
The server works perfectly without authentication for accessing public data. Authentication is only needed for write operations and private data access.
|
|
142
305
|
|
|
@@ -154,27 +317,108 @@ export ATPROTO_CLIENT_SECRET="your-client-secret"
|
|
|
154
317
|
atproto-mcp --auth oauth
|
|
155
318
|
```
|
|
156
319
|
|
|
157
|
-
##
|
|
320
|
+
## Development
|
|
321
|
+
|
|
322
|
+
### Quick Start
|
|
158
323
|
|
|
159
324
|
```bash
|
|
160
325
|
# Clone the repository
|
|
161
326
|
git clone https://github.com/cameronrye/atproto-mcp.git
|
|
162
327
|
cd atproto-mcp
|
|
163
328
|
|
|
164
|
-
# Install dependencies
|
|
165
|
-
npm install
|
|
329
|
+
# Install dependencies (use pnpm, npm, or yarn)
|
|
330
|
+
pnpm install # or: npm install
|
|
166
331
|
|
|
167
332
|
# Start development server
|
|
168
|
-
npm run dev
|
|
333
|
+
pnpm dev # or: npm run dev
|
|
169
334
|
|
|
170
335
|
# Run tests
|
|
171
|
-
npm test
|
|
336
|
+
pnpm test # or: npm test
|
|
172
337
|
|
|
173
338
|
# Build for production
|
|
174
|
-
npm run build
|
|
339
|
+
pnpm build # or: npm run build
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Available Commands
|
|
343
|
+
|
|
344
|
+
This project provides cross-platform npm scripts that work on Windows, macOS, and Linux:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
# Show all available commands
|
|
348
|
+
npm run help
|
|
349
|
+
|
|
350
|
+
# Development
|
|
351
|
+
npm run dev # Start development server with hot reload
|
|
352
|
+
npm run build # Build for production
|
|
353
|
+
npm run start # Start production server
|
|
354
|
+
|
|
355
|
+
# Testing & Quality
|
|
356
|
+
npm test # Run tests
|
|
357
|
+
npm run test:coverage # Run tests with coverage
|
|
358
|
+
npm run test:ui # Run tests with interactive UI
|
|
359
|
+
|
|
360
|
+
# Integration Tests (connects to real AT Protocol servers)
|
|
361
|
+
npm run test:integration
|
|
362
|
+
|
|
363
|
+
npm run lint # Run ESLint
|
|
364
|
+
npm run lint:fix # Fix linting issues
|
|
365
|
+
npm run format # Format code with Prettier
|
|
366
|
+
npm run type-check # Run TypeScript type checking
|
|
367
|
+
npm run check # Run all quality checks
|
|
368
|
+
|
|
369
|
+
# Utilities
|
|
370
|
+
npm run clean # Clean build artifacts
|
|
371
|
+
npm run clean:all # Clean everything including node_modules
|
|
372
|
+
npm run status # Show project status
|
|
373
|
+
npm run ci # Run full CI pipeline locally
|
|
374
|
+
|
|
375
|
+
# Dependencies
|
|
376
|
+
npm run deps:update # Update dependencies
|
|
377
|
+
npm run deps:audit # Audit for security issues
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Cross-Platform Compatibility
|
|
381
|
+
|
|
382
|
+
All build commands work on **Windows, macOS, and Linux** without requiring additional tools.
|
|
383
|
+
Simply use npm scripts on any platform (e.g., `npm run dev`, `npm test`, `npm run build`).
|
|
384
|
+
|
|
385
|
+
## Testing
|
|
386
|
+
|
|
387
|
+
The project includes comprehensive test coverage:
|
|
388
|
+
|
|
389
|
+
### Unit Tests
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
# Run all unit tests
|
|
393
|
+
pnpm test
|
|
394
|
+
|
|
395
|
+
# Run with coverage
|
|
396
|
+
pnpm test:coverage
|
|
397
|
+
|
|
398
|
+
# Run with interactive UI
|
|
399
|
+
pnpm test:ui
|
|
175
400
|
```
|
|
176
401
|
|
|
177
|
-
|
|
402
|
+
### Integration Tests
|
|
403
|
+
|
|
404
|
+
Comprehensive integration tests that connect to real AT Protocol servers to validate all public-facing functionality:
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# Run integration tests (requires internet connection)
|
|
408
|
+
npm run test:integration
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**What's tested:**
|
|
412
|
+
- All public tools (search_posts, get_user_profile, get_followers, get_follows, get_thread, get_custom_feed)
|
|
413
|
+
- DID and handle resolution
|
|
414
|
+
- Pagination support
|
|
415
|
+
- Error handling
|
|
416
|
+
- AT Protocol specification compliance
|
|
417
|
+
- Rate limiting behavior
|
|
418
|
+
|
|
419
|
+
**Note:** Integration tests are opt-in and disabled by default to avoid hitting real servers during normal development. See [Integration Tests Documentation](src/__tests__/INTEGRATION_TESTS.md) for details.
|
|
420
|
+
|
|
421
|
+
## Contributing
|
|
178
422
|
|
|
179
423
|
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
180
424
|
|
|
@@ -184,23 +428,23 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
184
428
|
4. Add tests
|
|
185
429
|
5. Submit a pull request
|
|
186
430
|
|
|
187
|
-
##
|
|
431
|
+
## License
|
|
188
432
|
|
|
189
433
|
This project is licensed under the MIT License.
|
|
190
434
|
|
|
191
|
-
##
|
|
435
|
+
## Acknowledgments
|
|
192
436
|
|
|
193
437
|
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the excellent protocol and SDK
|
|
194
438
|
- [Anthropic](https://github.com/modelcontextprotocol) for the Model Context Protocol
|
|
195
439
|
- The open source community for inspiration and contributions
|
|
196
440
|
|
|
197
|
-
##
|
|
441
|
+
## Support
|
|
198
442
|
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
443
|
+
- [Documentation](https://cameronrye.github.io/atproto-mcp)
|
|
444
|
+
- [Issue Tracker](https://github.com/cameronrye/atproto-mcp/issues)
|
|
445
|
+
- [Discussions](https://github.com/cameronrye/atproto-mcp/discussions)
|
|
202
446
|
|
|
203
|
-
##
|
|
447
|
+
## Production Deployment
|
|
204
448
|
|
|
205
449
|
The AT Protocol MCP Server is production-ready with comprehensive features for enterprise deployment:
|
|
206
450
|
|
|
@@ -239,7 +483,7 @@ LOG_LEVEL=info
|
|
|
239
483
|
|
|
240
484
|
For detailed deployment instructions, see [DEPLOYMENT.md](DEPLOYMENT.md).
|
|
241
485
|
|
|
242
|
-
##
|
|
486
|
+
## Security
|
|
243
487
|
|
|
244
488
|
Security is a top priority for this project. Please review our security practices and policies:
|
|
245
489
|
|
|
@@ -283,12 +527,12 @@ If you discover a security vulnerability, please review our [Security Policy](SE
|
|
|
283
527
|
|
|
284
528
|
### Security Features
|
|
285
529
|
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
530
|
+
- Input validation and sanitization
|
|
531
|
+
- Rate limiting and abuse prevention
|
|
532
|
+
- Credential redaction in logs
|
|
533
|
+
- Non-root Docker containers
|
|
534
|
+
- HTTPS support for AT Protocol
|
|
535
|
+
- Error sanitization to prevent information leakage
|
|
292
536
|
|
|
293
537
|
For more details, see [SECURITY.md](SECURITY.md).
|
|
294
538
|
|
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;AAmOH;;GAEG;AACH,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA0DnC;AAUD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ function showHelp() {
|
|
|
58
58
|
console.log(`
|
|
59
59
|
AT Protocol MCP Server - Comprehensive interface for LLMs to interact with AT Protocol
|
|
60
60
|
|
|
61
|
-
🎯
|
|
61
|
+
🎯 Supports both authenticated and unauthenticated modes!
|
|
62
62
|
|
|
63
63
|
Usage: atproto-mcp [options]
|
|
64
64
|
|
|
@@ -73,13 +73,16 @@ Options:
|
|
|
73
73
|
|
|
74
74
|
🔓 Unauthenticated Mode (Default):
|
|
75
75
|
The server works immediately without any setup. Available features:
|
|
76
|
-
• Search posts and hashtags
|
|
77
|
-
• View user profiles
|
|
78
|
-
•
|
|
79
|
-
• Access public timelines
|
|
76
|
+
• Search posts and hashtags (search_posts)
|
|
77
|
+
• View basic user profiles (get_user_profile)
|
|
78
|
+
• Manage OAuth authentication flows
|
|
80
79
|
|
|
81
80
|
🔐 Authenticated Mode (Optional):
|
|
82
|
-
Set environment variables to enable
|
|
81
|
+
Set environment variables to enable full functionality:
|
|
82
|
+
• All write operations (create, like, repost, follow, etc.)
|
|
83
|
+
• Access to feeds, timelines, and notifications
|
|
84
|
+
• View follower/following lists
|
|
85
|
+
• Resources and prompts
|
|
83
86
|
|
|
84
87
|
Environment Variables:
|
|
85
88
|
ATPROTO_SERVICE AT Protocol service URL
|
|
@@ -122,7 +125,7 @@ function showVersion() {
|
|
|
122
125
|
const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
|
|
123
126
|
console.log(`AT Protocol MCP Server v${packageJson.version}`);
|
|
124
127
|
}
|
|
125
|
-
catch
|
|
128
|
+
catch {
|
|
126
129
|
console.log('AT Protocol MCP Server v0.1.0');
|
|
127
130
|
}
|
|
128
131
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACt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C,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,mBAAmB;QACnB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QAErB,2BAA2B;QAC3B,MAAM,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;IAC1E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,kBAAkB,EAAE,CAAC;YACxC,OAAO,CAAC,KAAK,CAAC,wBAAwB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACvD,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,4CAA4C;AAC5C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export declare class AtpMcpServer {
|
|
|
35
35
|
private setupServer;
|
|
36
36
|
/**
|
|
37
37
|
* Set up basic MCP protocol handlers
|
|
38
|
+
*
|
|
39
|
+
* Note: While the MCP SDK Server class provides the infrastructure, we still need
|
|
40
|
+
* to explicitly register handlers for 'initialize' and 'ping' requests as per the
|
|
41
|
+
* MCP specification. The SDK uses setRequestHandler for all protocol methods.
|
|
38
42
|
*/
|
|
39
43
|
private setupBasicHandlers;
|
|
40
44
|
/**
|
|
@@ -51,6 +55,9 @@ export declare class AtpMcpServer {
|
|
|
51
55
|
private registerPrompts;
|
|
52
56
|
/**
|
|
53
57
|
* Convert Zod schema to JSON Schema for MCP compatibility
|
|
58
|
+
*
|
|
59
|
+
* Uses the well-tested zod-to-json-schema library to ensure comprehensive
|
|
60
|
+
* support for all Zod schema types and proper JSON Schema conversion.
|
|
54
61
|
*/
|
|
55
62
|
private zodToJsonSchema;
|
|
56
63
|
/**
|
|
@@ -118,5 +125,18 @@ export declare class AtpMcpServer {
|
|
|
118
125
|
};
|
|
119
126
|
};
|
|
120
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Export the server class for use by the CLI and programmatic usage
|
|
130
|
+
*
|
|
131
|
+
* Note: This file should not be run directly. Use the CLI (src/cli.ts) instead:
|
|
132
|
+
* npm start
|
|
133
|
+
* or
|
|
134
|
+
* node dist/cli.js
|
|
135
|
+
*
|
|
136
|
+
* For programmatic usage, import and instantiate the AtpMcpServer class:
|
|
137
|
+
* import { AtpMcpServer } from './index.js';
|
|
138
|
+
* const server = new AtpMcpServer(config);
|
|
139
|
+
* await server.start();
|
|
140
|
+
*/
|
|
121
141
|
export default AtpMcpServer;
|
|
122
142
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAMH,OAAO,EAAsB,KAAK,gBAAgB,EAAY,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EACL,cAAc,EAGd,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