From 255f3c2c984dbee8039a7a7e00a61d012bd8a762 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 17 Jun 2025 16:15:26 +0200 Subject: [PATCH] fix: expose ./dist/cjs/types.js in package.json exports for @modelcontextprotocol/sdk - Add "./types": "./dist/cjs/types.js" to the "exports" field in package.json. - Allows correct import of types from the MCP SDK in TypeScript projects using ts-node or internal paths. - Fixes "Cannot find module .../dist/cjs/types" error when running custom MCP servers. - Improves integration and extension of the SDK in modern Node.js environments. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b184f31..7067bafb 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "./*": { "import": "./dist/esm/*", "require": "./dist/cjs/*" - } + }, + "./types": "./dist/cjs/types.js" }, "typesVersions": { "*": {