Repo of the Day
idosal/git-mcp
Published: Apr 17, 2025
Open repository ↗Put an end to code hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project
Summary
GitMCP is an open-source, remote Model Context Protocol (MCP) server that exposes any public GitHub repository as a documentation source for AI coding assistants such as Cursor, Claude Desktop, Windsurf, VS Code, Cline, and Highlight AI. It fetches documentation (preferring an llms.txt file, then an AI-optimized docs view, then README.md) and exposes tools for fetching, searching, and code lookup so assistants can answer questions against up-to-date project content.
What it is useful for
It addresses a recurring problem with LLM-based assistants: hallucinated or stale answers about libraries that are new, niche, or changing quickly. By pointing the assistant at a specific repository like gitmcp.io/microsoft/typescript or a GitHub Pages site like langchain-ai.gitmcp.io/langgraph, the assistant can pull authoritative docs and code examples at query time. The dynamic endpoint gitmcp.io/docs lets the assistant pick the repository on the fly, which is useful when working across many libraries. Documented limitations include reliance on publicly accessible GitHub content, dependency on the target repo having a usable llms.txt or README, respect for robots.txt on GitHub Pages, and the "as is" warranty disclaimer in the README.
How engineers can use it
For end users, no installation is required; the service runs in the cloud. The README documents MCP configuration snippets per assistant. For Cursor, add the following to ~/.cursor/mcp.json:
{
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}
For Claude Desktop, the documented config uses npx mcp-remote https://gitmcp.io/{owner}/{repo}. Replace {owner} and {repo} with the target project, or use https://gitmcp.io/docs for repository-agnostic queries. The server exposes tools named fetch_<repo-name>_documentation, search_<repo-name>_documentation, search_<repo-name>_code, and fetch_url_content, which the assistant invokes to answer questions.
For local development, the README lists cloning the repo, running pnpm install, then npm run dev or pnpm dev, and testing with the MCP Inspector via npx @modelcontextprotocol/inspector against http://localhost:5173/docs. The project is Apache-2.0 licensed and can be self-hosted.