@cookiemunch/mcp 0.7.1 → 0.8.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/dist/index.d.cts DELETED
@@ -1,52 +0,0 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { CookieMunchClient } from '@cookiemunch/sdk';
3
- import { ZodRawShape } from 'zod';
4
-
5
- /**
6
- * Tool registration for the Cookie Munch MCP server. registerTools wires the
7
- * @cookiemunch/sdk client onto an MCP server's registerTool API. It depends only
8
- * on a minimal ToolServer shape (structurally satisfied by McpServer), so the
9
- * registration logic is unit-testable against a fake server + mocked SDK client
10
- * without standing up a stdio transport.
11
- */
12
-
13
- interface ToolResult {
14
- content: Array<{
15
- type: 'text';
16
- text: string;
17
- }>;
18
- isError?: boolean;
19
- /** MCP's CallToolResult carries an open index signature; included for structural compatibility. */
20
- [key: string]: unknown;
21
- }
22
- /** The slice of McpServer.registerTool we depend on (structurally compatible). */
23
- interface ToolServer {
24
- registerTool(name: string, config: {
25
- title?: string;
26
- description: string;
27
- inputSchema?: ZodRawShape;
28
- }, handler: (args: Record<string, unknown>) => Promise<ToolResult>): unknown;
29
- }
30
- declare function registerTools(server: ToolServer, client: CookieMunchClient): void;
31
-
32
- /**
33
- * @cookiemunch/mcp — a Model Context Protocol server exposing the Cookie Munch
34
- * Developer API as MCP tools, built on @cookiemunch/sdk. The library entry exports
35
- * the tool registration (registerTools) and a server factory (createCookieMunchMcp);
36
- * the stdio bootstrap lives in bin.ts.
37
- */
38
-
39
- /** This package's version, sent in the default User-Agent (a test pins it to package.json). */
40
- declare const MCP_VERSION = "0.7.1";
41
- interface CookieMunchMcpOptions {
42
- apiKey: string;
43
- baseUrl: string;
44
- /** The `User-Agent` sent to the API. Default `cookiemunch-mcp/<version>`. */
45
- userAgent?: string;
46
- /** Inject a pre-built SDK client (e.g. for tests); otherwise one is created from apiKey/baseUrl. */
47
- client?: CookieMunchClient;
48
- }
49
- /** Build an McpServer with all Cookie Munch tools registered. Connect a transport to run it. */
50
- declare function createCookieMunchMcp(opts: CookieMunchMcpOptions): McpServer;
51
-
52
- export { type CookieMunchMcpOptions, MCP_VERSION, type ToolResult, type ToolServer, createCookieMunchMcp, registerTools };