modelcontextprotocol / modelcontextprotocol/typescript-sdk

Package attaches process signal handlers

Open
#817 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug fix proposed P2 ready for work v2
Dominant language
TypeScript
Stars
13.4k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
4

Description

Describe the bug
Installing the @modelcontextprotocol/sdk package will include examples, which add signal handlers to process of application.

To Reproduce
Steps to reproduce the behavior:

  1. Install version 1.16.0 of @modelcontextprotocol/sdk
  2. Examine installed node_module folder (node_modules/@modelcontextprotocol/sdk/dist/esm/examples)
  3. Notice that examples are loaded due to exports declaration

Expected behavior
Examples should not be included in production distribution and signal handlers should not be attached

Logs
If applicable, add logs to help explain your problem.

Additional context
This causes some downstream plugins (like our webserver signal processor) to have issues. Seems like these were included unintentionally during the packaging process.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the exports declaration in package.json and compare it with the installed node_modules/@modelcontextprotocol/sdk/dist/esm/examples path. Confirm how examples enter the production package, then verify that installing @modelcontextprotocol/sdk no longer includes them or attaches their process signal handlers.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend, build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.