AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Memorylens Mcp

mcp-marcelroozekrans-memorylens-mcp · by MarcelRoozekrans

MCP server for .NET memory profiling with AI-actionable code fix suggestions, powered by JetBrains dotMemory

No reviews yet
0 installs
41 views
0.0% view→install

Install

$ agentstack add mcp-marcelroozekrans-memorylens-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v1.3.4 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v1.3.4. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-marcelroozekrans-memorylens-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Memorylens Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

[](https://github.com/sponsors/MarcelRoozekrans)

MemoryLens MCP

On-demand .NET memory profiling with concrete, AI-actionable code fix suggestions — wraps JetBrains dotMemory with a heuristic-based rule engine.


Hosted deployment

A hosted deployment is available on Fronteir AI.

Quick Start

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

Prerequisites

  • .NET 10 SDK or later
  • JetBrains dotMemory CLI (see below for installation options)

dotMemory CLI Installation

MemoryLens MCP automatically downloads and caches the JetBrains dotMemory CLI on first use via the ensure_dotmemory tool — no manual installation required on supported platforms.

Supported Platforms (auto-download)

| Platform | Architecture | |---|---| | Windows | x64, x86, ARM64 | | Linux (glibc) | x64, ARM64, ARM | | Linux (musl) | x64, ARM64 | | macOS | x64 (Intel), ARM64 (Apple Silicon) |

Cache Location

Downloaded binaries are cached at ~/.memorylens/tools/dotmemory/{version}/. Old versions are not auto-removed — delete the directory manually to free disk space.

Unsupported Platforms

Platforms not listed above (e.g. FreeBSD, Linux x86) cannot use auto-download. Set DOTMEMORY_PATH to point to an existing dotMemory CLI executable:

export DOTMEMORY_PATH="/path/to/dotMemory.sh"   # Linux/macOS
set DOTMEMORY_PATH=C:\path\to\dotMemory.exe      # Windows

Find dotMemory CLI in JetBrains Toolbox:

  • Linux: ~/.local/share/JetBrains/Toolbox/apps/rider/tools/profiler/dotMemory.sh
  • Windows: %LOCALAPPDATA%\JetBrains\Toolbox\apps\rider\tools\profiler\dotMemory.exe

Manual Fallback Discovery

If auto-download is unavailable, MemoryLens MCP falls back through these discovery modes in order:

  1. DOTMEMORY_PATH environment variable — explicit path to the CLI executable
  2. System PATH — searches for dotMemory.sh / dotMemory (Linux/macOS) or dotMemory.exe (Windows)
  3. Local .NET tool manifestdotnet tool install dotnet-dotmemory --local
  4. Global .NET tooldotnet tool install -g dotnet-dotmemory (legacy fallback)

Error Scenarios

| Error | Cause | Fix | |---|---|---| | Platform '...' is not supported | Unsupported OS/arch | Set DOTMEMORY_PATH | | Network/download failure | No internet / NuGet unreachable | Set DOTMEMORY_PATH or retry ensure_dotmemory | | chmod +x failed | Read-only filesystem | Set DOTMEMORY_PATH to a writable location | | dotMemory CLI not found | All discovery modes failed | Run ensure_dotmemory or set DOTMEMORY_PATH |

Available MCP Tools

| Tool | Description | |------|-------------| | ensure_dotmemory | Downloads and verifies the JetBrains dotMemory CLI tool is available | | list_processes | Lists running .NET processes available for profiling | | snapshot | Captures a single memory snapshot of a target process | | compare_snapshots | Captures two snapshots with configurable delay and compares them | | analyze | Runs the rule engine against a captured snapshot and returns findings | | get_rules | Lists all available analysis rules with their metadata |

Built-in Rules

| ID | Severity | Category | Description | |----|----------|----------|-------------| | ML001 | critical | leak | Event handler leak detected | | ML002 | critical | leak | Static collection growing unbounded | | ML003 | high | leak | Disposable object not disposed | | ML004 | high | fragmentation | Large Object Heap fragmentation | | ML005 | medium | retention | Object retained longer than expected | | ML006 | medium | allocation | Excessive allocations in hot path | | ML007 | medium | retention | Closure retaining unexpected references | | ML008 | low | allocation | Array/list resizing without capacity hint | | ML009 | low | pattern | Finalizer without Dispose pattern | | ML010 | low | pattern | String 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 ensure_dotmemory, then snapshot with the target PID, then analyze the result 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 configurable wait period, then analyze the diff to identify objects that grew between snapshots.

License

[MIT](LICENSE)

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v1.3.4 Imported from the upstream source.