MCP server is using around 89 MB of RAM per process
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 379
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
I was looking into the MCP server’s memory usage and found that it creates validation schemas for all 524 tools during startup, even when most of them are never called.
I tried a minimal fix that delays that work until each tool is actually used.
| Version | RAM usage | Decrease |
|---|---|---|
| Current | 89 MB | — |
| Minimal TypeScript fix | 42 MB | 53% |
| Native experiment | 2–3 MB | ~97% |
I couldn’t get the TypeScript version much lower without replacing or modifying the MCP SDK. Node uses around 15 MB by itself, and loading the SDK brings that to around 35 MB before Dokploy’s tools are included.
The minimal version keeps Node, TypeScript, the official SDK, every transport, and all 524 tools. I also made the native version to see how low it could go, but that one is obviously a much bigger change with more packaging and maintenance involved.
Numbers are median Linux memory usage after initialization and loading the full tool list.
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 reviewing the linked minimal TypeScript fix branch and compare its lazy schema approach with the current MCP server startup path. Measure median Linux memory after initialization with the full tool list, then verify that Node, the official SDK, every transport, and all 524 tools still work while unused schemas are deferred.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100