Skip to content
plugmcp
DirectorySkillsCategoriesBlog
EN/中文
Sign inSign up
Home/Servers/Memorylens

Memorylens

I
by io.github.MarcelRoozekrans

MCP server for .NET memory profiling — in-process heap snapshots via EventPipe with leak heuristics

Power your agent

Add this server

The publisher's own command. Not a PlugMCP endpoint.

Local command
npx -y [email protected]
Provider
Claude Code
claude mcp add io.github.marcelroozekrans-memorylens-mcp -- npx -y [email protected]

Run in a terminal.

Claude Desktop
{
  "mcpServers": {
    "io.github.marcelroozekrans-memorylens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}

claude_desktop_config.json

Step-by-step: add this in Claude

Remote URL or a command on your machine? How the two installs differ

Run on PlugMCP

Host a copy with our keys and logs.

A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.

Launch

Related MCP

View more
  • Firecrawl🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
  • N
    NotionToken-auth Notion MCP: pages, databases, blocks, comments, files. Runs headless in CI and agents.
  • Context7Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

Related skills

View all
  • reaReverse engineer anything with agents, from app behavior down to native binaries.
  • rea-changelog-updatePrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.
  • rea-tool-designDesign or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.

Questions

How do I install Memorylens?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Memorylens need an API key?
No required environment variable is listed on this record.
What transport does Memorylens use?
Memorylens runs locally over stdio.
When was Memorylens last checked?
Last checked 2026-10-21. MCP server for .NET memory profiling — in-process heap snapshots via EventPipe with leak heuristics

MCP server for .NET memory profiling — in-process heap snapshots via EventPipe with leak heuristics


Hosted deployment

A hosted deployment is available on Fronteir AI.

Quick Start

npx (any MCP client)

{
  "mcpServers": {
    "memorylens": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "memorylens-mcp"]
    }
  }
}

The npm package ships no server code — it is a launcher that installs the MemoryLens.Mcp .NET global tool at a matching version and execs it, so the .NET 10 SDK must be on PATH. Subsequent starts skip the install entirely and work offline.

VS Code / Visual Studio (via dnx)

Add to your MCP settings (.vscode/mcp.json or VS settings):

{
  "servers": {
    "memorylens": {
      "type": "stdio",
      "command": "dnx",
      "args": ["MemoryLens.Mcp", "--yes"]
    }
  }
}

Claude Code Plugin

claude install gh:MarcelRoozekrans/memorylens-mcp

.NET Global Tool

dotnet tool install -g MemoryLens.Mcp

Docker

docker build -t memorylens-mcp .
docker run -i --rm --pid=host --cap-add=SYS_PTRACE \
  -v /tmp:/tmp \
  -v "$PWD:/workspace" memorylens-mcp

Profiling from a container needs ptrace and the host PID namespace, and on Docker Desktop that namespace is the Linux VM rather than your desktop — see docs/docker.md before choosing this route.

-v /tmp:/tmp is what makes list_processes return anything — the runtime's diagnostic sockets live in the temp directory — and it is also what keeps snapshots alive after --rm, since they are written to /tmp/memorylens-snapshots inside the container. -v "$PWD:/workspace" is only so .memorylens.json is picked up; nothing is written there.

Prerequisites

  • .NET 10 SDK, 10.0.4xx feature band (pinned in global.json)

Running a filtered subset of the tests, e.g. dotnet test --filter <name>, will exit with code 9 and print error: 1, failed: 0. That's the test project's discovery-collapse guard (--minimum-expected-tests) firing because the filter left fewer tests than expected — it is not a test failure, and a full dotnet test run is unaffected.

How Collection Works

MemoryLens collects heap data in-process over EventPipe, the .NET runtime's built-in diagnostics channel. There is no profiler to install, no download on first use, and no external tool on PATH.

snapshot attaches to a running .NET process by pid, induces a collection, and aggregates the heap into per-type counts and sizes. Snapshots are written as small JSON files under your temp directory and referenced by a short id.

On Linux and in containers, attaching to another process's diagnostic endpoint may require matching UID or SYS_PTRACE — see docs/docker.md.

Available MCP Tools

ToolDescription
list_processesLists running .NET processes available for profiling, discovered from their diagnostic IPC endpoints
snapshotCaptures a single memory snapshot of a target process
compare_snapshotsCaptures two snapshots with configurable delay and compares them
analyzeRuns the rule engine against a captured snapshot and returns findings
get_rulesLists all available analysis rules with their metadata

Built-in Rules

IDSeverityCategoryDescription
ML001criticalleakEvent handler leak detected
ML002criticalleakStatic collection growing unbounded
ML003highleakDisposable object not disposed
ML004highfragmentationLarge Object Heap fragmentation
ML005mediumretentionObject retained longer than expected
ML006mediumallocationExcessive allocations in hot path
ML007mediumretentionClosure retaining unexpected references
ML008lowallocationArray/list resizing without capacity hint
ML009lowpatternFinalizer without Dispose pattern
ML010lowpatternString interning opportunity

Configuration

Create a .memorylens.json file in your project root to customize rule behavior:

{
  "rules": {
    "ML001": { "enabled": true, "severity": "critical" },
    "ML002": { "enabled": true, "severity": "critical" },
    "ML003": { "enabled": true, "severity": "high" },
    "ML004": { "enabled": true, "severity": "high" },
    "ML005": { "enabled": true, "severity": "medium" },
    "ML006": { "enabled": true, "severity": "medium" },
    "ML007": { "enabled": true, "severity": "medium" },
    "ML008": { "enabled": true, "severity": "low" },
    "ML009": { "enabled": true, "severity": "low" },
    "ML010": { "enabled": true, "severity": "low" }
  }
}

Usage Examples

Single Snapshot

Capture a memory snapshot of a running process to inspect current memory state:

> /memorylens
> Take a snapshot of my running API (PID 12345)

Claude will call snapshot with the target PID, then analyze the returned snapshot id and present findings ordered by severity.

Before/After Comparison

Detect memory growth by comparing two snapshots taken with a delay:

> /memorylens
> Check if my app has a memory leak — compare before and after processing 1000 requests

Claude will call compare_snapshots with a delaySeconds value (default 10 seconds) between the two captures, then analyze the diff to identify objects that grew between snapshots.

License

MIT

How do I install Memorylens?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Memorylens need an API key?
No required environment variable is listed on this record.
What transport does Memorylens use?
Memorylens runs locally over stdio.
When was Memorylens last checked?
Last checked 2026-10-21. MCP server for .NET memory profiling — in-process heap snapshots via EventPipe with leak heuristics

No tool list yet. Remote servers get one after the first health check.

plugmcp

Plug any tool into any agent. MCP servers for people who do not write servers. Gateway for volume, n8n for apps.

  • github.com/TODO
  • x.com/TODO
  • linkedin.com/company/TODO

PlugMCP, 2026

Product
  • Browse
  • Install
  • Host your own
  • Pricing
  • Voice mode
  • Browser
Directory
  • All MCP servers
  • MCP Apps
  • Tools
  • Agent skills
  • Categories
  • New
  • Voice
  • Submit a server
Developers
  • Docs
  • Blog
  • Club
  • Work with us
  • What is MCP
  • What is WebMCP
  • Status
Company
  • About
  • Contact
  • Terms
  • Privacy
  • DPA