
Sharphy
io.github.baharmaulidiiiPublished by GitHub account baharmaulidiiiv1.1.1Updated Oct 31, 2026
CLR Intelligence and Runtime Forensic Bridge for AI Coding Agents.
Overview
Sharphy is a local .NET diagnostic MCP server that lets an AI coding agent analyze CLR crash dumps, inspect managed heaps, and decompile or patch .NET…
- What you can do
- Analyze crash dumps: root-cause analysis of Windows .dmp and Linux ELF core dumps, with crashing thread stacks and exception objects
- Inspect memory and threads: managed heap traversal, generation and fragmentation stats, leak retainers, and deadlock cycle detection
- Decompile and compare binaries: reconstruct C# from CIL, and diff two assembly versions for API and bytecode changes
- Inspect and clean metadata: ECMA-335 tables, P/Invoke imports, resources, and obfuscation analysis
- Modify and generate code: patch CIL opcodes and re-emit assemblies, extract tokens in an isolated load context, and generate strongly-typed C# wrappers
- When to use it
- Useful when an agent must reason about a .NET application it cannot see in source form: diagnosing production crashes or hangs from a collected dump, investigating memory leaks, or understanding and comparing compiled third-party assemblies. It is aimed at post-mortem analysis on an analyst workstation rather than live production monitoring.
- Requirements
- Runs as a local stdio process installed as the .NET global tool Sharphy.Cli via the .NET SDK, launched with the mcp start arguments. Targets .NET 8, 9 or 10. Dumps must be collected separately, for example with dotnet-dump. No authentication, environment variables or headers are declared.
Installation
In SourceWeft
- Open Sharphy in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Sharphy: CLR Intelligence & Runtime Forensic Bridge
Native Model Context Protocol (MCP) Server Empowering AI Coding Agents as Advanced .NET Runtime Diagnosticians, Memory Forensic Analysts, and Binary Architects.
Leveraging ECMA-335 Metadata Semantics, Cross-Platform Crash Dump Telemetry, and Rigid CIL Bytecode Navigation.
[NuGet Package] [NuGet Prefix Reserved] [Official MCP Registry Verified] [PulseMCP Listed] [Glama MCP Server] [MCP Catalog] [.NET 8/9/10] [Apache License 2.0] [Contributor Covenant] [GitHub Repo]
Architecture · Ecosystem · MCP Catalog · Agent Setup · Policies & Legal · Changelog · Contributing · Code of Conduct
[!CAUTION] Legal Disclaimer & Limitation of Liability Sharphy is engineered exclusively for good-faith security research, production crash dump diagnostics, vulnerability assessments, incident response, and lawful software engineering. Users bear sole civil and criminal responsibility for complying with applicable territorial cyber laws, third-party End User License Agreements (EULAs), and intellectual property rights. The developer disclaims any liability for malicious misuse or unlawful reverse engineering. Full details: DISCLAIMER.md.
[!IMPORTANT] Install and execute Sharphy only from official distribution channels: verified NuGet packages (
Sharphy.Cliunder the verifiedSharphy.*reserved prefix), official Model Context Protocol (MCP) Registry (io.github.baharmaulidiii/sharphy), or direct compilation from the official repository at github.com/baharmaulidiii/sharphy.
Architecture Overview & Philosophy
Mainstream AI coding agents (Cursor, Claude Code, Windsurf, Copilot) operate primarily on raw source code heuristics in an editor. They suffer from runtime blindness when confronting:
- Production memory crashes and unhandled fatal exceptions
- Multi-threaded synchronization deadlocks and lock cycle contention
- Large Object Heap (LOH) fragmentation and memory leaks
- Compiled third-party binaries lacking source code availability
Sharphy serves as a deterministic runtime forensic bridge implementing the open Model Context Protocol (MCP) specification. Over an isolated JSON-RPC 2.0 Stdio channel, Sharphy exposes Microsoft low-level diagnostics and decompilation engines directly to semantic AI reasoning loops.
Package Ecosystem & Roles
The Sharphy solution is organized into three modular projects with distinct boundaries:
Operational Architecture: Zero-Footprint Production Forensics
A common enterprise architectural question is whether diagnostic servers must be deployed to live production machines.
Does Sharphy need to be installed on your production servers? NO.
Sharphy follows a Zero-Footprint, Post-Mortem Forensic Workflow. The analytical engines, decompilers, and AI agents run strictly in isolated development, CI/CD, or security analyst workstations:
Key Operational Benefits:
- Zero Production Risk: No third-party daemons, background agents, or persistent listeners are installed on mission-critical production servers.
- Standard Microsoft Tooling: Dump collection uses standard, officially supported Microsoft utilities (
dotnet-dump,createdump, or OS crash reporting). - Regulatory & Audit Compliance: Keeps production environments compliant with strict compliance standards (PCI-DSS, ISO/IEC 27001, SOC 2) by avoiding intrusive monitoring hooks.
- Air-Gapped & Offline Ready: Analysis can be performed in completely isolated, offline lab environments without remote runtime connectivity.
10 MCP Tools Catalog
Sharphy exposes ten specialized tools covering the full spectrum of .NET runtime analysis:
1. sharphy_analyze_dump
Automated Root Cause Analysis (RCA) on Windows (.dmp) and Linux (ELF core dump) CoreCLR memory crash dumps. Extracts crashing thread call stacks, unhandled exception objects, and faulty HRESULT codes.
2. sharphy_inspect_heap
Deep managed heap inspection, traversing GC segments, measuring generation distribution (Gen 0, Gen 1, Gen 2, LOH, POH), calculating fragmentation, and pinpointing memory leak retainers.
3. sharphy_deadlock_detector
Traverses the CLR SyncBlock synchronization cache and active thread Monitor locks, building a Wait-For Graph (WFG) to detect thread synchronization deadlock cycles.
4. sharphy_decompile_method
Reconstructs clean, modern idiomatic C# source code from compiled CIL bytecode using the embedded ILSpy engine, reconstructing async state machines and lambda captures.
5. sharphy_diff_assemblies
Performs semantic binary comparisons between two versions of an assembly, flagging added/removed types, breaking changes to public/protected APIs, and CIL instruction size shifts.
6. sharphy_inspect_metadata
Inspects ECMA-335 metadata tables, decoding TypeDef, MethodDef, FieldDef, custom attributes, P/Invoke native imports, and embedded resources.
7. sharphy_clean_obfuscation
Analyzes obfuscated assemblies, demangling Control Flow Graph (CFG) switch-flattening patterns, trimming excessive NOP sleds, and identifying dynamic proxy delegates.
8. sharphy_extract_tokens
Extracts tokens and types by loading assemblies into an isolated, collectible AssemblyLoadContext (isCollectible: true) without locking files on disk or polluting the host process.
9. sharphy_patch_il
Surgically modifies CIL bytecode instructions by replacing target opcodes, adjusting branch offsets, and re-emitting patched binary assemblies.
10. sharphy_generate_wrapper
Generates zero-overhead, strongly-typed C# wrapper code leveraging .NET 8+ [UnsafeAccessor] attributes to access private members and fields without reflection overhead.
Installation & Agent Integration
Quick Start
Install the global CLI tool via the .NET SDK:
Agent Configuration (MCP Setup)
Add Sharphy to your AI coding client configuration:
Cursor (~/.cursor/mcp.json) or Claude Desktop (claude_desktop_config.json):
Multi-Targeting Architecture
Sharphy is engineered with native multi-targeting without emulation layers:
- .NET 8.0 (LTS): Long-term enterprise stability.
- .NET 9.0 (STS): Modern GC and performance optimizations.
- .NET 10.0 (Latest): Cutting-edge compiler APIs and runtime features.
Community Standards, Security & Legal Policies
- Engineering standards and workflows in CONTRIBUTING.md.
- Community code of conduct in CODE_OF_CONDUCT.md.
- Threat modeling and vulnerability reporting in SECURITY.md.
- Accessibility commitments in ACCESSIBILITY.md.
- Trademark and brand guidelines in TRADEMARK.md.
- Liability limitations in DISCLAIMER.md.
- Third-party attributions and licensing in THIRD_PARTY_NOTICE.md.
License
Sharphy is distributed under the Apache License, Version 2.0. Copyright (c) 2026 Moh. Baharudin Yuda Maulidi. All rights reserved.
Source: README.md at commit ffe227b
Tools
0Version history
3- v1.1.1LatestOct 31, 2026
- v1.1.0Oct 30, 2026
- v1.0.6Oct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts