Repository navigation
refactor: collapse SDK HTTP templates and deprecate --template - #42
Merged
Merged
Conversation
SDK v2 made the stateless and stateful HTTP templates generate identical projects, and with FastMCP gone nothing else gives --template meaning. - Rename sdk/stateless/ to sdk/http/, move auth.ts and its tests there, fold in the OAuth template tests, and delete the sdk/stateful/ shim - Deprecate --template: hidden from --help, prints a warning, no effect. --stdio --template=stateful now warns instead of erroring - Refresh template dependencies (all minor/patch) - Keep the >=22.19.0 engine floor and document why - Exclude README.md and AGENTS.md from Prettier Closes #26 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
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.
Closes #26.
#26 was written while FastMCP still gave
--templatea real meaning. With FastMCP removed in 0.10.0, the flag is dead for every project, so this goes further than the issue's SDK-only options.Changes
1. Collapse the HTTP templates.
sdk/stateless/→sdk/http/;auth.ts+auth.test.tsmove in; the OAuth index/readme tests fromstateful/templates.test.tsare folded intohttp/templates.test.ts; thesdk/stateful/shim is deleted. The stateful "convergence" tests are gone with it — there is nothing left to compare. Generated output is unchanged.2. Deprecate
--template(option b). Still parsed, so existing scripts keep working, but hidden from--help; passing it prints a warning and has no effect.template/TemplateTypeare removed fromCLIOptions. One behaviour change:--stdio --template=statefulused to exit with an error and now only warns, since the flag no longer means anything. Not removed outright because 0.10.0 just told users it was "accepted for compatibility" — removal belongs in a later breaking release.3. Template deps. The bumps listed in the issue (TypeScript 7 etc.) had already landed. This refreshes what is newer now via
npm run update-template-deps: the@modelcontextprotocol/*packages, hono, dotenv, vitest,@types/node. All minor/patch, no[MAJOR]flags.4. Node engine floor. Kept at
>=22.19.0(inspector). vitest 5 needs^22.12.0anyway and Node 20 is EOL, so dropping the inspector would buy nothing. Only the comment and AGENTS.md change.Also:
README.mdandAGENTS.mdadded to.prettierignore(their compact tables and*emphasis*are hand-formatted; CI'sformat:checkonly coverssrc/).Testing
npm run build,npm run lint,npm test(404 passing)npm install,npm run build,vitestpass in each (9/9)/healthOK,initialize+tools/listover/mcpreturn the three notes toolsnpm run inspect:toolslists the same tools.agents/skills/tool-design/--stdio --template=statefulprints the deprecation warning and generates🤖 Generated with Claude Code