A free, open-source service that transforms GitHub projects into MCP endpoints, enabling AI assistants to access and understand project documentation without any setup.
What is GitMCP • Features • Getting Started • How It Works • Badge • Examples • FAQ • Privacy • Contributing • License
Stop vibe-hallucinating and start vibe-coding!
GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms any GitHub project (repositories or GitHub pages) into a documentation hub. It enables AI tools like Cursor to access up-to-date documentation and code, even if the LLM has never encountered them, thereby eliminating code hallucinations seamlessly.
GitMCP supports two flavors -
gitmcp.io/{owner}/{repo}
or {owner}.gitmcp.io/{repo}
): Use these when you primarily work with a select number of libraries. This ensures your AI assistant always targets the correct project, enhancing security and relevance by preventing access to unintended repositories.gitmcp.io/docs
): Use this for maximum flexibility when you need to switch between different repositories frequently. The AI assistant will prompt you (or decide based on context) which repository to access for each request. Be mindful that this relies on correctly identifying the target repository each time.With GitMCP:
For example, this side-by-side comparison shows the result for the same one-shot prompt in Cursor when creating a three.js scene -
https://github.com/user-attachments/assets/fbf1b4a7-f9f0-4c0e-831c-4d64faae2c45
Using GitMCP is easy! Simply follow these steps:
Choose one of these URL formats depending on what you want to connect to:
gitmcp.io/{owner}/{repo}
{owner}.gitmcp.io/{repo}
gitmcp.io/docs
Replace {owner}
with the GitHub username or organization name, and {repo}
with the repository name.
For your convenience, you can also use the conversion tool on the landing page to format the GitHub URL into an MCP URL!
Select your AI assistant from the options below and follow the configuration instructions:
Update your Cursor configuration file at ~/.cursor/mcp.json
:
{ "mcpServers": { "gitmcp": { "url": "https://gitmcp.io/{owner}/{repo}" } } }
{ "mcpServers": { "gitmcp": { "command": "npx", "args": [ "mcp-remote", "https://gitmcp.io/{owner}/{repo}" ] } } }
Update your Windsurf configuration file at ~/.codeium/windsurf/mcp_config.json
:
{ "mcpServers": { "gitmcp": { "serverUrl": "https://gitmcp.io/{owner}/{repo}" } } }
Update your VSCode configuration file at .vscode/mcp.json
:
{ "servers": { "gitmcp": { "type": "sse", "url": "https://gitmcp.io/{owner}/{repo}" } } }
Update your Cline configuration file at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
:
{ "mcpServers": { "gitmcp": { "url": "https://gitmcp.io/{owner}/{repo}", "disabled": false, "autoApprove": [] } } }
Plugin name: gitmcp
SSE URL: https://gitmcp.io/{owner}/{repo}
For more details on adding custom MCP servers to HighlightAI, refer to the documentation.
Name the MCP server: git-mcp Docs
Use this command:
npx mcp-remote https://gitmcp.io/{owner}/{repo}
Or use the following configuration:
{ "mcpServers": { "git-mcp Docs": { "command": "npx", "args": [ "mcp-remote", "https://gitmcp.io/{owner}/{repo}" ] } } }
For more details on configuring MCP servers in Augment Code, visit the Augment Code documentation.
Note: Remember to replace
{owner}
and{repo}
with the actual GitHub username/organization and repository name. You can also use the dynamic endpointhttps://gitmcp.io/docs
to allow your AI to access any repository on demand.
GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol (MCP), a standard that lets AI tools request additional information from external sources.
What happens when you use GitMCP:
gitmcp.io/microsoft/typescript
). GitMCP exposes tools like documentation fetching, smart search, code search, etc.GitMCP currently supports the following documents (in order of priority):
README.md
/rootHere are some examples of how to use GitMCP with different AI assistants and repositories:
For the GitHub repository https://github.com/microsoft/playwright-mcp
, add https://gitmcp.io/microsoft/playwright-mcp
as an MCP server to Windsurf.
Prompt to Claude:
"How do I use the Playwright MCP"
Windsurf will pull the relevant documentation from GitMCP to implement the memory feature correctly.
For the GitHub Pages site langchain-ai.github.io/langgraph
, add https://langchain-ai.gitmcp.io/langgraph
as an MCP server to Cursor.
Prompt to Cursor:
"Add memory to my LangGraph agent"
Cursor will pull the relevant documentation and code from GitMCP to correctly implement the memory feature.
You don't have to pick specific repositories. The generic gitmcp.io/docs
endpoint allows AI to pick the GitHub project on the fly!
Prompt to any AI assistant:
"I want to learn about the OpenAI Whisper speech recognition model. Explain how it works.
Claude will pull the data from GitMCP and answer the question.
GitMCP provides AI assistants with several valuable tools to help them access, understand, and query GitHub repositories.
fetch__documentation
This tool gets the primary documentation from a GitHub repository. It works by retrieving relevant documentation (e.g., llms.txt
). This gives the AI a good overview of what the project is about
When it's useful: For general questions about a project's purpose, features, or how to get started
search__documentation
This tool lets the AI search through a repository's documentation by providing a specific search query. Instead of loading all the documentation (which could be very large), it uses intelligent search to find just the relevant parts.
When it's useful: For specific questions about particular features, functions, or concepts within a project
fetch_url_content
This tool helps the AI get information from links mentioned in the documentation. It retrieves the content from those links and converts it to a format the AI can easily read.
When it's useful: When documentation references external information that would help answer your question
search__code
This tool searches through the actual code in the repository using GitHub's code search. It helps AI find specific code examples or implementation details.
When it's useful: When you want examples of how something is implemented or need technical details not covered in documentation
Note: When using the dynamic endpoint (
gitmcp.io/docs
), these tools are named slightly differently (fetch_generic_documentation
,search_generic_code
, andsearch_generic_documentation
) and need additional information about which repository to access.
GitMCP has a badge to your repository's README. It allows users to quickly access your documentation through their IDE or browser (using the embedded chat). It also showcases how many times your documentation has been accessed through GitMCP.
Example (idosal/git-mcp
):
Add the following to your README.md
:
undefined
Replace OWNER
with your GitHub username or organization, and REPO
with your repository name.
Increment for each tool call on the specific repository.
You can customize the badge's appearance with parameters:
Parameter | Description | Default | Example |
---|---|---|---|
color | Color for the badge value | aquamarine | ?color=green |
label | Badge label | GitMCP | Documentation |
Please reach out!
The Model Context Protocol is a standard that allows AI assistants to request and receive additional context from external sources in a structured manner, enhancing their understanding and performance.
Yes, GitMCP is compatible with any AI assistant supporting the Model Context Protocol, including tools like Cursor, VSCode, Claude, etc.
Absolutely! GitMCP works with any public GitHub repository without requiring any modifications. It prioritizes the llms.txt
file and falls back to README.md
or other pages if the former is unavailable. Future updates aim to support additional documentation methods and even generate content dynamically.
No, GitMCP is a free service to the community with no associated costs.
GitMCP is deeply committed to its users' privacy. The service doesn't have access to or store any personally identifiable information as it doesn't require authentication. In addition, it doesn't store any queries sent by the agents. Moreover, as GitMCP is an open-source project, it can be deployed independently in your environment.
GitMCP only accesses content that is already publicly available and only when queried by a user. GitMCP does not automatically scrape repositories. Before accessing any GitHub Pages site, the code checks for robots.txt
rules and follows the directives set by site owners, allowing them to opt out. Please note that GitMCP doesn't permanently store data regarding the GitHub projects or their content.
We welcome contributions, feedback, and ideas! Please review our contribution guidelines.
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
Install the MCP Inspector tool:
npx @modelcontextprotocol/inspector
In the inspector interface:
SSE
http://localhost:5173/docs
)This project is licensed under the Apache License 2.0.
GitMCP is provided "as is" without warranty of any kind. While we strive to ensure the reliability and security of our service, we are not responsible 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 of the mentioned AI tools.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!