@agentproto/driver-mcp 0.1.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jeremy André and agentproto contributors
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.
@@ -0,0 +1,81 @@
1
+ import { DriverDefinition, DriverHandle } from '@agentproto/driver';
2
+
3
+ /**
4
+ * @agentproto/mcp — AIP-32 MCP provider specialisation.
5
+ *
6
+ * Wraps a Model Context Protocol server as a conformant provider.
7
+ * v0.1 ships the manifest shape, server-config types, argument
8
+ * mapping, and result extraction. The actual MCP client connection
9
+ * (stdio / SSE / HTTP transport, tools/list discovery, tools/call
10
+ * dispatch) integrates with `@modelcontextprotocol/sdk` and is
11
+ * provided through a host-supplied `mcpClient` factory in v0.1 —
12
+ * v0.2 will bundle the SDK directly.
13
+ *
14
+ * Spec: https://agentproto.sh/docs/aip-32
15
+ */
16
+
17
+ type McpServerConfig = {
18
+ kind: "binary";
19
+ path: string;
20
+ args?: readonly string[];
21
+ env?: Record<string, string>;
22
+ } | {
23
+ kind: "npm";
24
+ package: string;
25
+ args?: readonly string[];
26
+ env?: Record<string, string>;
27
+ } | {
28
+ kind: "docker";
29
+ image: string;
30
+ args?: readonly string[];
31
+ env?: Record<string, string>;
32
+ } | {
33
+ kind: "remote";
34
+ url: string;
35
+ };
36
+ type McpTransport = "stdio" | "sse" | "http";
37
+ /**
38
+ * Minimal client surface the MCP runtime expects. Hosts supply this
39
+ * via `mcpClientFactory`. Wraps `@modelcontextprotocol/sdk` typically.
40
+ */
41
+ interface McpClient {
42
+ callTool(args: {
43
+ name: string;
44
+ arguments: Record<string, unknown>;
45
+ }): Promise<{
46
+ content?: unknown;
47
+ structuredContent?: unknown;
48
+ isError?: boolean;
49
+ }>;
50
+ close(): Promise<void>;
51
+ }
52
+ interface McpDriverDefinition extends Omit<DriverDefinition, "kind" | "execute"> {
53
+ kind?: "mcp";
54
+ server: McpServerConfig;
55
+ transport: McpTransport;
56
+ protocolVersion?: string;
57
+ /**
58
+ * Factory that returns a connected MCP client. Hosts implement this
59
+ * with `@modelcontextprotocol/sdk`'s `Client` and the matching
60
+ * transport. v0.1 keeps this injection-shaped so the runtime
61
+ * doesn't take a hard dep on the upstream SDK.
62
+ */
63
+ mcpClientFactory: (args: {
64
+ server: McpServerConfig;
65
+ transport: McpTransport;
66
+ protocolVersion?: string;
67
+ secrets: Record<string, string>;
68
+ signal: AbortSignal;
69
+ }) => Promise<McpClient>;
70
+ }
71
+ /**
72
+ * Define an MCP provider — sugar over defineDriver with kind: mcp
73
+ * and an auto-synthesised execute map.
74
+ */
75
+ declare function defineMcpDriver(definition: McpDriverDefinition): DriverHandle;
76
+ declare class McpDriverError extends Error {
77
+ code: string;
78
+ constructor(code: string, message: string);
79
+ }
80
+
81
+ export { type McpClient, type McpDriverDefinition, McpDriverError, type McpServerConfig, type McpTransport, defineMcpDriver };
package/dist/index.mjs ADDED
@@ -0,0 +1,105 @@
1
+ import { defineDriver } from '@agentproto/driver';
2
+
3
+ /**
4
+ * @agentproto/mcp v0.1.0-alpha
5
+ * AIP-32 MCP provider specialisation.
6
+ */
7
+
8
+ function defineMcpDriver(definition) {
9
+ let clientPromise;
10
+ const getClient = async (secrets, signal) => {
11
+ if (!clientPromise) {
12
+ clientPromise = definition.mcpClientFactory({
13
+ server: definition.server,
14
+ transport: definition.transport,
15
+ protocolVersion: definition.protocolVersion,
16
+ secrets,
17
+ signal
18
+ });
19
+ }
20
+ return clientPromise;
21
+ };
22
+ const execute = {};
23
+ for (const entry of definition.implements) {
24
+ const toolId = normalizeToolId(entry.tool);
25
+ execute[toolId] = createExecuteFn({ toolId, entry, getClient });
26
+ }
27
+ return defineDriver({
28
+ ...definition,
29
+ kind: "mcp",
30
+ execute,
31
+ metadata: {
32
+ ...definition.metadata ?? {},
33
+ mcp: {
34
+ server: definition.server,
35
+ transport: definition.transport,
36
+ protocolVersion: definition.protocolVersion
37
+ }
38
+ }
39
+ });
40
+ }
41
+ function createExecuteFn(args) {
42
+ const meta = args.entry.metadata ?? {};
43
+ const mcpMeta = meta.mcp ?? { toolName: args.toolId };
44
+ const mcpToolName = mcpMeta.toolName ?? args.toolId;
45
+ return async ({ input, driverCtx, signal }) => {
46
+ const provCtx = driverCtx;
47
+ const inputObj = input ?? {};
48
+ const mappedArgs = applyArgumentMapping(inputObj, mcpMeta.argumentMapping);
49
+ const client = await args.getClient(provCtx.secrets ?? {}, signal);
50
+ const response = await client.callTool({
51
+ name: mcpToolName,
52
+ arguments: mappedArgs
53
+ });
54
+ if (response.isError) {
55
+ const msg = typeof response.content === "string" ? response.content : JSON.stringify(response.content);
56
+ throw new McpDriverError("upstream_error", msg);
57
+ }
58
+ const payload = response.structuredContent ?? response.content;
59
+ return mcpMeta.resultExtract && mcpMeta.resultExtract !== "$" ? extractPath(payload, mcpMeta.resultExtract) : payload;
60
+ };
61
+ }
62
+ var McpDriverError = class extends Error {
63
+ code;
64
+ constructor(code, message) {
65
+ super(message);
66
+ this.name = "McpDriverError";
67
+ this.code = code;
68
+ }
69
+ };
70
+ function applyArgumentMapping(input, mapping) {
71
+ if (!mapping) return input;
72
+ const out = { ...input };
73
+ for (const [contractKey, mcpKey] of Object.entries(mapping)) {
74
+ if (contractKey in input) {
75
+ out[mcpKey] = input[contractKey];
76
+ if (contractKey !== mcpKey) delete out[contractKey];
77
+ }
78
+ }
79
+ return out;
80
+ }
81
+ function extractPath(value, path) {
82
+ if (path === "$") return value;
83
+ let s = path.replace(/^\$/, "");
84
+ const re = /\.([A-Za-z_][A-Za-z0-9_]*)|\[(\d+)\]/g;
85
+ let current = value;
86
+ let match;
87
+ while ((match = re.exec(s)) !== null) {
88
+ if (current == null) return void 0;
89
+ if (match[1]) current = current[match[1]];
90
+ else if (match[2]) current = current[Number.parseInt(match[2], 10)];
91
+ }
92
+ return current;
93
+ }
94
+ function normalizeToolId(ref) {
95
+ let s = ref.trim();
96
+ if (s.startsWith("./")) s = s.slice(2);
97
+ if (s.endsWith("/TOOL.md")) s = s.slice(0, -"/TOOL.md".length);
98
+ if (s.startsWith("tools/")) s = s.slice("tools/".length);
99
+ const lastSlash = s.lastIndexOf("/");
100
+ return lastSlash === -1 ? s : s.slice(lastSlash + 1);
101
+ }
102
+
103
+ export { McpDriverError, defineMcpDriver };
104
+ //# sourceMappingURL=index.mjs.map
105
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAmEO,SAAS,gBAAgB,UAAA,EAA+C;AAG7E,EAAA,IAAI,aAAA;AACJ,EAAA,MAAM,SAAA,GAAY,OAAO,OAAA,EAAiC,MAAA,KAAwB;AAChF,IAAA,IAAI,CAAC,aAAA,EAAe;AAClB,MAAA,aAAA,GAAgB,WAAW,gBAAA,CAAiB;AAAA,QAC1C,QAAQ,UAA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AAA,CAAE,WAAW,QAAQ,CAAA,MAAO,CAAA,CAAE,KAAA,CAAM,SAAS,MAAM,CAAA;AACvD,EAAA,MAAM,SAAA,GAAY,CAAA,CAAE,WAAA,CAAY,GAAG,CAAA;AACnC,EAAA,OAAO,cAAc,EAAA,GAAK,CAAA,GAAI,CAAA,CAAE,KAAA,CAAM,YAAY,CAAC,CAAA;AACrD","file":"index.mjs","sourcesContent":["/**\n * @agentproto/mcp — AIP-32 MCP provider specialisation.\n *\n * Wraps a Model Context Protocol server as a conformant provider.\n * v0.1 ships the manifest shape, server-config types, argument\n * mapping, and result extraction. The actual MCP client connection\n * (stdio / SSE / HTTP transport, tools/list discovery, tools/call\n * dispatch) integrates with `@modelcontextprotocol/sdk` and is\n * provided through a host-supplied `mcpClient` factory in v0.1 —\n * v0.2 will bundle the SDK directly.\n *\n * Spec: https://agentproto.sh/docs/aip-32\n */\n\nimport {\n defineDriver,\n type ExecuteFn,\n type ImplementsEntry,\n type DriverDefinition,\n type DriverHandle,\n} from \"@agentproto/driver\"\n\nexport type McpServerConfig =\n | { kind: \"binary\"; path: string; args?: readonly string[]; env?: Record<string, string> }\n | { kind: \"npm\"; package: string; args?: readonly string[]; env?: Record<string, string> }\n | { kind: \"docker\"; image: string; args?: readonly string[]; env?: Record<string, string> }\n | { kind: \"remote\"; url: string }\n\nexport type McpTransport = \"stdio\" | \"sse\" | \"http\"\n\n/**\n * Minimal client surface the MCP runtime expects. Hosts supply this\n * via `mcpClientFactory`. Wraps `@modelcontextprotocol/sdk` typically.\n */\nexport interface McpClient {\n callTool(args: {\n name: string\n arguments: Record<string, unknown>\n }): Promise<{ content?: unknown; structuredContent?: unknown; isError?: boolean }>\n close(): Promise<void>\n}\n\nexport interface McpDriverDefinition\n extends Omit<DriverDefinition, \"kind\" | \"execute\"> {\n kind?: \"mcp\"\n server: McpServerConfig\n transport: McpTransport\n protocolVersion?: string\n /**\n * Factory that returns a connected MCP client. Hosts implement this\n * with `@modelcontextprotocol/sdk`'s `Client` and the matching\n * transport. v0.1 keeps this injection-shaped so the runtime\n * doesn't take a hard dep on the upstream SDK.\n */\n mcpClientFactory: (args: {\n server: McpServerConfig\n transport: McpTransport\n protocolVersion?: string\n secrets: Record<string, string>\n signal: AbortSignal\n }) => Promise<McpClient>\n}\n\n/**\n * Define an MCP provider — sugar over defineDriver with kind: mcp\n * and an auto-synthesised execute map.\n */\nexport function defineMcpDriver(definition: McpDriverDefinition): DriverHandle {\n // Lazy client per provider. v0.1 connects on first invocation;\n // host MAY pre-warm via `connectMcp(handle)` (see exports below).\n let clientPromise: Promise<McpClient> | undefined\n const getClient = async (secrets: Record<string, string>, signal: AbortSignal) => {\n if (!clientPromise) {\n clientPromise = definition.mcpClientFactory({\n server: definition.server,\n transport: definition.transport,\n protocolVersion: definition.protocolVersion,\n secrets,\n signal,\n })\n }\n return clientPromise\n }\n\n const execute: Record<string, ExecuteFn> = {}\n for (const entry of definition.implements) {\n const toolId = normalizeToolId(entry.tool)\n execute[toolId] = createExecuteFn({ toolId, entry, getClient })\n }\n\n return defineDriver({\n ...definition,\n kind: \"mcp\",\n execute,\n metadata: {\n ...(definition.metadata ?? {}),\n mcp: {\n server: definition.server,\n transport: definition.transport,\n protocolVersion: definition.protocolVersion,\n },\n },\n })\n}\n\nfunction createExecuteFn(args: {\n toolId: string\n entry: ImplementsEntry\n getClient: (\n secrets: Record<string, string>,\n signal: AbortSignal\n ) => Promise<McpClient>\n}): ExecuteFn {\n const meta = (args.entry.metadata ?? {}) as { mcp?: PerToolMcp }\n const mcpMeta = meta.mcp ?? { toolName: args.toolId }\n const mcpToolName = mcpMeta.toolName ?? args.toolId\n\n return async ({ input, driverCtx, signal }) => {\n const provCtx = driverCtx as { secrets: Record<string, string>; [k: string]: unknown }\n const inputObj = (input ?? {}) as Record<string, unknown>\n\n const mappedArgs = applyArgumentMapping(inputObj, mcpMeta.argumentMapping)\n const client = await args.getClient(provCtx.secrets ?? {}, signal)\n const response = await client.callTool({\n name: mcpToolName,\n arguments: mappedArgs,\n })\n\n if (response.isError) {\n const msg =\n typeof response.content === \"string\"\n ? response.content\n : JSON.stringify(response.content)\n throw new McpDriverError(\"upstream_error\", msg)\n }\n\n const payload = response.structuredContent ?? response.content\n return mcpMeta.resultExtract && mcpMeta.resultExtract !== \"$\"\n ? extractPath(payload, mcpMeta.resultExtract)\n : payload\n }\n}\n\ninterface PerToolMcp {\n toolName?: string\n argumentMapping?: Record<string, string>\n resultExtract?: string\n}\n\nclass McpDriverError extends Error {\n code: string\n constructor(code: string, message: string) {\n super(message)\n this.name = \"McpDriverError\"\n this.code = code\n }\n}\n\nfunction applyArgumentMapping(\n input: Record<string, unknown>,\n mapping: Record<string, string> | undefined\n): Record<string, unknown> {\n if (!mapping) return input\n const out: Record<string, unknown> = { ...input }\n for (const [contractKey, mcpKey] of Object.entries(mapping)) {\n if (contractKey in input) {\n out[mcpKey] = input[contractKey]\n if (contractKey !== mcpKey) delete out[contractKey]\n }\n }\n return out\n}\n\nfunction extractPath(value: unknown, path: string): unknown {\n if (path === \"$\") return value\n let s = path.replace(/^\\$/, \"\")\n const re = /\\.([A-Za-z_][A-Za-z0-9_]*)|\\[(\\d+)\\]/g\n let current: unknown = value\n let match: RegExpExecArray | null\n while ((match = re.exec(s)) !== null) {\n if (current == null) return undefined\n if (match[1]) current = (current as Record<string, unknown>)[match[1]]\n else if (match[2]) current = (current as unknown[])[Number.parseInt(match[2], 10)]\n }\n return current\n}\n\nfunction normalizeToolId(ref: string): string {\n let s = ref.trim()\n if (s.startsWith(\"./\")) s = s.slice(2)\n if (s.endsWith(\"/TOOL.md\")) s = s.slice(0, -\"/TOOL.md\".length)\n if (s.startsWith(\"tools/\")) s = s.slice(\"tools/\".length)\n const lastSlash = s.lastIndexOf(\"/\")\n return lastSlash === -1 ? s : s.slice(lastSlash + 1)\n}\n\nexport { McpDriverError }\n"]}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@agentproto/driver-mcp",
3
+ "version": "0.1.1",
4
+ "description": "agentproto/mcp-runtime — AIP-32 MCP provider specialisation. Sugar over @agentproto/driver for Model Context Protocol servers (stdio/SSE/HTTP transports). v0.1 ships frontmatter-driven dispatch; full MCP client wraps @modelcontextprotocol/sdk in v0.2.",
5
+ "keywords": [
6
+ "agentproto",
7
+ "aip-32",
8
+ "mcp",
9
+ "provider",
10
+ "model-context-protocol"
11
+ ],
12
+ "homepage": "https://agentproto.sh/docs/aip-32",
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "main": "dist/index.mjs",
16
+ "module": "dist/index.mjs",
17
+ "types": "dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.mjs",
22
+ "default": "./dist/index.mjs"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "dependencies": {
35
+ "@agentproto/driver": "0.1.1",
36
+ "@agentproto/tool": "0.1.1"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^25.6.2",
40
+ "tsup": "^8.5.1",
41
+ "typescript": "^5.9.3",
42
+ "vitest": "^3.2.4",
43
+ "zod": "^4.4.3",
44
+ "@agentproto/tooling": "0.1.0-alpha.0"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/agentproto/ts",
49
+ "directory": "packages/driver/mcp"
50
+ },
51
+ "scripts": {
52
+ "dev": "tsup --watch",
53
+ "build": "tsup",
54
+ "clean": "rm -rf dist",
55
+ "check-types": "tsc --noEmit",
56
+ "test": "vitest run",
57
+ "test:watch": "vitest"
58
+ }
59
+ }