# GitDiagram — MCP server card for AI agents

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

Registry name: `com.gitdiagram/gitdiagram` · category: Git, GitHub and code review · version 1.0.0 · updated 2026-09-29

## Connect
- Remote (Claude Code): `claude mcp add --transport http gitdiagram https://gitdiagram.com/mcp`

## Facts
- Repository: https://github.com/ahmedkhaleel2004/gitdiagram (18,979 stars)
- Website: https://gitdiagram.com

Before you connect a server: read its repository, and give it only the permissions and keys it needs.

## Links
- AgentGid page: https://agentgid.com/mcp/servers/com-gitdiagram-gitdiagram/


## GitDiagram: architecture diagrams of public code projects

GitDiagram turns a public GitHub project into a diagram of its main parts and how they connect, with a short written explanation. Its MCP server lets your AI assistant fetch that diagram in a chat, free and without sign-in, so you understand a project before reading its code.

### Where to use it
- Get the big picture of a new project: Before you dig into an unfamiliar open-source project, ask your assistant how it is put together and get its main parts and their links.
- A diagram for your docs or slides: Take the diagram's source text and paste it into a README or a doc that draws diagrams, or export a picture from the site.
- Find a project's exact name: You remember "langchain" but not who owns it. The assistant searches GitDiagram's library by name and gets the right one.
- Open the code behind each box: Every part in the diagram links to its folder or file on GitHub, so you go straight from the picture to the code.
- A one-minute video about a project: Get a short narrated video and its full transcript to share with people who would rather watch than read, when one already exists.
- Compare two libraries before choosing: Ask for the diagrams of two candidate libraries side by side to see which one is simpler before you pick it for your app. (idea, not from the official pages)

### How to start
- Add the server to your AI app; there is no key and no sign-in (Claude Code shown, Codex below).

```
claude mcp add --transport http gitdiagram https://gitdiagram.com/mcp
```

- In other apps, add a remote server with the same address.
- Ask about a public project by owner and name.

### License
Calling the server is free and needs no account. GitDiagram's own code is under the MIT license; the pages we read do not state terms for reusing the diagrams it makes.

### Good to know
- Public projects only. Private code can be diagrammed on the website with your own GitHub token, not through the server.
- It returns only diagrams GitDiagram has already made. For a new project you get a link that makes one when opened in a browser.
- All tools only read; nothing is written, deleted or paid for.
- There is a usage cap per network, by default 120 calls an hour.
- The search matches project names only, not code or file contents.

Checked 2026-11-10 against: https://gitdiagram.com, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/README.md, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/LICENSE, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/server.json, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/server/mcp/server.ts, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/server/mcp/handler.ts, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/server/mcp/usage.ts, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/server/mcp/format.ts, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/app/mcp/route.ts, https://github.com/ahmedkhaleel2004/gitdiagram/blob/d2637eb8f88f800d2827c65a089e1d82fd417ce0/src/lib/video-flag.ts, https://registry.modelcontextprotocol.io/v0/servers/com.gitdiagram%2Fgitdiagram/versions/latest

### Mistakes to avoid
- Don't: Passing only a project name like "next.js" to get_repository_diagram → Do: Find the exact owner/repo with find_repository_diagrams first, then pass "vercel/next.js" or a github.com URL (The diagram tool takes "owner/repo" or a GitHub URL; the search tool exists to look the name up.)
- Don't: Asking it about a private repository → Do: Use the site's Private Repos option with your own GitHub token, or a server that reads your code directly (The server answers for public repositories only.)
- Don't: Using find_repository_diagrams to search code for a function name → Do: Search by owner or project name only (It matches parts of "owner/repo", not code or file contents.)
- Don't: Treating an old diagram as current → Do: Check the date shown with the diagram and open the link to regenerate it when the project changed a lot (The tool returns the stored diagram with the day it was generated, not a fresh one.)

### Questions
- Do I need an account or a key? No. The server is public, read-only and needs no key or sign-in.
- What if the project has no diagram yet? The tool says so, suggests similar projects that have one, and gives a link that makes a diagram when you open it.
- Can it make a new video? No. get_explainer_video only returns a video that already exists; making new videos is in early access on the site.
- Can I use it without an AI app? Yes. Add .md to a diagram address, like gitdiagram.com/owner/repo.md, to get the Markdown version.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
