GitMCP
Transforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
What is GitMCP?
GitMCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to transforms any github repository or github pages site into a documentation hub for ai assistants using the model context protocol. it allows ai tools to access real-time code and documentation to prev...
Transforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Transforms any GitHub repository or GitHub Pages site into a
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx gitmcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use GitMCP
GitMCP is a zero-configuration MCP server that turns any public GitHub repository or GitHub Pages site into a live documentation hub for AI assistants. By pointing your MCP client at a gitmcp.io URL for a specific repo, your AI gets real-time access to that project's README, llms.txt, and codebase search — preventing hallucinations about API surface, correct usage patterns, and library versions when helping you write code against that dependency.
Prerequisites
- An MCP-compatible client such as Claude Desktop, Cursor, Windsurf, or Cline
- Node.js 18+ and npx for local transport mode (optional, since GitMCP also works as a remote HTTP server)
- The GitHub owner and repository name of the library you want to connect (e.g. 'facebook/react')
- No API keys required — GitMCP is a free public service for open-source repositories
Identify the repository you want to connect
GitMCP works with any public GitHub repository. Determine the owner and repo name (e.g. 'vercel/next.js' or 'anthropics/anthropic-sdk-python') that you want your AI to have real-time documentation access to.
Add GitMCP to your MCP client for a specific repository
For Claude Desktop, use the npx mcp-remote transport to connect to the GitMCP remote server for your chosen repository. Replace {owner} and {repo} with the actual values.
{
"mcpServers": {
"nextjs-docs": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/vercel/next.js"]
}
}
}Connect multiple repositories (optional)
You can add multiple GitMCP entries to your config — one per repository you frequently work with. Each gets its own named entry in mcpServers.
{
"mcpServers": {
"react-docs": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/facebook/react"]
},
"anthropic-sdk": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/anthropics/anthropic-sdk-python"]
}
}
}Restart your MCP client
Restart Claude Desktop or your chosen client. GitMCP will dynamically generate tools named after the connected repository (e.g. fetch_next_js_documentation, search_next_js_code).
Ask the AI about the connected library
Ask your AI to explain an API, show a usage example, or search the codebase. The assistant will call GitMCP tools to retrieve current, accurate documentation rather than relying on training data.
GitMCP Examples
Client configuration
Claude Desktop config block connecting GitMCP to the Vercel Next.js repository for live documentation access.
{
"mcpServers": {
"nextjs-docs": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/vercel/next.js"]
}
}
}Prompts to try
Example prompts that leverage live GitHub documentation via GitMCP to get accurate, current answers.
- "How do I set up App Router with middleware in Next.js? Use the actual docs."
- "Search the React codebase for how concurrent rendering is implemented."
- "What's the correct way to use the Anthropic Python SDK to stream a response?"
- "Show me the README for this library and explain the quick-start section."
- "Find all examples in the repository that demonstrate using React hooks with TypeScript."
- "What changed in the latest version of this library based on the changelog?"Troubleshooting GitMCP
npx mcp-remote fails with 'package not found'
Ensure Node.js 18+ and npx are installed. Run 'npm install -g mcp-remote' to install it globally first if npx fails to resolve it automatically. Then retry with the global command.
Tools appear connected but return empty or stale documentation
GitMCP fetches live content from GitHub. If the repository has no README or llms.txt, results may be sparse. For GitHub Pages sites, use the alternate URL format: https://{owner}.gitmcp.io/{repo}. Also verify the repository is public — private repos are not supported.
Windsurf or Cursor shows connection error with gitmcp.io URL
Cursor and Windsurf use a 'url' key rather than 'command'/'args'. Set the server URL directly: { "mcpServers": { "gitmcp": { "url": "https://gitmcp.io/owner/repo" } } }. Windsurf uses 'serverUrl' as the key name instead.
Frequently Asked Questions about GitMCP
What is GitMCP?
GitMCP is a Model Context Protocol (MCP) server that transforms any github repository or github pages site into a documentation hub for ai assistants using the model context protocol. it allows ai tools to access real-time code and documentation to prevent hallucinations and provide accurate api usage It connects AI assistants to external tools and data sources through a standardized interface.
How do I install GitMCP?
Follow the installation instructions on the GitMCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with GitMCP?
GitMCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is GitMCP free to use?
Yes, GitMCP is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
GitMCP Alternatives — Similar Version Control Servers
Looking for alternatives to GitMCP? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
MCP Git Ingest
★ 306Helps AI read GitHub repository structure and important files. Want to quickly understand what a repo is about? Prompt it with 'read https://github.com/adhikasp/mcp-git-ingest and determine how the code technically works'.
Browse More Version Control MCP Servers
Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up GitMCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use GitMCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.