Skip to content

Commit 255f3c2

Browse files
authored
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.
1 parent 824c1f5 commit 255f3c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"./*": {
2323
"import": "./dist/esm/*",
2424
"require": "./dist/cjs/*"
25-
}
25+
},
26+
"./types": "./dist/cjs/types.js"
2627
},
2728
"typesVersions": {
2829
"*": {

0 commit comments

Comments
 (0)