
MCP server for on-demand .NET memory profiling with AI-actionable code fix suggestions, collecting heap data in-process over EventPipe
概览
On-demand .NET memory profiling with concrete, AI-actionable code fix suggestions — no profiler to install. A hosted deployment is available on Fronteir AI. 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 . Subsequent starts skip the install entirely and work offline. Add to your MCP settings (.vscode/mcp.json or VS settings): 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. - .NET 10 SDK, 10.0.
README
以下为原文 README 节选,完整内容请查看原文。
MemoryLens MCP
On-demand .NET memory profiling with concrete, AI-actionable code fix suggestions — no profiler to install.
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 \
安装
npx -y memorylens-mcp配置
{
"mcpServers": {
"memorylens": {
"type": "stdio",
"command": "npx",
"args": ["-y", "memorylens-mcp"]
}
}
}