A free and open-source remote MCP server that transforms any GitHub project into a documentation hub, enabling AI tools to access the latest documentation and code, eliminating code hallucinations.
GitMCP Project Details
🚀 Project Overview
GitMCP is a free, open-source remote Model Context Protocol (MCP) server that can transform any GitHub project (repository or GitHub Pages) into a documentation hub. It enables AI tools like Cursor to access the latest documentation and code, even if the LLM has never encountered this content, thereby seamlessly eliminating code hallucinations.
Core Features
- 😎 Latest Documentation for Any GitHub Project: Provides AI assistants with seamless access to GitHub project documentation and code, with built-in smart search to help AI find the exact content it needs.
- 🧠 Eliminate Hallucinations: With GitMCP, AI assistants can provide accurate and relevant answers.
- ☁️ Zero Configuration: GitMCP runs in the cloud; simply add the GitMCP URL as an MCP server in your IDE.
- 💬 Embedded Chat: Chat directly with repository documentation via an in-browser chat.
- ✅ Open, Free, and Private: Completely open-source and free to use, does not collect personal information or store queries, and supports self-hosting.
🛠️ How It Works
GitMCP connects AI assistants and GitHub repositories using the Model Context Protocol (MCP) standard, which allows AI tools to request additional information from external sources.
Workflow:
- Provide the GitMCP URL to your AI assistant (e.g.,
gitmcp.io/microsoft/typescript
). - GitMCP exposes tools such as documentation fetching, smart search, and code search.
- Ask your AI assistant questions related to documentation/code.
- The AI assistant sends a request to GitMCP to use its tools (requires your approval).
- GitMCP executes the AI's request and returns the required data.
- The AI assistant receives the information and generates more accurate, grounded responses, free from hallucinations.
📋 Supported Document Formats
GitMCP currently supports the following documentation formats in order of priority:
llms.txt
- AI-optimized version of project documentationREADME.md
- Other documents in the
/root
directory
🔧 Configuration
URL Format Options
Choose one of the following URL formats based on what you need to connect to:
- GitHub Repository:
gitmcp.io/{owner}/{repo}
- GitHub Pages Website:
{owner}.gitmcp.io/{repo}
- General Tool (supports any repository, dynamic):
gitmcp.io/docs
AI Tool Configuration Examples
Cursor Configuration
Update the ~/.cursor/mcp.json
file:
{
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}
Claude Desktop Configuration
Replace the configuration in Settings > Developer > Edit Configuration:
{
"mcpServers": {
"gitmcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://gitmcp.io/{owner}/{repo}"
]
}
}
}
Windsurf Configuration
Update the ~/.codeium/windsurf/mcp_config.json
file:
{
"mcpServers": {
"gitmcp": {
"serverUrl": "https://gitmcp.io/{owner}/{repo}"
}
}
}
🔨 Available Tools
1. Fetch Documentation (fetch_documentation
)
Fetches primary documentation from a GitHub repository, retrieving relevant documents (like llms.txt
) to provide AI with a project overview.
Use Case: General questions about the project's purpose, features, or getting started guides.
2. Search Documentation (search_documentation
)
Allows AI to search within repository documentation using a specific search query, employing smart search to find relevant sections instead of loading all documentation.
Use Case: Specific questions about a particular feature, function, or concept within the project.
3. Fetch Link Content (fetch_link_content
)
Helps AI retrieve information from links mentioned in the documentation, fetching the content of these links and converting them into an AI-readable format.
Use Case: When documentation references external information that would help answer a question.
4. Search Code (search_code
)
Uses GitHub's code search functionality to search within the actual code of the repository, helping AI find specific code examples or implementation details.
Use Case: When implementation examples or technical details not covered in documentation are needed.
📊 Badge Integration
GitMCP provides repository badges, allowing users to quickly access documentation via their IDE or browser, and displays the number of times documentation has been accessed via GitMCP.
Add Badge
Add the following code to your README.md:
[](https://gitmcp.io/OWNER/REPO)
Badge Customization Parameters
Parameter | Description | Default Value | Example |
---|---|---|---|
color |
Badge value color | aquamarine | ?color=green |
label |
Badge label | GitMCP | Documentation |
🛡️ Privacy & Security
- Privacy Commitment: GitMCP is deeply committed to user privacy, requires no authentication, and cannot access or store any personally identifiable information.
- Queries Not Stored: Does not store any queries sent by the agent.
- Open Source Transparency: As an open-source project, it can be deployed independently in your environment.
- On-Demand Access: Only accesses publicly available content, and only when queried by the user.
- Adherence to Rules: Checks
robots.txt
rules before accessing GitHub Pages websites and adheres to instructions set by the website owner.
🚦 Usage Limitations
GitMCP only accesses content when queried; it does not automatically crawl repositories. For GitHub Pages websites, it checks and adheres to robots.txt
rules, allowing website owners to opt out. GitMCP does not permanently store data about GitHub projects or their content.
💻 Development & Contribution
Local Run
# Clone the repository
git clone https://github.com/idosal/git-mcp.git
cd git-mcp
# Install dependencies
pnpm install
# Run locally for development
npm run dev # or pnpm dev
MCP Inspector Tool
# Install the MCP Inspector tool
npx @modelcontextprotocol/inspector
In the Inspector interface:
- Set transfer type to
SSE
- Enter the GitMCP URL (e.g.,
http://localhost:5173/docs
) - Click "Connect"
📄 License
This project is licensed under the Apache License 2.0.
⚠️ Disclaimer
GitMCP is provided "as-is" without warranties of any kind. While we strive to ensure the reliability and security of the service, we are not liable for any damages or issues that may arise from its use. GitHub projects accessed through GitMCP are subject to their respective owners' terms and conditions. GitMCP is not affiliated with GitHub or any mentioned AI tools.