ProjGraph MCP Server

io.github.HandyS11Published by GitHub account HandyS11v1.2.0Updated Oct 27, 2026

Analyze .NET solutions: Generate Mermaid graphs, ERDs, class diagrams, and project metrics.

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated overview

Local MCP server that analyzes .NET solutions and generates Mermaid diagrams, ERDs, class diagrams and project metrics for an AI assistant.

What you can do
  • Generate project dependency graphs for .slnx, .sln and .csproj files, as Mermaid diagrams or ASCII trees
  • Produce entity relationship diagrams from EF Core DbContext or ModelSnapshot files
  • Draw class diagrams showing inheritance and dependencies for a class hierarchy
  • Compute solution metrics: project counts, type breakdown, dependency depth and hotspot detection
When to use it
Useful when an assistant needs to reason about the architecture of a .NET codebase: mapping project dependencies, documenting database schemas, exploring class hierarchies, or getting a quick health summary of a solution.
Requirements
Runs locally over stdio as a .NET tool (ProjGraph.Mcp on NuGet), typically launched with dnx. Requires the .NET 10.0 SDK or later. No authentication, environment variables or headers are declared. The assistant needs access to the solution, project or source files to analyze.
Before you install
The server reads source files from the local machine, so point it only at codebases you are comfortable exposing to the assistant session. It is described as read-only analysis (diagrams and metrics); no write, send or delete actions are documented.

Installation

In SourceWeft

  1. Open ProjGraph MCP Server in the dashboard and add it to a workspace.
  2. 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

ProjGraph

.NET tool ecosystem for visualizing project dependencies, database schemas, and class hierarchies.

[CI] [CD] [License]

[ProjGraph.Cli NuGet] [ProjGraph.Cli Downloads] [ProjGraph.Mcp NuGet] [ProjGraph.Mcp Downloads]

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.

🚀 Quick Start

CLI Tool

Install and use the command-line tool for immediate visualization:

bash
# Installdotnet tool install -g ProjGraph.Cli
# Visualize project dependenciesprojgraph visualize ./MySolution.slnx
# Generate Entity Relationship Diagram (from DbContext or ModelSnapshot)projgraph erd ./Data/MyDbContext.cs
# Generate Class Diagram for a class and its hierarchyprojgraph classdiagram ./Models/User.cs
# Compute key solution metrics (project counts, depth, hotspots)projgraph stats ./MySolution.slnx

📖 Full CLI Documentation

MCP Server

Configure your MCP client (e.g., GitHub Copilot, Claude) with the following settings:

Find the latest version number on NuGet

json
{  "servers": {    "ProjGraph.Mcp": {      "type": "stdio",      "command": "dnx",      "args": ["[email protected]", "--yes"]    }  }}

📖 Full MCP Documentation

✨ Key Features

  • 📊 Multiple Output Formats: ASCII tree and Mermaid.js diagrams
  • 🗄️ Entity Relationship Diagrams: Generate ERDs from EF Core DbContext or ModelSnapshot files
  • 🏗️ Class Hierarchies: Visualize class diagrams with inheritance and dependencies
  • 📈 Solution Metrics: Project counts, type breakdown, dependency depth, and hotspot detection
  • 📁 Modern .NET Support: Full support for .slnx, .sln, and .csproj files
  • 🤖 AI Integration: MCP server for GitHub Copilot, Claude, and other AI assistants
  • ⚡ Fast & Reliable: Efficient parsing and graph algorithms

🛠️ Development

Prerequisites

Run Locally

bash
# CLIdotnet run --project src/ProjGraph.Cli -- visualize ./ProjGraph.slnx
# Statsdotnet run --project src/ProjGraph.Cli -- stats ./ProjGraph.slnx
# MCP Serverdotnet run --project src/ProjGraph.Mcp

📝 Usage Examples

Analyze Project Dependencies

bash
# Mermaid format (default)projgraph visualize ./MySolution.sln
# ASCII tree formatprojgraph visualize ./MySolution.sln --format tree
# Mermaid format for documentationprojgraph visualize ./MySolution.slnx --format mermaid --output docs/dependencies.mmd

Generate Database Diagrams

bash
# Generate ERD from DbContextprojgraph erd ./Data/MyDbContext.cs
# Generate ERD from ModelSnapshot (leveraging migrations)projgraph erd ./Migrations/MyDbContextModelSnapshot.cs
# Output to Markdown for documentationprojgraph erd ./Data/MyDbContext.cs --output docs/database-schema.md
# Control how EF Core owned types (OwnsOne/OwnsMany) are rendered:# 'mirror' (default) inlines a table-split owned type onto its owner as EF names it;# 'classic' gives every owned type its own entity box regardless of table mappingprojgraph erd ./Data/MyDbContext.cs --owned-mode classic

Visualize Class Hierarchies

bash
# Generate diagram for a class and its inheritance and dependenciesprojgraph classdiagram ./Models/Admin.cs -i -d
# Control discovery depth (default: 1)projgraph classdiagram ./Models/Admin.cs -i -d --depth 5

Analyze Solution Metrics

bash
# Display project counts, depth stats, and hotspot projectsprojgraph stats ./MySolution.slnx
# Show top 10 most-referenced projectsprojgraph stats ./MySolution.slnx --top 10

With AI Assistants

Once the MCP server is configured:

text
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]

🔗 Links

📚 Samples & Showcase

Explore live examples of ProjGraph's capabilities in the Samples Showcase. Available samples include:

  • E-commerce ERD: Complex database model with inheritance and hierarchies.
  • Design Patterns: Deep class diagrams showing pattern implementation.
  • Modular Architecture: Project dependency visualization for modern solutions.
  • Simple Hierarchy: Easy entry-level examples for new users.
  • Solution Metrics: Architectural health summary with project counts, depth, and hotspots.

📚 Documentation

Source: README.md at commit ffb4bc0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.2.0LatestSep 16, 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