Next-generation AI coding agents—from Google DeepMind Antigravity, Cursor, Claude Code, to Windsurf—are revolutionizing how we write and refactor code. But when it comes to investigating post-mortem crash dumps, unravelling thread deadlocks, or inspecting compiled .NET assemblies, they hit a wall. An LLM agent cannot open WinDbg, run !dumpheap, or launch dnSpy.
To solve this, we created Sharphy: an open-source, native Model Context Protocol (MCP) server that transforms AI coding agents into deep .NET runtime diagnosticians, memory forensic analysts, and binary architects.
🔍 What Sharphy lets your AI Agent (Antigravity, Cursor, Claude) do directly in chat:
-
Analyze Crash Dumps (
.dmp): Heuristic analysis via Microsoft.Diagnostics.Runtime (ClrMD) to detect ThreadPool starvation, sync-over-async blocking, and high-memory retainers. - Deadlock Detection (Wait-For Graph): Analyzes thread monitor contention and maps circular wait cycles with exact source line attribution.
- Decompile CIL into Clean C#: Embedded ILSpy engine decompiles methods on the fly into idiomatic modern C# without touching external GUI tools.
-
Unified CIL Bytecode Diffing: Compares two assembly versions at the ECMA-335 metadata level and outputs unified line-by-line CIL instruction diffs (
--- Baselinevs+++ Updated). -
Zero-Touch IL Patching: Allows the AI agent to surgically patch opcodes (e.g. replacing validation with NOP/Ret/Ldnull) inside collectible
AssemblyLoadContextwithout locking files on disk.
⚡ Quickstart with Antigravity / Cursor / Claude Code
1. In Antigravity (MCP Server Configuration)
Add Sharphy to your Antigravity agent configuration or run it via the local CLI wrapper:
{
"mcpServers": {
"sharphy": {
"command": "dnx",
"args": ["Sharphy.Cli", "mcp", "start"]
}
}
}
2. In Cursor & Claude Desktop
Add the same block to your ~/.cursor/mcp.json or claude_desktop_config.json.
3. As a Global CLI Tool
dotnet tool install -g Sharphy.Cli
sharphy mcp start
🛡️ Architecture & Invariants
- Multi-Targeting Native Support: Fully compiled and verified across .NET 8.0, .NET 9.0, and .NET 10.0.
- Extreme Latency Profile: P99 MCP round-trip latency < 70ms under high concurrency.
-
Zero-Footprint Sandbox: Dynamic assembly inspection executes inside an isolated collectible
AssemblyLoadContext(isCollectible: true) to prevent memory leaks and host file locks. - Stress-Tested Resilience: Validated against 1,000 req/sec extreme tsunami flood stress and malformed binary fuzzing.
🌐 Links & Resources
- GitHub Repository: github.com/baharmaulidiii/sharphy
- NuGet Package: nuget.org/packages/Sharphy.Cli/1.1.2
- Documentation Portal: baharmaulidiii.github.io/sharphy
Feedback, suggestions, and contributions from the community are very welcome!
Top comments (0)