Describe the bug
A clear and concise description of what the bug is.
I'm attempting to implement one of the server examples: jsonResponseStreamableHttp. I've copied the server into my project, but whenever I attempt to start the server I get an ERR_MODULE_NOT_FOUND looking for StreamableHTTPServerTransport in streamableHttp.js. I'm currently working with version 1.9.0. I had a look into the contents of the package in my node_modules folder, but wasn't able to find a reference to jsonResponseStreamableHttp.
To Reproduce
Steps to reproduce the behavior:
- Copy file contents locally
- Attempt to start server with node filename
- See error
Expected behavior
A clear and concise description of what you expected to happen.
I expected the server to start up and print its logging statements into the terminal.
Logs
If applicable, add logs to help explain your problem.
ndywooten@Andys-MacBook-Pro mcp-test % node debug-mcp-server.js
node:internal/modules/esm/resolve:275
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/andywooten/code/mcp-test/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js' imported from /Users/andywooten/code/mcp-test/debug-mcp-server.js
at finalizeResolution (node:internal/modules/esm/resolve:275:11)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1056:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:654:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:603:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:586:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:38)
at ModuleJob._link (node:internal/modules/esm/module_job:135:49) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///Users/andywooten/code/mcp-test/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js'
}
Describe the bug
A clear and concise description of what the bug is.
I'm attempting to implement one of the server examples: jsonResponseStreamableHttp. I've copied the server into my project, but whenever I attempt to start the server I get an ERR_MODULE_NOT_FOUND looking for StreamableHTTPServerTransport in streamableHttp.js. I'm currently working with version 1.9.0. I had a look into the contents of the package in my node_modules folder, but wasn't able to find a reference to jsonResponseStreamableHttp.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
I expected the server to start up and print its logging statements into the terminal.
Logs
If applicable, add logs to help explain your problem.
ndywooten@Andys-MacBook-Pro mcp-test % node debug-mcp-server.js
node:internal/modules/esm/resolve:275
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/andywooten/code/mcp-test/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js' imported from /Users/andywooten/code/mcp-test/debug-mcp-server.js
at finalizeResolution (node:internal/modules/esm/resolve:275:11)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1056:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:654:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:603:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:586:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:38)
at ModuleJob._link (node:internal/modules/esm/module_job:135:49) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///Users/andywooten/code/mcp-test/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js'
}