Gives Claude direct visibility into .NET solution architecture through four core tools: visualize for project dependency graphs, erd for database schema diagrams from DbContext or ModelSnapshot files, classdiagram for inheritance and dependency trees, and stats for solution health metrics like project counts and dependency hotspots. All outputs use Mermaid.js, so Claude can render diagrams inline or save them to markdown. Useful when you're documenting a complex solution, onboarding onto an unfamiliar codebase, or need to explain architecture decisions without manually tracing through project references. Built as a .NET global tool, so it runs wherever dotnet is installed and works with both legacy .sln and modern .slnx formats.
.NET tool ecosystem for visualizing project dependencies, database schemas, and class hierarchies.
ProjGraph is a .NET tool ecosystem for visualizing project dependencies, database schemas, and class hierarchies. It provides both a CLI for manual analysis and an MCP server for AI-assisted exploration of your codebase architecture.
Install and use the command-line tool for immediate visualization:
# Install
dotnet tool install -g ProjGraph.Cli
# Visualize project dependencies
projgraph visualize ./MySolution.slnx
# Generate Entity Relationship Diagram (from DbContext or ModelSnapshot)
projgraph erd ./Data/MyDbContext.cs
# Generate Class Diagram for a class and its hierarchy
projgraph classdiagram ./Models/User.cs
# Compute key solution metrics (project counts, depth, hotspots)
projgraph stats ./MySolution.slnx
Configure your MCP client (e.g., GitHub Copilot, Claude) with the following settings:
Find the latest version number on NuGet
{
"servers": {
"ProjGraph.Mcp": {
"type": "stdio",
"command": "dnx",
"args": ["ProjGraph.Mcp@x.x.x", "--yes"]
}
}
}
DbContext or ModelSnapshot files.slnx, .sln, and .csproj files# CLI
dotnet run --project src/ProjGraph.Cli -- visualize ./ProjGraph.slnx
# Stats
dotnet run --project src/ProjGraph.Cli -- stats ./ProjGraph.slnx
# MCP Server
dotnet run --project src/ProjGraph.Mcp
# Tree format (default)
projgraph visualize ./MySolution.sln
# Mermaid format for documentation
projgraph visualize ./MySolution.slnx --format mermaid --output docs/dependencies.mmd
# Generate ERD from DbContext
projgraph erd ./Data/MyDbContext.cs
# Generate ERD from ModelSnapshot (leveraging migrations)
projgraph erd ./Migrations/MyDbContextModelSnapshot.cs
# Output to Markdown for documentation
projgraph erd ./Data/MyDbContext.cs --output docs/database-schema.md
# Generate diagram for a class and its inheritance and dependencies
projgraph classdiagram ./Models/Admin.cs -i -d
# Control discovery depth (default: 1)
projgraph classdiagram ./Models/Admin.cs -i -d --depth 5
# Display project counts, depth stats, and hotspot projects
projgraph stats ./MySolution.slnx
# Show top 10 most-referenced projects
projgraph stats ./MySolution.slnx --top 10
Once the MCP server is configured:
You: "Analyze the dependencies in my solution"
AI: [Generate the architecture diagram]
You: "Generate a class diagram for the User class"
AI: [Generates the class hierarchy]
You: "Show me the entity relationships in my DbContext"
AI: [Generates the database schema]
You: "Give me a health summary of my solution"
AI: [Returns project counts, depth stats, and hotspot projects]
Explore live examples of ProjGraph's capabilities in the Samples Showcase. Available samples include: