-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: drop express
usage in cli.ts
#890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Straightforward refactor from express to http. Tests run locally. No linter complaints.
Tested with:
mcp-typescript-sdk % npx tsx src/cli.ts server 3000
npx @modelcontextprotocol/inspector --server-url http://localhost:3000/sse --transport sse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are unit tests that use express, and in Discord you said you'd be moving that usage to devDependencies, but in this PR I think you need to update all the files in src/examples/server/
that use express as you did for cli.ts, which itself is just an example really.
I'll be able to move the package to |
Seems reasonable to do here. |
I replaced the |
Motivation and Context
As discussed on Discord:
express
is quite a bloated dependency for an SDK of this ubiquity. This PR dropsexpress
incli.ts
, a future PR will drop it from thesrc/server/auth
folder.How Has This Been Tested?
npx tsx src/cli.ts server 3000
, thennpx @modelcontextprotocol/inspector --server-url http://localhost:3000/sse
. Initialization completes successfully.Breaking Changes
no
Types of changes
Checklist
Additional context
sibling of #889.
cc @cliffhall