Skip to content

fix(mcp): request Node types explicitly for TypeScript 6 - #8

Merged
tobydoescode merged 1 commit into
mainfrom
fix/tsconfig-types-node
Jul 28, 2026
Merged

fix(mcp): request Node types explicitly for TypeScript 6#8
tobydoescode merged 1 commit into
mainfrom
fix/tsconfig-types-node

Conversation

@tobydoescode

Copy link
Copy Markdown
Owner

Unblocks #1.

Problem

TypeScript 6 stopped auto-including @types/* packages from node_modules. @types/node@25.9.5 is installed, but tsc --traceResolution under 6.0.3 shows zero resolution attempts for it, so the Node globals in src/index.ts fail:

src/index.ts(6,18): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node?
src/index.ts(7,15): error TS2591: Cannot find name 'process'.
src/index.ts(11,3): error TS2591: Cannot find name 'process'.
src/index.ts(317,3): error TS2591: Cannot find name 'process'.

This is why #1 cannot merge as-is — nothing to do with the source, purely a tsconfig default that changed.

Fix

"types": ["node"]

types has 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

Toolchain npm run typecheck npm test
5.9.3 (current main) pass 21/21
6.0.3 (branch of #1) pass 21/21

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

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>
@tobydoescode
tobydoescode merged commit b17300e into main Jul 28, 2026
2 checks passed
@tobydoescode
tobydoescode deleted the fix/tsconfig-types-node branch July 28, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant