@jalpp/mcp-adapter 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 +21 -0
- package/README.md +90 -0
- package/dist/index.d.mts +95 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.js +58 -0
- package/dist/index.mjs +30 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jalpp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# mcp-adapter
|
|
2
|
+
|
|
3
|
+
Lightweight adapter utilities for registering tools on an [MCP](https://modelcontextprotocol.io) server with full TypeScript type safety.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install mcp-adapter
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
> **Peer dependency:** `@modelcontextprotocol/sdk >= 1.0.0` must be installed in your project.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### `toolAdapter`
|
|
16
|
+
|
|
17
|
+
Registers a typed tool on an `McpServer`. Input schema types flow through to the callback automatically — no manual type annotations needed.
|
|
18
|
+
|
|
19
|
+
**With input schema:**
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { toolAdapter, toolContentAdapter } from "mcp-adapter";
|
|
23
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
24
|
+
import z from "zod";
|
|
25
|
+
|
|
26
|
+
const server = new McpServer({ name: "my-server", version: "1.0.0" });
|
|
27
|
+
|
|
28
|
+
toolAdapter(server, {
|
|
29
|
+
name: "get-analysis",
|
|
30
|
+
config: {
|
|
31
|
+
description: "Analyze a chess position",
|
|
32
|
+
inputSchema: {
|
|
33
|
+
fen: z.string().describe("FEN string"),
|
|
34
|
+
depth: z.number().min(1).max(20),
|
|
35
|
+
},
|
|
36
|
+
annotations: { openWorldHint: true },
|
|
37
|
+
},
|
|
38
|
+
cb: async ({ fen, depth }) => {
|
|
39
|
+
const { data, error } = await myService.analyze(fen, depth);
|
|
40
|
+
return toolContentAdapter(data ?? {}, error);
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Without input schema:**
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
toolAdapter(server, {
|
|
49
|
+
name: "get-status",
|
|
50
|
+
config: {
|
|
51
|
+
description: "Returns current server status",
|
|
52
|
+
},
|
|
53
|
+
cb: async () => {
|
|
54
|
+
const { data, error } = await myService.getStatus();
|
|
55
|
+
return toolContentAdapter(data ?? {}, error);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### `toolContentAdapter`
|
|
61
|
+
|
|
62
|
+
Normalizes a service result into a `CallToolResult`. If `error` is defined it takes priority; otherwise `data` is pretty-printed as JSON.
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import { toolContentAdapter } from "mcp-adapter";
|
|
66
|
+
|
|
67
|
+
return toolContentAdapter(data ?? {}, error);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Argument | Type | Description |
|
|
71
|
+
|----------|------|-------------|
|
|
72
|
+
| `data` | `object` | Successful result payload |
|
|
73
|
+
| `error` | `string \| undefined` | Error message — takes priority over `data` |
|
|
74
|
+
|
|
75
|
+
## API
|
|
76
|
+
|
|
77
|
+
### `toolAdapter(server, adapter)`
|
|
78
|
+
|
|
79
|
+
| Overload | Description |
|
|
80
|
+
|----------|-------------|
|
|
81
|
+
| `toolAdapter<T>(server, ToolInputAdapterWithSchema<T>)` | Tool with typed input schema |
|
|
82
|
+
| `toolAdapter(server, ToolInputAdapterWithoutSchema)` | Tool with no input arguments |
|
|
83
|
+
|
|
84
|
+
### `toolContentAdapter(data, error)`
|
|
85
|
+
|
|
86
|
+
Returns a `CallToolResult` with a single `text` content block.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { McpServer, ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ZodRawShapeCompat } from '@modelcontextprotocol/sdk/server/zod-compat.js';
|
|
3
|
+
import { ToolAnnotations, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter input for registering a tool that declares an input schema.
|
|
7
|
+
* The generic parameter `T` is inferred from the `inputSchema` shape and
|
|
8
|
+
* flows through to `cb`, ensuring the callback receives correctly-typed args.
|
|
9
|
+
*
|
|
10
|
+
* @template T - A Zod raw shape (e.g. `{ fen: z.ZodString }`) that defines the tool's input.
|
|
11
|
+
*/
|
|
12
|
+
interface ToolInputAdapterWithSchema<T extends ZodRawShapeCompat> {
|
|
13
|
+
/** Unique tool name used to identify the tool in the MCP registry. */
|
|
14
|
+
name: string;
|
|
15
|
+
config: {
|
|
16
|
+
/** Optional human-readable display title. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Description of what the tool does, shown to the model. */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Zod shape defining the tool's input arguments. */
|
|
21
|
+
inputSchema: T;
|
|
22
|
+
/** Optional Zod shape defining the tool's structured output. */
|
|
23
|
+
outputSchema?: ZodRawShapeCompat;
|
|
24
|
+
/** Behavioural hints for the model (e.g. `openWorldHint`, `readOnlyHint`). */
|
|
25
|
+
annotations?: ToolAnnotations;
|
|
26
|
+
/** Arbitrary metadata attached to the tool registration. */
|
|
27
|
+
_meta?: Record<string, unknown>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Tool handler callback. Receives parsed, type-safe args derived from `inputSchema`
|
|
31
|
+
* plus a `RequestHandlerExtra` context object.
|
|
32
|
+
*/
|
|
33
|
+
cb: ToolCallback<T>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Adapter input for registering a tool that takes no input arguments.
|
|
37
|
+
* The callback receives only the `RequestHandlerExtra` context object.
|
|
38
|
+
*/
|
|
39
|
+
interface ToolInputAdapterWithoutSchema {
|
|
40
|
+
/** Unique tool name used to identify the tool in the MCP registry. */
|
|
41
|
+
name: string;
|
|
42
|
+
config: {
|
|
43
|
+
/** Optional human-readable display title. */
|
|
44
|
+
title?: string;
|
|
45
|
+
/** Description of what the tool does, shown to the model. */
|
|
46
|
+
description?: string;
|
|
47
|
+
inputSchema?: undefined;
|
|
48
|
+
/** Optional Zod shape defining the tool's structured output. */
|
|
49
|
+
outputSchema?: ZodRawShapeCompat;
|
|
50
|
+
/** Behavioural hints for the model (e.g. `openWorldHint`, `readOnlyHint`). */
|
|
51
|
+
annotations?: ToolAnnotations;
|
|
52
|
+
/** Arbitrary metadata attached to the tool registration. */
|
|
53
|
+
_meta?: Record<string, unknown>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Tool handler callback. Receives only a `RequestHandlerExtra` context object
|
|
57
|
+
* since no input schema is defined.
|
|
58
|
+
*/
|
|
59
|
+
cb: ToolCallback<undefined>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Normalizes a tool result into a standard `CallToolResult` text content block.
|
|
63
|
+
*
|
|
64
|
+
* If `error` is provided it is used as the text content; otherwise `data` is
|
|
65
|
+
* serialized to a pretty-printed JSON string.
|
|
66
|
+
*
|
|
67
|
+
* @param data - The successful result payload. Used when `error` is absent.
|
|
68
|
+
* @param error - An error message string. Takes priority over `data` when present.
|
|
69
|
+
* @returns A `CallToolResult` with a single `text` content block.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* const { data, error } = await service.getData();
|
|
73
|
+
* return toolContentAdapter(data ?? {}, error);
|
|
74
|
+
*/
|
|
75
|
+
declare function toolContentAdapter(data: object, error: string | undefined): CallToolResult;
|
|
76
|
+
/**
|
|
77
|
+
* Registers a tool that declares an input schema on an MCP server.
|
|
78
|
+
*
|
|
79
|
+
* The generic `T` is inferred from `toolInputAdapter.config.inputSchema`, making
|
|
80
|
+
* the callback args fully type-safe without manual annotation.
|
|
81
|
+
*
|
|
82
|
+
* @template T - Zod raw shape inferred from the provided `inputSchema`.
|
|
83
|
+
* @param server - The `McpServer` instance to register the tool on.
|
|
84
|
+
* @param toolInputAdapter - Adapter object containing the tool name, config, and typed callback.
|
|
85
|
+
*/
|
|
86
|
+
declare function toolAdapter<T extends ZodRawShapeCompat>(server: McpServer, toolInputAdapter: ToolInputAdapterWithSchema<T>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Registers a tool that takes no input arguments on an MCP server.
|
|
89
|
+
*
|
|
90
|
+
* @param server - The `McpServer` instance to register the tool on.
|
|
91
|
+
* @param toolInputAdapter - Adapter object containing the tool name, config, and no-arg callback.
|
|
92
|
+
*/
|
|
93
|
+
declare function toolAdapter(server: McpServer, toolInputAdapter: ToolInputAdapterWithoutSchema): void;
|
|
94
|
+
|
|
95
|
+
export { toolAdapter, toolContentAdapter };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { McpServer, ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ZodRawShapeCompat } from '@modelcontextprotocol/sdk/server/zod-compat.js';
|
|
3
|
+
import { ToolAnnotations, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter input for registering a tool that declares an input schema.
|
|
7
|
+
* The generic parameter `T` is inferred from the `inputSchema` shape and
|
|
8
|
+
* flows through to `cb`, ensuring the callback receives correctly-typed args.
|
|
9
|
+
*
|
|
10
|
+
* @template T - A Zod raw shape (e.g. `{ fen: z.ZodString }`) that defines the tool's input.
|
|
11
|
+
*/
|
|
12
|
+
interface ToolInputAdapterWithSchema<T extends ZodRawShapeCompat> {
|
|
13
|
+
/** Unique tool name used to identify the tool in the MCP registry. */
|
|
14
|
+
name: string;
|
|
15
|
+
config: {
|
|
16
|
+
/** Optional human-readable display title. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Description of what the tool does, shown to the model. */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Zod shape defining the tool's input arguments. */
|
|
21
|
+
inputSchema: T;
|
|
22
|
+
/** Optional Zod shape defining the tool's structured output. */
|
|
23
|
+
outputSchema?: ZodRawShapeCompat;
|
|
24
|
+
/** Behavioural hints for the model (e.g. `openWorldHint`, `readOnlyHint`). */
|
|
25
|
+
annotations?: ToolAnnotations;
|
|
26
|
+
/** Arbitrary metadata attached to the tool registration. */
|
|
27
|
+
_meta?: Record<string, unknown>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Tool handler callback. Receives parsed, type-safe args derived from `inputSchema`
|
|
31
|
+
* plus a `RequestHandlerExtra` context object.
|
|
32
|
+
*/
|
|
33
|
+
cb: ToolCallback<T>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Adapter input for registering a tool that takes no input arguments.
|
|
37
|
+
* The callback receives only the `RequestHandlerExtra` context object.
|
|
38
|
+
*/
|
|
39
|
+
interface ToolInputAdapterWithoutSchema {
|
|
40
|
+
/** Unique tool name used to identify the tool in the MCP registry. */
|
|
41
|
+
name: string;
|
|
42
|
+
config: {
|
|
43
|
+
/** Optional human-readable display title. */
|
|
44
|
+
title?: string;
|
|
45
|
+
/** Description of what the tool does, shown to the model. */
|
|
46
|
+
description?: string;
|
|
47
|
+
inputSchema?: undefined;
|
|
48
|
+
/** Optional Zod shape defining the tool's structured output. */
|
|
49
|
+
outputSchema?: ZodRawShapeCompat;
|
|
50
|
+
/** Behavioural hints for the model (e.g. `openWorldHint`, `readOnlyHint`). */
|
|
51
|
+
annotations?: ToolAnnotations;
|
|
52
|
+
/** Arbitrary metadata attached to the tool registration. */
|
|
53
|
+
_meta?: Record<string, unknown>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Tool handler callback. Receives only a `RequestHandlerExtra` context object
|
|
57
|
+
* since no input schema is defined.
|
|
58
|
+
*/
|
|
59
|
+
cb: ToolCallback<undefined>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Normalizes a tool result into a standard `CallToolResult` text content block.
|
|
63
|
+
*
|
|
64
|
+
* If `error` is provided it is used as the text content; otherwise `data` is
|
|
65
|
+
* serialized to a pretty-printed JSON string.
|
|
66
|
+
*
|
|
67
|
+
* @param data - The successful result payload. Used when `error` is absent.
|
|
68
|
+
* @param error - An error message string. Takes priority over `data` when present.
|
|
69
|
+
* @returns A `CallToolResult` with a single `text` content block.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* const { data, error } = await service.getData();
|
|
73
|
+
* return toolContentAdapter(data ?? {}, error);
|
|
74
|
+
*/
|
|
75
|
+
declare function toolContentAdapter(data: object, error: string | undefined): CallToolResult;
|
|
76
|
+
/**
|
|
77
|
+
* Registers a tool that declares an input schema on an MCP server.
|
|
78
|
+
*
|
|
79
|
+
* The generic `T` is inferred from `toolInputAdapter.config.inputSchema`, making
|
|
80
|
+
* the callback args fully type-safe without manual annotation.
|
|
81
|
+
*
|
|
82
|
+
* @template T - Zod raw shape inferred from the provided `inputSchema`.
|
|
83
|
+
* @param server - The `McpServer` instance to register the tool on.
|
|
84
|
+
* @param toolInputAdapter - Adapter object containing the tool name, config, and typed callback.
|
|
85
|
+
*/
|
|
86
|
+
declare function toolAdapter<T extends ZodRawShapeCompat>(server: McpServer, toolInputAdapter: ToolInputAdapterWithSchema<T>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Registers a tool that takes no input arguments on an MCP server.
|
|
89
|
+
*
|
|
90
|
+
* @param server - The `McpServer` instance to register the tool on.
|
|
91
|
+
* @param toolInputAdapter - Adapter object containing the tool name, config, and no-arg callback.
|
|
92
|
+
*/
|
|
93
|
+
declare function toolAdapter(server: McpServer, toolInputAdapter: ToolInputAdapterWithoutSchema): void;
|
|
94
|
+
|
|
95
|
+
export { toolAdapter, toolContentAdapter };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
toolAdapter: () => toolAdapter,
|
|
24
|
+
toolContentAdapter: () => toolContentAdapter
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/toolAdapter.ts
|
|
29
|
+
function toolContentAdapter(data, error) {
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: "text",
|
|
34
|
+
text: error || JSON.stringify(data, null, 2)
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function toolAdapter(server, toolInputAdapter) {
|
|
40
|
+
if (toolInputAdapter.config.inputSchema) {
|
|
41
|
+
server.registerTool(
|
|
42
|
+
toolInputAdapter.name,
|
|
43
|
+
toolInputAdapter.config,
|
|
44
|
+
toolInputAdapter.cb
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
server.registerTool(
|
|
48
|
+
toolInputAdapter.name,
|
|
49
|
+
toolInputAdapter.config,
|
|
50
|
+
toolInputAdapter.cb
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
toolAdapter,
|
|
57
|
+
toolContentAdapter
|
|
58
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/toolAdapter.ts
|
|
2
|
+
function toolContentAdapter(data, error) {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: "text",
|
|
7
|
+
text: error || JSON.stringify(data, null, 2)
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function toolAdapter(server, toolInputAdapter) {
|
|
13
|
+
if (toolInputAdapter.config.inputSchema) {
|
|
14
|
+
server.registerTool(
|
|
15
|
+
toolInputAdapter.name,
|
|
16
|
+
toolInputAdapter.config,
|
|
17
|
+
toolInputAdapter.cb
|
|
18
|
+
);
|
|
19
|
+
} else {
|
|
20
|
+
server.registerTool(
|
|
21
|
+
toolInputAdapter.name,
|
|
22
|
+
toolInputAdapter.config,
|
|
23
|
+
toolInputAdapter.cb
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
toolAdapter,
|
|
29
|
+
toolContentAdapter
|
|
30
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jalpp/mcp-adapter",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Adapter utilities for registering MCP tools",
|
|
5
|
+
"author": "jalpp",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/jalpp/mcp-adapter.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsup",
|
|
25
|
+
"dev": "tsup --watch",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@modelcontextprotocol/sdk": ">=1.0.0",
|
|
30
|
+
"zod": ">=3.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": ">=1.0.0",
|
|
34
|
+
"zod": ">=3.0.0",
|
|
35
|
+
"typescript": "^5.0.0",
|
|
36
|
+
"tsup": "^8.0.0",
|
|
37
|
+
"@types/node": "^20.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|