fix(mcp): request Node types explicitly for TypeScript 6 - #8
Merged
Conversation
TypeScript 6 stopped auto-including @types/* packages from node_modules. The Node globals in src/index.ts (process.env, process.exit) therefore fail to resolve under tsc 6.0.3 even with @types/node installed: src/index.ts(6,18): error TS2591: Cannot find name 'process'. Setting "types": ["node"] restores resolution. The option has been supported since TypeScript 2.0, so this builds identically on the current 5.9.3 and unblocks the pending v6 bump in #1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks #1.
Problem
TypeScript 6 stopped auto-including
@types/*packages fromnode_modules.@types/node@25.9.5is installed, buttsc --traceResolutionunder 6.0.3 shows zero resolution attempts for it, so the Node globals insrc/index.tsfail:This is why #1 cannot merge as-is — nothing to do with the source, purely a tsconfig default that changed.
Fix
typeshas been supported since TypeScript 2.0, so this is a no-op on the current 5.9.3 and makes 6.x resolve correctly. Landing it separately keeps #1 to a clean dependency bump.Verification
npm run typechecknpm testmain)Confirmed against #1's branch locally with this change applied — typecheck goes from exit 2 to clean, and the built server still registers all 20 tools.
🤖 Generated with Claude Code