← Back to directory
M

MemoryLens MCP

Community
On-demand .NET memory profiling with AI-actionable code fix suggestions.
Category
Dev Tools #243 of 438
Stars
★ 11 Popular
Transport
stdio (local process)
Runtime
.NET 10+ · Node.js · Docker
Credentials
No credential needed
License
MIT
Last commit
Tools
6
51FMRS · D

MemoryLens MCP provides a useful MCP interface for .NET memory profiling, wrapping JetBrains dotMemory with a rule-based engine that offers AI-actionable insights. Its strengths are its on-demand nature, multiple deployment options, and the ability to generate actionable fixes. However, the dependency on .NET 10 and dotMemory CLI, plus the automatic download of external tools, are considerations for users regarding security and environment readiness.

Strongest · Documentation 14/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
8/20
Maintenance
10/20
Documentation
14/20
Setup experience
11/20
Why each score
Reliability 8/20
README lists six tools, an error-scenario table, and a fallback discovery chain; the description is internally coherent. However, this static review has no server source, no committed tests, and no verifiable CI run logs to confirm declared tools match behavior. The npm package is only a launcher requiring the .NET 10 SDK plus an external dotMemory CLI download, adding fragile multi-step startup. No verifiable execution evidence, so reliability stays below the 12 cap at 8.
Security and permissions 8/20
No malicious indicators, but notable weaknesses: automatic network download and execution of JetBrains binaries on first use (verification mechanism not shown); Docker path requires --pid=host and SYS_PTRACE, well beyond least privilege; heap snapshots expose target-process memory with no data-boundary disclosure; no explicit confirmation flow for privileged operations. No red-line violation, but incomplete scoping/confirmation, score 8.
Maintenance 10/20
MIT license, version 2.1.2 dual-published on npm and NuGet, a CI badge, and 1 open issue indicate an active project; but no evidence of release cadence, dependency-update policy, or a security-response channel. Governance gaps keep this at 10.
Documentation 14/20
Documentation is fairly complete: install paths, prerequisites, platform matrix, cache location, fallback chain, error troubleshooting table, rule table, config examples, usage examples, and Docker limitations. Deductions: tool parameter details are missing, the hosted deployment link (Fronteir AI) is unaudited and possibly misspelled, and rule-engine accuracy has no supporting evidence. Score 14.
Setup experience 11/20
Multiple install paths (npx, dnx, Claude Code plugin, dotnet tool, Docker) with client JSON config examples make setup clear, but the hard .NET 10 SDK requirement, the launcher-only npm package, the multi-step dotMemory CLI handling, and a complex Docker route with platform caveats add fragility. Score 11.

Static review · not runListed 2026-09-08

Read the FMRS scoring method →

Fit and risk

What it can accessRuns commands or codeUses the network

Best for

  • .NET developers seeking quick, on-demand memory profiling integrated with AI-assisted coding tools.
  • Debugging scenarios that require analyzing running .NET processes by their PID.
  • Teams that want to automate detection of common memory leak patterns like event handler leaks or static collections growing unbounded.

Not for

  • Non-.NET processes are not supported.
  • Users without .NET 10 SDK or on unsupported platforms (e.g., FreeBSD) will need manual dotMemory setup.
  • Not suitable for fully offline scenarios unless the dotMemory CLI is pre-installed and cached.

Required permissions

  • Executes arbitrary commands to launch profilers (e.g., dotMemory CLI).
  • May access the network to download tools and dependencies.
  • May require ptrace and host PID namespace if running in a container.

Risks and side effects

  • The tool downloads and executes external binaries (dotMemory CLI), introducing supply chain risk.
  • Memory profiling of a target process may impact its performance or stability.
  • Running with elevated privileges could pose security risks.

Setup

Before you start

Runtime:.NET 10+ · Node.js · Docker

Other optional settings (1)
DOTMEMORY_PATH optional Explicit path to an existing JetBrains dotMemory CLI executable, only required on platforms where auto-download is unsupported; the CLI can be found via JetBrains Toolbox (e.g. %LOCALAPPDATA%\JetBrains\Toolbox\apps\rider\tools\profiler\dotMemory.exe).

For npx (requires .NET 10 SDK): add a stdio server config with command npx -y memorylens-mcp. Or use dnx: dnx MemoryLens.Mcp --yes. Also available as .NET global tool: dotnet tool install -g MemoryLens.Mcp.

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

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "memorylens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "memorylens-mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add memorylens -- npx -y memorylens-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After connecting, confirm the client's tool list includes ensure_dotmemory, list_processes, snapshot, analyze, compare_snapshots and get_rules; then run list_processes — if it returns running .NET processes, the installation works.

Troubleshooting

  1. Ensure .NET 10 SDK is on PATH.
  2. For unsupported platforms, set DOTMEMORY_PATH to an existing dotMemory CLI executable.
  3. If automatic download fails, check network connectivity and retry `ensure_dotmemory`.
  4. If no processes are listed, verify the target process is a .NET process and running.
  5. Refer to the error scenarios table: 'Platform not supported', 'Network/download failure', 'chmod +x failed', 'dotMemory CLI not found'.

Things to try

Once connected, you can ask your AI assistant things like:

  • Take a snapshot of my running API (PID 12345)
  • Check if my app has a memory leak — compare before and after processing 1000 requests
  • List the running .NET processes available for profiling
  • Show all available memory analysis rules

Tools 6

ensure_dotmemory writes
Downloads and verifies the JetBrains dotMemory CLI is available.
list_processes read-only
Lists running .NET processes available for profiling (discovered via diagnostic IPC endpoints).
snapshot read-only
Captures a single memory snapshot of a target process.
analyze read-only
Runs the rule engine against a captured snapshot and returns findings.
compare_snapshots read-only
Captures two snapshots with configurable delay and compares them to detect memory growth.
get_rules read-only
Lists all available analysis rules with their metadata.

Use cases

Take a memory snapshot of a running .NET process to inspect current memory state and identify leaks.
Compare two snapshots (before/after) to detect memory growth after load testing or user operations.
Get concrete, AI-actionable code fix suggestions for memory issues such as event handler leaks or static collections growing unbounded.

Supported clients

Claude Desktop
VS CodePartial support
Visual StudioPartial support
Claude Code

Listed from the project's documentation, not tested by this site.

Overview

MemoryLens MCP is an MCP server for on-demand memory profiling of .NET processes. It wraps JetBrains dotMemory and provides actionable, AI-executable code fix suggestions via a heuristic-based rule engine. Supports in-process heap snapshots via EventPipe with leak heuristics. The server requires .NET 10 SDK or later and is available via multiple deployment options: npm launcher, .NET global tool, or Docker. It includes a tool to automatically download and cache the dotMemory CLI.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision a2f3440de455 Data synced 2026-10-19 Read the FMRS scoring method