@dimcool/mcp 0.1.29 → 0.1.31

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.
@@ -0,0 +1,31 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { DimAgentClient, DimAgentClientConfig } from '@dimcool/dim-agent-core';
3
+
4
+ /** Options controlling which tools are registered. */
5
+ interface DimMcpServerOptions {
6
+ /**
7
+ * 'local' — all tools, WS-backed game_loop included (default).
8
+ * 'hosted' — stateless HTTP-only tools; dim_game_loop and
9
+ * dim_get_pending_events are excluded.
10
+ */
11
+ mode?: 'local' | 'hosted';
12
+ }
13
+ /**
14
+ * Create a hosted MCP server from a pre-built DimAgentClient.
15
+ * Excludes WS-dependent tools (dim_game_loop, dim_get_pending_events).
16
+ * Returns only the McpServer — the caller owns the client lifecycle.
17
+ */
18
+ declare function createDimMcpServer(client: DimAgentClient, options: DimMcpServerOptions & {
19
+ mode: 'hosted';
20
+ }): McpServer;
21
+ /**
22
+ * Create a local (stdio) MCP server from a config object.
23
+ * All tools are registered including dim_game_loop.
24
+ * Returns both the McpServer and the DimAgentClient it created.
25
+ */
26
+ declare function createDimMcpServer(config: DimAgentClientConfig): {
27
+ server: McpServer;
28
+ client: DimAgentClient;
29
+ };
30
+
31
+ export { type DimMcpServerOptions, createDimMcpServer };