Skip to content
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

NPM Packaging #295

Open
calclavia opened this issue Dec 10, 2024 · 1 comment
Open

NPM Packaging #295

calclavia opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@calclavia
Copy link
Contributor

Is your feature request related to a problem? Please describe.
One issue with the current package setup is it's difficult for them to be used as a NPM package, as they're made for "CLI-setup".

Describe the solution you'd like
Refactor all the servers so they export a function that instantiates the server parameters for in-memory usage. Every server should export in its index file:

function createServer(args: ServerConfig)

This is sort of what I'm trying to do here (https://github.com/unroute/typescript-sdk), but would be great if the official package sets this as an example.

You can still have a bin/cli.ts entry-point, but simultaneously allow dual use as a plain node module.

Describe alternatives you've considered
We could keep it as it is but it'll require spawning node servers for each server. It might not be a clean pattern if we are to use these MCPs within custom agent designs.

Open to suggestions though!

@calclavia calclavia added the enhancement New feature or request label Dec 10, 2024
@jspahrsummers
Copy link
Member

Somewhat related: modelcontextprotocol/specification#98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants