Skip to content

MCP server is using around 89 MB of RAM per process #63

Description

@kdcokenny

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions