The build is two-step — tsc, then tsc-alias rewrites @/* specifiers in dist/ — because tsconfig paths aliases do not exist at runtime. Node's subpath imports (package.json "imports", #-prefixed) are the native mechanism: tsc under NodeNext resolves them end-to-end, emitted JS needs no rewriting, and declaration files carry working specifiers.
Proposal
Migrate @/* to #/* via a package.json "imports" map; drop tsc-alias from the framework build and from the scaffold (templates carry the same two-step build). ~575 import sites in src/ — mechanical codemod, then the full gate run.
Scope
package.json "imports" map; remove paths from tsconfig.base.json
- Codemod across
src/ + tests/; simplify scripts/build.ts
templates/: same change for scaffolded servers
- Skills/docs that show the
@/ import convention
Out of scope
- Public
@cyanheads/mcp-ts-core/* export subpaths (unaffected)
Alternatives considered
- Keep tsc-alias: works today, but it is a build-only rewrite step plus a devDependency in the framework and every scaffolded consumer for something the platform does natively.
The build is two-step — tsc, then tsc-alias rewrites
@/*specifiers indist/— because tsconfigpathsaliases do not exist at runtime. Node's subpath imports (package.json"imports",#-prefixed) are the native mechanism: tsc under NodeNext resolves them end-to-end, emitted JS needs no rewriting, and declaration files carry working specifiers.Proposal
Migrate
@/*to#/*via apackage.json"imports"map; droptsc-aliasfrom the framework build and from the scaffold (templates carry the same two-step build). ~575 import sites insrc/— mechanical codemod, then the full gate run.Scope
package.json"imports"map; removepathsfromtsconfig.base.jsonsrc/+tests/; simplifyscripts/build.tstemplates/: same change for scaffolded servers@/import conventionOut of scope
@cyanheads/mcp-ts-core/*export subpaths (unaffected)Alternatives considered