How idosal/git-mcp works
GitMCP is a hosted MCP documentation service with a repository-specific or generic-server workflow: an AI assistant requests documentation or code tools, GitMCP resolves the repository and dispatches tools, and retrieval returns source material. Its web app also offers embedded chat and server configuration. The graph preserves documented search and specialized repository capabilities; several route and handler implementations were not sampled, so those links are marked unverified rather than inferred as direct calls.
Main entry points: commonTools.ts Documentation Tools · index.ts MCP Request Server · handlers.ts Handler Dispatch · ThreejsRepoHandler.ts Three.js Tools
Components 27
MCP Serving
- MCP Request Server
src/index.ts - Tool Registry
src/api/tools/index.ts - Handler Dispatch
src/api/tools/repoHandlers/handlers.ts - Handler Contract
src/api/tools/repoHandlers/RepoHandler.ts - Repository Tools
src/api/tools/repoHandlers/DefaultRepoHandler.ts - Generic Tools
src/api/tools/repoHandlers/GenericRepoHandler.ts - React Router Tools
src/api/tools/repoHandlers/ReactRouterRepoHandler.ts - Three.js Tools
src/api/tools/repoHandlers/ThreejsRepoHandler.ts
Repository Retrieval
- Documentation Tools
src/api/tools/commonTools.ts - GitHub Fetch
src/api/utils/github.ts - GitHub API Client
src/api/utils/githubClient.ts - Robots Checks
src/api/utils/robotsTxt.ts - Vector Search
src/api/utils/vectorStore.ts - Three.js Docs
src/api/tools/repoHandlers/threejs/utils.ts
Web Experience
- Landing Page
app/routes/_index.tsx - Repository Content UI
app/components/content.tsx - Chat Endpoint
app/routes/api.chat.ts - Embedded Chat UI
app/chat/components/chat.tsx - Server Manager
app/chat/components/mcp-server-manager.tsx - AI Providers
app/chat/ai/providers.shared.ts
Shared Services
- Repository Resolution
src/shared/repoData.ts - Retrieval Cache
src/api/utils/cache.ts - Browser State
app/chat/lib/hooks/use-local-storage.ts - Project Badge
src/api/utils/badge.ts
Other components
- AI Assistant
- GitHub
- Web User
Connections 30
- AI Assistant → MCP Request Server: requests tools
- MCP Request Server → Tool Registry: registers tools
src/index.ts - MCP Request Server → Repository Resolution: resolves repository
src/index.ts - Tool Registry → Handler Dispatch: selects handlers
src/api/tools/index.ts - Handler Dispatch → Repository Tools: dispatches to
- Handler Dispatch → Generic Tools: dispatches to
- Handler Dispatch → React Router Tools: dispatches to
- Handler Dispatch → Three.js Tools: dispatches to
- Repository Tools → Documentation Tools: calls tools
src/api/tools/repoHandlers/DefaultRepoHandler.ts - Generic Tools → Documentation Tools: calls tools
src/api/tools/repoHandlers/GenericRepoHandler.ts - React Router Tools → Documentation Tools: calls tools
src/api/tools/repoHandlers/ReactRouterRepoHandler.ts - Three.js Tools → Documentation Tools: searches docs
src/api/tools/repoHandlers/ThreejsRepoHandler.ts - Three.js Tools → Three.js Docs: fetches references
src/api/tools/repoHandlers/ThreejsRepoHandler.ts - Documentation Tools → GitHub Fetch: fetches files
src/api/tools/commonTools.ts - Documentation Tools → GitHub API Client: searches code
src/api/tools/commonTools.ts - Documentation Tools → Robots Checks: checks access
src/api/tools/commonTools.ts - Documentation Tools → Retrieval Cache: reads and writes
src/api/tools/commonTools.ts - GitHub Fetch → GitHub API Client: uses client
src/api/utils/github.ts - GitHub API Client → GitHub: requests content
- GitHub Fetch → GitHub: fetches repository
- Documentation Tools → Vector Search: searches vectors
- MCP Request Server → AI Assistant: returns results
- Web User → Landing Page: opens site
- Landing Page → Repository Content UI: shows repository docs
- Web User → Embedded Chat UI: starts chat
- Embedded Chat UI → Chat Endpoint: sends messages
- Embedded Chat UI → AI Providers: selects provider
- Server Manager → Browser State: persists settings
- Web User → Server Manager: configures servers
- MCP Request Server → Project Badge: serves badge
src/index.ts