atproto-mcp 0.1.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/LICENSE +22 -0
- package/README.md +293 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +261 -0
- package/dist/cli.js.map +1 -0
- package/dist/health-check.d.ts +7 -0
- package/dist/health-check.d.ts.map +1 -0
- package/dist/health-check.js +57 -0
- package/dist/health-check.js.map +1 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +612 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +77 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +186 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +75 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +218 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/test/setup.d.ts +78 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +138 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/tools/implementations/advanced-social-tools.d.ts +250 -0
- package/dist/tools/implementations/advanced-social-tools.d.ts.map +1 -0
- package/dist/tools/implementations/advanced-social-tools.js +380 -0
- package/dist/tools/implementations/advanced-social-tools.js.map +1 -0
- package/dist/tools/implementations/base-tool.d.ts +73 -0
- package/dist/tools/implementations/base-tool.d.ts.map +1 -0
- package/dist/tools/implementations/base-tool.js +225 -0
- package/dist/tools/implementations/base-tool.js.map +1 -0
- package/dist/tools/implementations/content-management-tools.d.ts +81 -0
- package/dist/tools/implementations/content-management-tools.d.ts.map +1 -0
- package/dist/tools/implementations/content-management-tools.js +236 -0
- package/dist/tools/implementations/content-management-tools.js.map +1 -0
- package/dist/tools/implementations/create-post-tool.d.ts +131 -0
- package/dist/tools/implementations/create-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/create-post-tool.js +182 -0
- package/dist/tools/implementations/create-post-tool.js.map +1 -0
- package/dist/tools/implementations/follow-user-tool.d.ts +69 -0
- package/dist/tools/implementations/follow-user-tool.d.ts.map +1 -0
- package/dist/tools/implementations/follow-user-tool.js +200 -0
- package/dist/tools/implementations/follow-user-tool.js.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts +61 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.js +139 -0
- package/dist/tools/implementations/get-user-profile-tool.js.map +1 -0
- package/dist/tools/implementations/index.d.ts +22 -0
- package/dist/tools/implementations/index.d.ts.map +1 -0
- package/dist/tools/implementations/index.js +32 -0
- package/dist/tools/implementations/index.js.map +1 -0
- package/dist/tools/implementations/like-post-tool.d.ts +68 -0
- package/dist/tools/implementations/like-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/like-post-tool.js +184 -0
- package/dist/tools/implementations/like-post-tool.js.map +1 -0
- package/dist/tools/implementations/media-tools.d.ts +360 -0
- package/dist/tools/implementations/media-tools.d.ts.map +1 -0
- package/dist/tools/implementations/media-tools.js +444 -0
- package/dist/tools/implementations/media-tools.js.map +1 -0
- package/dist/tools/implementations/moderation-tools.d.ts +189 -0
- package/dist/tools/implementations/moderation-tools.d.ts.map +1 -0
- package/dist/tools/implementations/moderation-tools.js +289 -0
- package/dist/tools/implementations/moderation-tools.js.map +1 -0
- package/dist/tools/implementations/oauth-tools.d.ts +108 -0
- package/dist/tools/implementations/oauth-tools.d.ts.map +1 -0
- package/dist/tools/implementations/oauth-tools.js +183 -0
- package/dist/tools/implementations/oauth-tools.js.map +1 -0
- package/dist/tools/implementations/reply-to-post-tool.d.ts +52 -0
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/reply-to-post-tool.js +167 -0
- package/dist/tools/implementations/reply-to-post-tool.js.map +1 -0
- package/dist/tools/implementations/repost-tool.d.ts +76 -0
- package/dist/tools/implementations/repost-tool.d.ts.map +1 -0
- package/dist/tools/implementations/repost-tool.js +181 -0
- package/dist/tools/implementations/repost-tool.js.map +1 -0
- package/dist/tools/implementations/search-posts-tool.d.ts +95 -0
- package/dist/tools/implementations/search-posts-tool.d.ts.map +1 -0
- package/dist/tools/implementations/search-posts-tool.js +208 -0
- package/dist/tools/implementations/search-posts-tool.js.map +1 -0
- package/dist/tools/implementations/social-graph-tools.d.ts +119 -0
- package/dist/tools/implementations/social-graph-tools.d.ts.map +1 -0
- package/dist/tools/implementations/social-graph-tools.js +262 -0
- package/dist/tools/implementations/social-graph-tools.js.map +1 -0
- package/dist/tools/implementations/streaming-tools.d.ts +130 -0
- package/dist/tools/implementations/streaming-tools.d.ts.map +1 -0
- package/dist/tools/implementations/streaming-tools.js +241 -0
- package/dist/tools/implementations/streaming-tools.js.map +1 -0
- package/dist/tools/implementations/timeline-tools.d.ts +69 -0
- package/dist/tools/implementations/timeline-tools.d.ts.map +1 -0
- package/dist/tools/implementations/timeline-tools.js +194 -0
- package/dist/tools/implementations/timeline-tools.js.map +1 -0
- package/dist/tools/index.d.ts +23 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +73 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.d.ts +242 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +73 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/atp-client.d.ts +109 -0
- package/dist/utils/atp-client.d.ts.map +1 -0
- package/dist/utils/atp-client.js +451 -0
- package/dist/utils/atp-client.js.map +1 -0
- package/dist/utils/config.d.ts +74 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +311 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/firehose-client.d.ts +96 -0
- package/dist/utils/firehose-client.d.ts.map +1 -0
- package/dist/utils/firehose-client.js +252 -0
- package/dist/utils/firehose-client.js.map +1 -0
- package/dist/utils/logger.d.ts +74 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +142 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/oauth-client.d.ts +61 -0
- package/dist/utils/oauth-client.d.ts.map +1 -0
- package/dist/utils/oauth-client.js +224 -0
- package/dist/utils/oauth-client.js.map +1 -0
- package/dist/utils/performance.d.ts +102 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/performance.js +302 -0
- package/dist/utils/performance.js.map +1 -0
- package/dist/utils/security.d.ts +154 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +358 -0
- package/dist/utils/security.js.map +1 -0
- package/package.json +93 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AT Protocol MCP Server
|
|
4
|
+
*
|
|
5
|
+
* A comprehensive Model Context Protocol server that provides LLMs with direct access
|
|
6
|
+
* to the AT Protocol ecosystem, enabling seamless interaction with Bluesky and other
|
|
7
|
+
* AT Protocol-based social networks.
|
|
8
|
+
*/
|
|
9
|
+
import { type IMcpServerConfig } from './types/index.js';
|
|
10
|
+
import { AtpClient } from './utils/atp-client.js';
|
|
11
|
+
import { ConfigManager } from './utils/config.js';
|
|
12
|
+
import { ConnectionPool, type IPerformanceMetrics, LRUCache, WebSocketManager } from './utils/performance.js';
|
|
13
|
+
import { SecurityManager } from './utils/security.js';
|
|
14
|
+
/**
|
|
15
|
+
* Main server class for AT Protocol MCP Server
|
|
16
|
+
*/
|
|
17
|
+
export declare class AtpMcpServer {
|
|
18
|
+
private server;
|
|
19
|
+
private atpClient;
|
|
20
|
+
private logger;
|
|
21
|
+
private configManager;
|
|
22
|
+
private connectionPool;
|
|
23
|
+
private cache;
|
|
24
|
+
private wsManager;
|
|
25
|
+
private performanceMonitor;
|
|
26
|
+
private securityManager;
|
|
27
|
+
private metricsInterval?;
|
|
28
|
+
private transport;
|
|
29
|
+
private isRunning;
|
|
30
|
+
constructor(configOverrides?: Partial<IMcpServerConfig>);
|
|
31
|
+
/**
|
|
32
|
+
* Set up the MCP server with basic handlers
|
|
33
|
+
* Register tools, resources, and prompts with the MCP server
|
|
34
|
+
*/
|
|
35
|
+
private setupServer;
|
|
36
|
+
/**
|
|
37
|
+
* Set up basic MCP protocol handlers
|
|
38
|
+
*/
|
|
39
|
+
private setupBasicHandlers;
|
|
40
|
+
/**
|
|
41
|
+
* Register MCP tools with the server
|
|
42
|
+
*/
|
|
43
|
+
private registerTools;
|
|
44
|
+
/**
|
|
45
|
+
* Register MCP resources with the server
|
|
46
|
+
*/
|
|
47
|
+
private registerResources;
|
|
48
|
+
/**
|
|
49
|
+
* Register MCP prompts with the server
|
|
50
|
+
*/
|
|
51
|
+
private registerPrompts;
|
|
52
|
+
/**
|
|
53
|
+
* Convert Zod schema to JSON Schema for MCP compatibility
|
|
54
|
+
*/
|
|
55
|
+
private zodToJsonSchema;
|
|
56
|
+
/**
|
|
57
|
+
* Start the MCP server
|
|
58
|
+
*/
|
|
59
|
+
start(): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Stop the MCP server
|
|
62
|
+
*/
|
|
63
|
+
stop(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Cleanup server resources
|
|
66
|
+
*/
|
|
67
|
+
private cleanup;
|
|
68
|
+
/**
|
|
69
|
+
* Get server status
|
|
70
|
+
*/
|
|
71
|
+
getStatus(): {
|
|
72
|
+
isRunning: boolean;
|
|
73
|
+
isAuthenticated: boolean;
|
|
74
|
+
authMode: 'unauthenticated' | 'app-password' | 'oauth';
|
|
75
|
+
hasAuthentication: boolean;
|
|
76
|
+
config: IMcpServerConfig;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Get AT Protocol client instance
|
|
80
|
+
*/
|
|
81
|
+
getAtpClient(): AtpClient;
|
|
82
|
+
/**
|
|
83
|
+
* Get configuration manager
|
|
84
|
+
*/
|
|
85
|
+
getConfigManager(): ConfigManager;
|
|
86
|
+
/**
|
|
87
|
+
* Get performance metrics
|
|
88
|
+
*/
|
|
89
|
+
getPerformanceMetrics(): IPerformanceMetrics;
|
|
90
|
+
/**
|
|
91
|
+
* Get cache instance for external use
|
|
92
|
+
*/
|
|
93
|
+
getCache(): LRUCache<unknown>;
|
|
94
|
+
/**
|
|
95
|
+
* Get connection pool instance for external use
|
|
96
|
+
*/
|
|
97
|
+
getConnectionPool(): ConnectionPool;
|
|
98
|
+
/**
|
|
99
|
+
* Get WebSocket manager instance for external use
|
|
100
|
+
*/
|
|
101
|
+
getWebSocketManager(): WebSocketManager;
|
|
102
|
+
/**
|
|
103
|
+
* Get security manager instance for external use
|
|
104
|
+
*/
|
|
105
|
+
getSecurityManager(): SecurityManager;
|
|
106
|
+
/**
|
|
107
|
+
* Get comprehensive system metrics including performance and security
|
|
108
|
+
*/
|
|
109
|
+
getSystemMetrics(): {
|
|
110
|
+
performance: IPerformanceMetrics;
|
|
111
|
+
security: Record<string, unknown>;
|
|
112
|
+
server: {
|
|
113
|
+
isRunning: boolean;
|
|
114
|
+
isAuthenticated: boolean;
|
|
115
|
+
authMode: 'unauthenticated' | 'app-password' | 'oauth';
|
|
116
|
+
hasAuthentication: boolean;
|
|
117
|
+
config: IMcpServerConfig;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export default AtpMcpServer;
|
|
122
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAKH,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,KAAK,mBAAmB,EACxB,QAAQ,EAER,gBAAgB,EACjB,MAAM,wBAA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