Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
Model Context Protocol (MCP) Server: com.gitdiagram/gitdiagram
The MCP server com.gitdiagram/gitdiagram provides architecture diagrams, explanations, and Mermaid source code for public GitHub repositories. Its purpose is to expose diagram and documentation content related to repository architecture in a format usable by MCP-enabled clients.
๐ ๏ธ Key Features
Architecture diagrams
Explanations
Mermaid source for public GitHub repositories
๐ Use Cases
Retrieve architecture diagrams for public repositories
Access Mermaid code for diagram generation or review
Use explanations alongside diagrams for repository understanding
โก Developer Benefits
Mermaid source available for downstream tooling
Repository-focused documentation artifacts (diagrams and explanations)
โ ๏ธ Limitations
Described content is limited to public GitHub repositories
No additional tools, endpoints, or configuration details are provided in the available server data
Get the architecture of a public GitHub repository from GitDiagram (gitdiagram.com): a written explanation of how the codebase is organized, its main components with the source paths they live in, how those components connect, and a Mermaid flowchart of the whole system, plus a link to the interactive diagram, where every component opens its code on GitHub. Use it whenever the user wants to understand, visualize, map or explain a GitHub repository's or open-source project's architecture, structure, main modules or data flow, wants an overview before reading unfamiliar code, or asks for an architecture or system diagram of a repo. Read-only and fast: it returns the diagram GitDiagram has already made. If none exists yet, it returns a link that makes one when opened in a browser. Public repositories only. In chat apps that show interactive views, the result also appears as a zoomable diagram whose components open their code on GitHub.
Parameters1
repository
string
required
The GitHub repository as "owner/repo" (e.g. "fastapi/fastapi") or any github.com URL inside it (e.g. "https://github.com/vercel/next.js/tree/canary/packages").
Raw schema
{
"type": "object",
"properties": {
"repository": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "The GitHub repository as \"owner/repo\" (e.g. \"fastapi/fastapi\") or any github.com URL inside it (e.g. \"https://github.com/vercel/next.js/tree/canary/packages\")."
}
},
"required": [
"repository"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}
find_repository_diagrams
Search GitDiagram's library of ready-made architecture diagrams of public GitHub repositories by owner or repository name. Matches any part of "owner/repo" (e.g. "langchain", "vercel/", "react-native") and returns up to 10 repositories, most-starred first, each with its interactive diagram link. Use it to find a project's exact owner/repo from its name, or to list which repositories of an owner or topic already have diagrams. It searches repository names only, not code or file contents.
Parameters2
query
string
required
Part of a repository's "owner/repo" name, e.g. "fastapi", "microsoft/", or "next.js".
limit
integer
optional
How many repositories to return (1โ10, default 10).
Raw schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Part of a repository's \"owner/repo\" name, e.g. \"fastapi\", \"microsoft/\", or \"next.js\"."
},
"limit": {
"description": "How many repositories to return (1โ10, default 10).",
"type": "integer",
"minimum": 1,
"maximum": 10
}
},
"required": [
"query"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}
get_explainer_video
Get GitDiagram's narrated explainer video of a public GitHub repository, if one has been made: the link to watch and share it, its title and length, and the full narration transcript, a plain-language walkthrough of what the project is for, what people do with it and how its main parts fit together. Use it when the user wants a video about a repository, something to watch or share instead of read, or a short spoken-style summary of a project. Read-only: it never makes a video; when none exists it says so and links the page where one can be made.
Parameters1
repository
string
required
The GitHub repository as "owner/repo" (e.g. "fastapi/fastapi") or any github.com URL inside it (e.g. "https://github.com/vercel/next.js/tree/canary/packages").
Raw schema
{
"type": "object",
"properties": {
"repository": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "The GitHub repository as \"owner/repo\" (e.g. \"fastapi/fastapi\") or any github.com URL inside it (e.g. \"https://github.com/vercel/next.js/tree/canary/packages\")."
}
},
"required": [
"repository"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}
Visualize any codebase: turn any public or private GitHub repository into an interactive architecture diagram, or watch it explained in a one-minute narrated video. AI agents can use it too, through the MCP server or the Markdown version of any diagram (gitdiagram.com/owner/repo.md).
Try GitDiagram โ ยท Or replace hub with diagram in any GitHub repository URL.
ย ย Sponsored
SMS, WhatsApp, and RCS through one API. Try Sent โ
New: explainer videos
GitDiagram can now turn a repository into a narrated video of about a minute. The video starts with what the project is for and what people do with it, then shows briefly how its main parts fit together and one decision under the hood.
Watch the gallery โ or add /video to any diagram URL, such as gitdiagram.com/owner/repo/video.
Download an MP4 in landscape or vertical (9:16), with captions burned in.
Making new videos is in early access. Anyone can watch videos that already exist.
Features
Watch a repository explained in a narrated video, or press Video on any diagram page.
Explore the architecture with an AI-generated diagram and streamed explanation.
Jump to the code by clicking any component's linked file or directory.
Use private repositories with a GitHub token via Private Repos in the header.
Export diagrams as PNG or copy the Mermaid source.
Use GitDiagram from AI agents
GitDiagram is a remote MCP server at https://gitdiagram.com/mcp (no key or sign-in). Agents can read a public repository's architecture explanation, components, connections and Mermaid source, search the stored diagrams, and get explainer videos.
bash
# Claude Code: the plugin adds the MCP server and a /gitdiagram skill
claude plugin marketplace add ahmedkhaleel2004/gitdiagram
claude plugin install gitdiagram@gitdiagram
# ...or just the MCP server
claude mcp add --transport http gitdiagram https://gitdiagram.com/mcp
# Codex
codex mcp add gitdiagram --url https://gitdiagram.com/mcp
# Gemini CLI
gemini extensions install https://github.com/ahmedkhaleel2004/gitdiagram
# GitHub Copilot CLI
copilot mcp add --transport http gitdiagram https://gitdiagram.com/mcp
In other clients (ChatGPT, Windsurf, Zed, LM Studio, Goose and more), add a remote MCP server with the URL https://gitdiagram.com/mcp. Then ask something like "how is fastapi/fastapi structured?".
Run locally
Requires Bun, Cloudflare R2, Upstash Redis, and an OpenAI or OpenRouter API key. See the setup guide for prerequisites and configuration.
bash
git clone https://github.com/ahmedkhaleel2004/gitdiagram.git
cd gitdiagram
bun install
cp .env.example .env
Explainer videos are off by default. To turn them on, set VIDEO_EXPLAINER_ENABLED=1, NEXT_PUBLIC_VIDEO_EXPLAINER=1, ANTHROPIC_API_KEY, OPENAI_API_KEY and OPENROUTER_API_KEY (for the voice) in .env. See .env.example for the other video settings.
Development
Built with Next.js, React, TypeScript, Tailwind CSS, and Mermaid. Videos use Claude or GPT for the script and scenes and OpenRouter (Gemini 3.8 Flash TTS) for the voice. Deployed on Vercel.
Architecture โ generation pipeline, storage, and API