modelcontextprotocol / modelcontextprotocol/servers
NPM Packaging
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying each server's index file and the bin/cli.ts entry point, then review how the current CLI setup creates servers. Done means every server exports a createServer(args: ServerConfig) function for in-memory use while retaining a working CLI entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100