dotnet-pstacks 3.1.0

dotnet tool install --global dotnet-pstacks --version 3.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-pstacks --version 3.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-pstacks&version=3.1.0
                    
nuke :add-package dotnet-pstacks --version 3.1.0
                    

dotnet-pstacks

A .NET global CLI tool and MCP server to display merged call stacks (parallel stacks) from a .NET application (live process or memory dump).

Installation

dotnet tool install --global dotnet-pstacks

CLI Usage

dotnet-pstacks [-p <pid> | <dumpfile>] [-t <threadIdLimit>]

Options

Option Description Default
-p <pid> Process ID to attach to
<dumpfile> Path to a memory dump file
-t <threadIdLimit> Max thread IDs to display per stack group (-1 for all) 4
--mcp Start as stdio MCP server

Provide either -p <pid> or a dump file path, but not both.

Example

dotnet-pstacks myapp.dmp -t 8

MCP Server Usage

dotnet-pstacks --mcp

When started with --mcp, the tool runs as a stdio-based MCP server exposing:

  • A GetParallelStacks tool with the same parameters as the CLI
  • A DiagnoseThreadingIssues prompt that runs the analysis and asks the LLM to identify deadlocks, contention, and starvation
  • A FindDeadlocks prompt that focuses specifically on circular wait patterns
  • An AnalyzeThreadPoolHealth prompt that assesses how many threads are idle, blocked, or doing useful work

Cursor / VS Code configuration

Add the following to your MCP configuration (e.g. .cursor/mcp.json or user-level mcp.json):

{
  "mcpServers": {
    "dotnet-pstacks": {
      "type": "stdio",
      "command": "dotnet-pstacks",
      "args": ["--mcp"]
    }
  }
}

License

MIT

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
3.1.0 143 5/22/2026
3.0.0 140 5/2/2026
2.0.2 3,444 11/14/2021
1.3.2 2,660 1/4/2020

Added MCP prompts for threading diagnosis, deadlock detection, and thread pool health analysis