$ timeahead.in
/ servers/npm/@memlab/mcp-server
npm

@memlab/mcp-server

MCP server for MemLab heap snapshot analysis — gives AI coding assistants tools to explore JavaScript heap snapshots, find memory leaks, and identify optimization opportunities

5k stars3k/wkupdated 0d agogithub ↗
83good
▣ Overview

What it does

This MCP server wraps memlab, Meta's end-to-end JavaScript memory leak detection framework, and exposes 51 tools for AI assistants to analyze heap snapshots. It allows Claude and other coding assistants to load snapshots from Chromium-based browsers, Node.js, Electron, and Hermes, then interactively explore object references, identify leaked objects, and suggest memory optimizations through natural language queries. The server translates heap snapshot analysis—normally a manual, DevTools-heavy process—into structured tool calls that AI can reason about and act on.

Who it's for

JavaScript and Node.js engineers hunting memory leaks or optimization opportunities who want to leverage AI for heap snapshot analysis. Particularly useful for teams running Claude Code or using cursor-style editors: ask the AI assistant to load a snapshot, find what's preventing garbage collection, and explain the retainer chain in plain English—without manually digging through DevTools.

Common use cases

  • Load a heap snapshot and ask Claude to identify likely memory leaks and their retainer traces
  • Explore object reference chains interactively to understand why a specific object is still alive
  • Compare heap snapshots before and after a code change to measure memory impact
  • Find large objects consuming retained memory and suggest code fixes for detaching them
  • Automate custom leak detection by asking the assistant to write and run scenario files with Puppeteer

Setup pitfalls

  • The codebase contains at least one embedded secret or credential; audit before deploying to shared environments
  • Heap snapshots can be large (hundreds of MB); ensure adequate disk space and memory when loading snapshots into the analysis process
  • Requires filesystem read and write access to load snapshot files and cache results; sandbox carefully if running untrusted analysis
  • memlab performs network calls during analysis; verify outbound network policies if operating in restricted environments
1 credential detected in repository history via Gitleaks
▣ Score BreakdownMCPScore = Σ(raw × weight)
DimensionRawWeighted
Security
35%
80
28.0
Freshness
25%
100
25.0
Adoption
20%
78
15.6
Quality
10%
90
9.0
Trust
10%
50
5.0
Total
82.6
⚿ Capabilities & Risk Explainer
fs readfs writenetworkexecevalsecrets
◆ Risk level: high· 51 tools · auth: API key
fs read + fs write + network + exec + eval + secrets active — can execute code, access credentials, and make external network calls.
Tool nameDescriptionDestructive?
memlab_global_variables✓ no
memlab_duplicated_strings✓ no
memlab_aggregate✓ no
memlab_server_status✓ no
memlab_eval✓ no
+45 more tools
memlab_load_snapshot✓ no
memlab_event_listener_leaks✓ no
memlab_reports✓ no
memlab_dominator_subtree✓ no
memlab_search_strings✓ no
memlab_auto_investigate✓ no
memlab_growth_signals✓ no
memlab_dev_artifacts✓ no
memlab_property_distribution✓ no
memlab_retainer_summary✓ no
memlab_retainer_trace✓ no
memlab_get_node✓ no
memlab_object_shape✓ no
memlab_get_references✓ no
memlab_shape_histogram✓ no
memlab_pinch_points✓ no
memlab_event_registry✓ no
memlab_referrer_summary✓ no
memlab_closure_inspection✓ no
memlab_array_group_by✓ no
memlab_sliced_strings✓ no
memlab_get_value✓ no
memlab_string_patterns✓ no
memlab_class_histogram✓ no
memlab_quick_diagnosis✓ no
memlab_get_string✓ no
memlab_intern_opportunities✓ no
memlab_find_by_property✓ no
memlab_get_property✓ no
memlab_search_nodes✓ no
memlab_trace_dominators✓ no
memlab_snapshot_summary✓ no
memlab_object_cost_breakdown✓ no
memlab_find_nodes_by_class✓ no
memlab_sequence_analysis✓ no
memlab_for_each✓ no
memlab_weakmap_entries✓ no
memlab_stale_collections✓ no
memlab_snapshots✓ no
memlab_largest_objects✓ no
memlab_find_by_shape✓ no
memlab_detached_dom✓ no
memlab_cache_analysis✓ no
memlab_check_health✓ no
memlab_diff_snapshots✓ no
⚙ Install config
Claude Desktop · Cursor · Windsurf · VS Code (Copilot) · Claude Code
add to your MCP client config:
{
  "mcpServers": {
    "memlabmcp": {
      "command": "npx",
      "args": [
        "-y",
        "@memlab/mcp-server"
      ]
    }
  }
}
📈 Score historylast 33 snapshots
4/30/20266/11/2026 · 33 snapshots
⚙ Maintenance health
30/ 100 · is this project alive?
contributors (1y)4
top contributor share92%
releases (1y)0
ci✓ passing
⛁ Raw data
weekly downloads3k
github stars5k
forks137
open issues13
license✓ present
readme length12060 chars
last publish0d ago
last commit0d ago
last updated3d ago
install verified✗ fail · 31d ago
owner of this server? claim your listing to get a verified badgeclaim →
🔔 Score drop alerts
get notified by email when this server's score drops 5+ points