@memlab/mcp-server weekly downloads statistics
By memlab · npm · Claude Code
MCP server for MemLab heap snapshot analysis — gives AI coding assistants tools to explore JavaScript heap snapshots, find memory leaks, and identify optimization opportunities
@memlab/mcp-server has 4,038 recorded weekly downloads on npm, an increase of 19.8% over the past 30 days, ranking #1613 of 3,247 tracked listings.
About @memlab/mcp-server
@memlab/mcp-server
An MCP (Model Context Protocol) server that wraps MemLab's heap analysis APIs, giving AI coding assistants (Claude Code, Cursor, etc.) interactive tools to explore JavaScript heap snapshots, find memory leaks, and identify optimization opportunities.
It registers about 150 memlab_* tools, covering:
- Single-snapshot analysis: what the heap is made of, who retains what, detached DOM, duplicated strings, caches and collections.
- Ladder analysis: an ordered series of snapshots taken while an interaction repeats. These tools report per-cycle growth rates, fit the growth, and tell a leak apart from a bounded working set or in-flight backlog.
- Verification: separating real growth from dev-tool and measurement artifacts, checking that a fix worked, and checking that a result reproduces.
The package also ships memlab-cli, which runs the same tools from a shell without an MCP client.
Prerequisites
- Node.js 18 or later.
- A large V8 heap. The server loads and analyzes large heap snapshots in memory, which can exceed Node.js's default heap limit. Run it with
--max-old-space-size=8192or higher to avoid out-of-memory crashes. The configuration examples below include this setting.
Snapshot-size ceiling. The server keeps the full parsed graph resident: nodes, edges, dominator tree and indexes. A full load needs several times the snapshot's on-disk size in memory. To avoid an out-of-memory crash, which would lose all loaded state, memlab_load_snapshot refuses a load in three cases:
- File size. The file is larger than
max_file_size_mb. The default is 900 MB or 0.25 × the old-space limit, whichever is larger. That is 2,048 MB on an 8 GB server. - Node/edge count. The node or edge count in the snapshot header is above the load ceiling. The ceiling is derived from the old-space limit the process is actually running with: about 13.9M nodes and 55.7M edges at 8 GB. Raising the heap raises it with no other change. To make a one-off oversized load anyway, pass
force: true. - Memory headroom. The projected working set doesn't fit in the remaining old space. In that case the least-recently-used resident snapshot is evicted first, and the load is refused only if it still doesn't fit.
memlab_snapshot_header reads a file's node and edge counts without loading it. It tells you whether the file will load, and if not, roughly how large a capture of the same app would. When you load several snapshots with keep_previous: true, each one adds its full graph to memory. Unload the ones you're done with via memlab_snapshots.
Which setting raises the heap depends on how the server is launched.
memlab-mcpordist/index.js: setNODE_OPTIONS. These run the server in-process without passing a flag of their own.memlab-cli: setMEMLAB_MAX_OLD_SPACE_MBinstead.memlab-clispawns the server with an explicit--max-old-space-size, and an explicit flag overrides the same flag inNODE_OPTIONS.
By default memlab-cli uses 60% of physical RAM, rounded to the nearest GB. The value is never less than 8,192 MB and never more than 49,152 MB. Inside a memory-limited container it uses 60% of the container limit instead, and the 8,192 MB minimum doesn't apply.
Quick Start
Claude Code and Codex users: the memlab plugin
installs this server together with Agent Skills that teach the agent when and how to use it.
In Claude Code: claude plugin marketplace add meta/memlab, then claude plugin install memlab@memlab.
In Codex: codex plugin marketplace add meta/memlab, then codex plugin add memlab@memlab.
Option 1: Global install
npm install -g @memlab/mcp-server
Then configure (~/.claude.json for Claude Code, or .mcp.json for Cursor/Windsurf):
{
"mcpServers": {
"memlab": {
"type": "stdio",
"command": "memlab-mcp",
"env": {
"NODE_OPTIONS": "--max-old-space-size=8192"
}
}
}
}
Option 2: npx (no install)
Add to your Claude Code MCP config (~/.claude.json for Claude Code, or .mcp.json for Cursor/Windsurf):
{
"mcpServers": {
"memlab": {
"type": "stdio",
"command": "npx",
"args": ["-y", "-p", "@memlab/mcp-server", "memlab-mcp"],
"env": {
"NODE_OPTIONS": "--max-old-space-size=8192"
}
}
}
}
opencode
opencode reads MCP servers from opencode.json in its own format:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"memlab": {
"type": "local",
"command": ["npx", "-y", "-p", "@memlab/mcp-server", "memlab-mcp"],
"environment": {
"NODE_OPTIONS": "--max-old-space-size=8192"
}
}
}
}
To use the memlab Agent Skills with it too, copy the directories under
plugins/memlab/skills/
into .opencode/skills/ in your project, or into ~/.config/opencode/skills/.
Option 3: From source
git clone https://github.com/meta/memlab.git
cd memlab
npm install
npm run build
To check a change, run these in packages/mcp-server:…
Description from the npm listing.
- mcp
- memlab
- memory
- leak
- heap
- snapshot
- analysis
- claude
- ai
- mcp-server
- model-context-protocol
- memory-leak
- heap-snapshot
- heapsnapshot
- v8
- nodejs
- chrome-devtools
- ai-agents
- claude-code
- codex
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (128)Similar npm Claude Code plugins
All 20 @memlab/mcp-server alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@memlab/mcp-server. First seen Nov 22, 2026; last successful collection Dec 6, 2026. See the methodology.