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
2.8K stars

GitMCP is a remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs for AI assistants. It enables tools like Cursor, Claude, and VSCode to access up-to-date documentation and code directly from GitHub repositories, eliminating code hallucinations and providing accurate information even for libraries the AI has never encountered.

Installation

Setting up GitMCP requires no downloads or installations on your part. You simply need to configure your AI assistant to connect to the appropriate GitMCP URL.

Choose Your GitMCP URL

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 generic endpoint that supports any repository: gitmcp.io/docs

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

Configure 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}

Augment Code Configuration

  1. Open Augment Code settings
  2. Navigate to the MCP section
  3. Add a new MCP server with the following details:
    • Name the MCP server: git-mcp Docs
    • Use this command: npx mcp-remote https://gitmcp.io/{owner}/{repo}

Or use this configuration:

{
  "mcpServers": {
    "git-mcp Docs": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://gitmcp.io/{owner}/{repo}"
      ]
    }
  }
}

Usage

After configuring your AI assistant, you can immediately start using GitMCP without any additional steps.

Using Specific Repository Endpoints

When using gitmcp.io/{owner}/{repo} or {owner}.gitmcp.io/{repo}, your AI assistant will always access documentation from that specific repository. This is ideal when you primarily work with a specific library.

Example: With https://gitmcp.io/microsoft/playwright-mcp configured, you can ask:

  • "How do I use Playwright MCP?"
  • "Show me how to implement authentication in Playwright"

Using the Dynamic Endpoint

When using gitmcp.io/docs, your AI assistant can access any repository on demand. This is useful when you work with multiple libraries.

Example: With https://gitmcp.io/docs configured, you can ask:

  • "Help me use React Router's useNavigate hook"
  • "Show me how to implement a LangGraph agent with memory"

Available Tools

GitMCP provides these tools to your AI assistant:

  1. Documentation Fetching: Retrieves main documentation from the repository
  2. Smart Documentation Search: Searches documentation for relevant information
  3. URL Content Fetching: Gets information from links in the documentation
  4. Code Search: Searches through the repository's code for examples and implementations

Badge Integration

If you want to add GitMCP to your own repository, you can add this badge to your README:

[![GitMCP](https://img.shields.io/endpoint?url=https://gitmcp.io/badge/OWNER/REPO)](https://gitmcp.io/OWNER/REPO)

Replace OWNER with your GitHub username or organization, and REPO with your repository name.

Troubleshooting

If you encounter issues with GitMCP, check these common solutions:

  • Ensure you've properly formatted the GitMCP URL with the correct owner and repository name
  • Verify your AI assistant's configuration file has the correct syntax
  • Make sure you're using a supported AI assistant with MCP capabilities
  • For the dynamic endpoint, be specific about which repository you want information from

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