ProjGraph is a .NET tool ecosystem for visualizing and analyzing project dependencies within solutions. 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
projgraph erd ./Data/MyDbContext.cs
# Generate Class Diagram for a class and its hierarchy
projgraph classdiagram ./Models/User.csConfigure 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": ["[email protected]", "--yes"]
}
}
}- 📊 Multiple Output Formats: ASCII tree and Mermaid.js diagrams
- 🗄️ Entity Relationship Diagrams: Generate ERDs from EF Core DbContext files
- 🏗️ Class Hierarchies: Visualize class diagrams with inheritance and dependencies
- 🔄 Circular Dependency Detection: Automatically identifies problematic cycles
- 📁 Modern .NET Support: Full support for
.slnx,.sln, and.csprojfiles - 🤖 AI Integration: MCP server for GitHub Copilot, Claude, and other AI assistants
- ⚡ Fast & Reliable: Efficient parsing and graph algorithms
- .NET 10.0 SDK or later
# CLI
dotnet run --project src/ProjGraph.Cli -- visualize ./ProjGraph.sln
# 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 > docs/dependencies.mmd# Generate ERD from DbContext
projgraph erd ./Data/MyDbContext.cs
# Save to documentation
projgraph erd ./Data/MyDbContext.cs > docs/database-schema.md# Generate diagram for a class and its dependencies
projgraph classdiagram ./Models/Admin.cs
# Control discovery depth (default: 3)
projgraph classdiagram ./Models/Admin.cs --depth 5Once 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]
- CLI Package: ProjGraph.Cli on NuGet
- MCP Package: ProjGraph.Mcp on NuGet