atproto-mcp 0.1.0 → 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 +337 -89
- 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
|
@@ -1,28 +1,125 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="docs/public/logo.svg" alt="AT Protocol MCP Server Logo" width="200" height="200">
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](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
|
+
</div>
|
|
8
31
|
|
|
9
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.
|
|
10
33
|
|
|
11
|
-
|
|
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).
|
|
12
35
|
|
|
13
|
-
|
|
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
|
+
```
|
|
14
65
|
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
76
|
+
|
|
77
|
+
### Core Features
|
|
78
|
+
|
|
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
|
|
17
81
|
- **Complete AT Protocol Integration**: Full implementation using official `@atproto/api`
|
|
18
82
|
- **MCP Server Compliance**: Built with `@modelcontextprotocol/sdk` following MCP specification
|
|
19
83
|
- **Type-Safe**: Written in TypeScript with strict type checking
|
|
20
|
-
- **Comprehensive Tools**:
|
|
21
|
-
- **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
|
|
22
86
|
- **Rate Limiting**: Built-in respect for AT Protocol rate limits
|
|
23
87
|
- **Extensible**: Modular architecture for easy customization
|
|
24
88
|
|
|
25
|
-
##
|
|
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
|
|
26
123
|
|
|
27
124
|
```bash
|
|
28
125
|
npm install -g atproto-mcp
|
|
@@ -34,95 +131,165 @@ Or use with npx:
|
|
|
34
131
|
npx atproto-mcp
|
|
35
132
|
```
|
|
36
133
|
|
|
37
|
-
##
|
|
134
|
+
## Quick Start
|
|
38
135
|
|
|
39
136
|
### Option 1: Unauthenticated Mode (Recommended for most use cases)
|
|
40
137
|
|
|
41
138
|
**Perfect for LLM clients that need to access public AT Protocol data:**
|
|
42
139
|
|
|
43
|
-
1. **
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
}
|
|
46
152
|
```
|
|
47
153
|
|
|
48
|
-
2. **
|
|
154
|
+
2. **Start your LLM client** - it will automatically launch the MCP server
|
|
49
155
|
|
|
50
|
-
3. **
|
|
156
|
+
3. **Interact in natural language** - Ask your LLM to search posts, view profiles, etc.
|
|
51
157
|
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
- ✅ Browse public feeds and threads
|
|
56
|
-
- ✅ 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`)
|
|
57
161
|
|
|
58
|
-
|
|
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
|
|
59
169
|
|
|
60
|
-
**
|
|
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.
|
|
61
171
|
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# App Password method (recommended)
|
|
65
|
-
export ATPROTO_IDENTIFIER="your-handle.bsky.social"
|
|
66
|
-
export ATPROTO_PASSWORD="your-app-password"
|
|
172
|
+
### Option 2: Authenticated Mode (For full functionality)
|
|
67
173
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
+
}
|
|
71
191
|
```
|
|
72
192
|
|
|
73
|
-
2. **Start the server
|
|
74
|
-
```bash
|
|
75
|
-
atproto-mcp
|
|
76
|
-
```
|
|
193
|
+
2. **Start your LLM client** - it will launch the authenticated MCP server
|
|
77
194
|
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
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
|
|
84
201
|
|
|
85
|
-
##
|
|
202
|
+
## Available Tools
|
|
86
203
|
|
|
87
|
-
|
|
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)
|
|
88
207
|
|
|
89
208
|
**Data Retrieval**
|
|
90
|
-
- `
|
|
91
|
-
- `get_user_profile` - Retrieve public user information and stats
|
|
92
|
-
- `get_user_profiles` - Get multiple user profiles at once
|
|
93
|
-
- `get_followers` - Get follower lists for public profiles
|
|
94
|
-
- `get_follows` - Get following lists for public profiles
|
|
95
|
-
- `get_thread` - View post threads and conversations
|
|
96
|
-
- `get_custom_feed` - Access public custom feeds
|
|
209
|
+
- `get_user_profile` - Retrieve basic user information (ENHANCED mode: works without auth, provides additional viewer-specific data when authenticated)
|
|
97
210
|
|
|
98
|
-
|
|
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
|
|
216
|
+
|
|
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)
|
|
99
220
|
|
|
100
221
|
**Social Operations**
|
|
101
222
|
- `create_post` - Create new posts with rich text support
|
|
223
|
+
- `create_rich_text_post` - Create posts with advanced formatting
|
|
102
224
|
- `reply_to_post` - Reply to existing posts with threading
|
|
103
225
|
- `like_post` / `unlike_post` - Like and unlike posts
|
|
104
226
|
- `repost` / `unrepost` - Repost content with optional quotes
|
|
105
227
|
- `follow_user` / `unfollow_user` - Follow and unfollow users
|
|
106
|
-
|
|
107
|
-
|
|
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
|
|
108
237
|
|
|
109
238
|
**Content Management**
|
|
110
239
|
- `upload_image` / `upload_video` - Upload media content
|
|
111
|
-
- `delete_post` - Remove
|
|
112
|
-
- `update_profile` - Modify
|
|
113
|
-
- `
|
|
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
|
|
114
248
|
|
|
115
249
|
**Moderation**
|
|
116
250
|
- `mute_user` / `unmute_user` - Mute and unmute users
|
|
117
251
|
- `block_user` / `unblock_user` - Block and unblock users
|
|
118
252
|
- `report_content` / `report_user` - Report content and users
|
|
119
253
|
|
|
120
|
-
**
|
|
121
|
-
- `
|
|
122
|
-
- `
|
|
123
|
-
- `
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
126
293
|
|
|
127
294
|
Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
128
295
|
|
|
@@ -132,7 +299,7 @@ Visit our [documentation site](https://cameronrye.github.io/atproto-mcp) for:
|
|
|
132
299
|
- **Examples and Tutorials**
|
|
133
300
|
- **Troubleshooting**
|
|
134
301
|
|
|
135
|
-
##
|
|
302
|
+
## Authentication (Optional)
|
|
136
303
|
|
|
137
304
|
The server works perfectly without authentication for accessing public data. Authentication is only needed for write operations and private data access.
|
|
138
305
|
|
|
@@ -150,27 +317,108 @@ export ATPROTO_CLIENT_SECRET="your-client-secret"
|
|
|
150
317
|
atproto-mcp --auth oauth
|
|
151
318
|
```
|
|
152
319
|
|
|
153
|
-
##
|
|
320
|
+
## Development
|
|
321
|
+
|
|
322
|
+
### Quick Start
|
|
154
323
|
|
|
155
324
|
```bash
|
|
156
325
|
# Clone the repository
|
|
157
326
|
git clone https://github.com/cameronrye/atproto-mcp.git
|
|
158
327
|
cd atproto-mcp
|
|
159
328
|
|
|
160
|
-
# Install dependencies
|
|
161
|
-
npm install
|
|
329
|
+
# Install dependencies (use pnpm, npm, or yarn)
|
|
330
|
+
pnpm install # or: npm install
|
|
162
331
|
|
|
163
332
|
# Start development server
|
|
164
|
-
npm run dev
|
|
333
|
+
pnpm dev # or: npm run dev
|
|
165
334
|
|
|
166
335
|
# Run tests
|
|
167
|
-
npm test
|
|
336
|
+
pnpm test # or: npm test
|
|
168
337
|
|
|
169
338
|
# Build for production
|
|
170
|
-
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
|
|
171
400
|
```
|
|
172
401
|
|
|
173
|
-
|
|
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
|
|
174
422
|
|
|
175
423
|
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
176
424
|
|
|
@@ -180,23 +428,23 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
180
428
|
4. Add tests
|
|
181
429
|
5. Submit a pull request
|
|
182
430
|
|
|
183
|
-
##
|
|
431
|
+
## License
|
|
184
432
|
|
|
185
433
|
This project is licensed under the MIT License.
|
|
186
434
|
|
|
187
|
-
##
|
|
435
|
+
## Acknowledgments
|
|
188
436
|
|
|
189
437
|
- [AT Protocol Team](https://github.com/bluesky-social/atproto) for the excellent protocol and SDK
|
|
190
438
|
- [Anthropic](https://github.com/modelcontextprotocol) for the Model Context Protocol
|
|
191
439
|
- The open source community for inspiration and contributions
|
|
192
440
|
|
|
193
|
-
##
|
|
441
|
+
## Support
|
|
194
442
|
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
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)
|
|
198
446
|
|
|
199
|
-
##
|
|
447
|
+
## Production Deployment
|
|
200
448
|
|
|
201
449
|
The AT Protocol MCP Server is production-ready with comprehensive features for enterprise deployment:
|
|
202
450
|
|
|
@@ -235,7 +483,7 @@ LOG_LEVEL=info
|
|
|
235
483
|
|
|
236
484
|
For detailed deployment instructions, see [DEPLOYMENT.md](DEPLOYMENT.md).
|
|
237
485
|
|
|
238
|
-
##
|
|
486
|
+
## Security
|
|
239
487
|
|
|
240
488
|
Security is a top priority for this project. Please review our security practices and policies:
|
|
241
489
|
|
|
@@ -275,19 +523,19 @@ Security is a top priority for this project. Please review our security practice
|
|
|
275
523
|
|
|
276
524
|
If you discover a security vulnerability, please review our [Security Policy](SECURITY.md) for responsible disclosure guidelines.
|
|
277
525
|
|
|
278
|
-
**Do not open public issues for security vulnerabilities.** Instead,
|
|
526
|
+
**Do not open public issues for security vulnerabilities.** Instead, send me a message privately.
|
|
279
527
|
|
|
280
528
|
### Security Features
|
|
281
529
|
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
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
|
|
288
536
|
|
|
289
537
|
For more details, see [SECURITY.md](SECURITY.md).
|
|
290
538
|
|
|
291
539
|
---
|
|
292
540
|
|
|
293
|
-
Made with ❤️
|
|
541
|
+
Made with ❤️ by [Cameron Rye](https://rye.dev/)
|
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;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAyB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE,QAAiB;QACvB,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,6BAA6B;KAC3C;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAiB;QACvB,KAAK,EAAE,GAAG;Q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AAK,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
|