Git (GitHub to MCP) MCP server

Transform any GitHub project into a remote MCP endpoint, enabling AI assistants to access and understand the project's documentation effortlessly.
Back to servers
Provider
Ido Salomon
Release date
Apr 04, 2025
Language
TypeScript
Stats
1.8K stars

GitMCP is a free, open-source Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub for AI assistants. It allows tools like Cursor to access up-to-date documentation and code directly from the source, eliminating hallucinations and improving code accuracy.

Installation

Step 1: Choose Your Server Type

Select one of these URL formats based on your needs:

  • For GitHub repositories: gitmcp.io/{owner}/{repo}
  • For GitHub Pages sites: {owner}.gitmcp.io/{repo}
  • For a dynamic tool supporting any repository: gitmcp.io/docs

Replace {owner} with the GitHub username or organization name, and {repo} with the repository name.

Step 2: Connect Your AI Assistant

Cursor Configuration

Update your Cursor configuration file at ~/.cursor/mcp.json:

{
  "mcpServers": {
    "gitmcp": {
      "url": "https://gitmcp.io/{owner}/{repo}"
    }
  }
}

Claude Desktop Configuration

  1. In Claude Desktop, go to Settings > Developer > Edit Config
  2. Replace the configuration with:
{
  "mcpServers": {
    "gitmcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://gitmcp.io/{owner}/{repo}"
      ]
    }
  }
}

Windsurf Configuration

Update your Windsurf configuration file at ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "gitmcp": {
      "serverUrl": "https://gitmcp.io/{owner}/{repo}"
    }
  }
}

VSCode Configuration

Update your VSCode configuration file at .vscode/mcp.json:

{
  "servers": {
    "gitmcp": {
      "type": "sse",
      "url": "https://gitmcp.io/{owner}/{repo}"
    }
  }
}

Cline Configuration

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": []
    }
  }
}

Highlight AI Configuration

  1. Open Highlight AI and click the plugins icon (@ symbol) in the sidebar
  2. Click Installed Plugins at the top of the sidebar
  3. Select Custom Plugin
  4. Click Add a plugin using a custom SSE URL
  • Plugin name: gitmcp
  • SSE URL: https://gitmcp.io/{owner}/{repo}

How It Works

GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol (MCP):

  1. You provide the GitMCP URL to your AI assistant
  2. Prompt the AI assistant with documentation/code-related questions
  3. Your AI sends requests to GitMCP to use its tools (with your approval)
  4. GitMCP executes the AI's request and returns the requested data
  5. Your AI receives the information and generates a more accurate response

Supported Documentation

GitMCP currently supports:

  1. llms.txt
  2. AI-optimized version of the project's documentation
  3. README.md/root

Usage Examples

Using Windsurf with a Specific Repository

For the GitHub repository https://github.com/microsoft/playwright-mcp, add https://gitmcp.io/microsoft/playwright-mcp as an MCP server to Windsurf.

Example prompt to Claude:

"How do I use the Playwright MCP"

Using Cursor with a GitHub Pages Site

For the GitHub Pages site langchain-ai.github.io/langgraph, add https://langchain-ai.gitmcp.io/langgraph as an MCP server to Cursor.

Example prompt to Cursor:

"Add memory to my LangGraph agent"

Using Claude Desktop with the Dynamic Endpoint

With the generic gitmcp.io/docs endpoint, the AI can pick the GitHub project on the fly.

Example prompt:

"I want to learn about the OpenAI Whisper speech recognition model. Explain how it works."

Available Tools

GitMCP provides several tools to AI assistants:

fetch_<repo-name>_documentation

Gets the primary documentation from a GitHub repository.

When it's useful: For general questions about a project's purpose, features, or how to get started

search_<repo-name>_documentation

Lets the AI search through a repository's documentation by providing a specific search query.

When it's useful: For specific questions about particular features, functions, or concepts

fetch_url_content

Helps the AI get information from links mentioned in the documentation.

When it's useful: When documentation references external information that would help answer your question

search_<repo-name>_code

Searches through the actual code in the repository using GitHub's code search.

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, and search_generic_documentation) and need additional information about which repository to access.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later