GitDiagram — Claude Code MCP server: repo architecture on demand
Turns a public GitHub repository into an architecture diagram with an explanation and Mermaid source. Handy when you need to read unfamiliar code fast.
claude mcp add --transport http gitdiagram https://gitdiagram.com/mcpWhat GitDiagram does
GitDiagram is a remote MCP server at https://gitdiagram.com/mcp. No key, no sign-in. An agent can pull a public repository's architecture explanation, its components and connections, and the Mermaid source, search stored diagrams, and fetch explainer videos.
Claude Code users get a plugin that ships both the MCP server and a /gitdiagram skill. Installing the server alone takes one command, claude mcp add. Codex, Gemini CLI and GitHub Copilot CLI connect the same way, while Cursor, Windsurf and Zed just need the URL in their client config.
Private repositories work through a GitHub token in the Private Repos section of the site. Diagrams export as PNG, and the Mermaid source can be copied out. Running it locally is a different job: Bun, Cloudflare R2, Upstash Redis and an OpenAI or OpenRouter key are required, so the hosted server is the shorter path for agent work.
What it helps with
- understand the architecture of an unfamiliar repo
- get Mermaid source for your own docs
- find a component and jump to its file
- compare how two similar projects are built
- explain someone else's code to a teammate
Example prompts for the agent
- How is fastapi/fastapi structured?
- Show me the architecture diagram for
owner/repoand how the components connect - Find the stored diagram for this repository
How to install GitDiagram
Platform CLI: remote server
claude mcp add --transport http gitdiagram https://gitdiagram.com/mcpPlatform CLI: remote server
codex mcp add gitdiagram --url https://gitdiagram.com/mcpConfig file
{
"mcpServers": {
"gitdiagram": {
"url": "https://gitdiagram.com/mcp"
}
}
}Config file
{
"servers": {
"gitdiagram": {
"type": "http",
"url": "https://gitdiagram.com/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http gitdiagram https://gitdiagram.com/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about GitDiagram
How do I install GitDiagram in Claude Code?
Add the server with claude mcp add --transport http gitdiagram https://gitdiagram.com/mcp. For the /gitdiagram skill as well, install the plugin: claude plugin marketplace add ahmedkhaleel2004/gitdiagram, then claude plugin install gitdiagram@gitdiagram.
What does GitDiagram do?
It builds an interactive architecture diagram of a public GitHub repository, with an explanation and the Mermaid source. Through the MCP server, an agent can request the same.
Do I need an API key to use it from an agent?
No, the hosted server needs no key or sign-in. Keys matter only for a local run: Bun, Cloudflare R2, Upstash Redis and an OpenAI or OpenRouter key.