You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current SDK is incompatible with "commonjs" packages, such as using @modelcontextprotocol/sdk in Nest.js.
Describe the solution you'd like
@modelcontextprotocol/sdk should be compatible with both ESModules and CommonJS.
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered:
This can be worked around by using dynamic import() at runtime. ESM is the way the ecosystem is trending, so we'd prefer to avoid maintaining CJS if possible.
Dynamic import does not work when the tsconfig.module is set to commonjs in TypeScript, since "await import" is compiled into "require". It would be highly beneficial to have the build file support both "CJS" and "ESM," similar to packages like anthropic-sdk-typescript.
Is your feature request related to a problem? Please describe.
The current SDK is incompatible with "commonjs" packages, such as using @modelcontextprotocol/sdk in Nest.js.
Describe the solution you'd like
@modelcontextprotocol/sdk should be compatible with both ESModules and CommonJS.
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: