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
Setup instructions
Provider
Ido Salomon
Release date
Apr 04, 2025
Language
TypeScript
Stats
6.3K stars

GitMCP is a free, open-source Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub for AI tools. It enables AI assistants like Cursor to access up-to-date documentation and code directly from GitHub repositories, eliminating code hallucinations and providing accurate information even for libraries the AI hasn't encountered before.

Getting Started

Choose Your Server Type

Select one of these URL formats based on what you want to connect to:

  • For GitHub repositories: gitmcp.io/{owner}/{repo}
  • For GitHub Pages sites: {owner}.gitmcp.io/{repo}
  • For dynamic access to any repository: gitmcp.io/docs

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

Connect Your AI Assistant

Connecting Cursor

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

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

Connecting Claude Desktop

In Claude Desktop, go to Settings > Developer > Edit Config and use:

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

Connecting Windsurf

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

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

Connecting VSCode

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

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

Connecting Cline

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

Connecting Highlight AI

  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}

Connecting Augment Code

Add a new MCP server with the following configuration:

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

Connecting Msty AI

  1. Open Msty Studio
  2. Go to Tools > Import Tools from JSON Clipboard
  3. Paste the following configuration:
{
  "mcpServers": {
    "git-mcp Docs": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://gitmcp.io/{owner}/{repo}"
      ]
    }
  }
}

How It Works

GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol, allowing your AI to access additional information when needed:

  1. You provide the GitMCP URL to your AI assistant
  2. You prompt the AI with documentation or code-related questions
  3. The AI sends requests to GitMCP (with your approval)
  4. GitMCP retrieves the requested data from GitHub
  5. Your AI receives the information and generates accurate responses

Available Tools

GitMCP provides several tools to AI assistants:

  • fetch_<repo-name>_documentation: Gets the primary documentation from a repository
  • search_<repo-name>_documentation: Searches through documentation with specific queries
  • fetch_url_content: Retrieves content from links mentioned in documentation
  • search_<repo-name>_code: Searches through code in the repository

Usage Examples

Example 1: 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.

Prompt to Claude:

"How do I use the Playwright MCP"

Example 2: 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.

Prompt to Cursor:

"Add memory to my LangGraph agent"

Example 3: Using the dynamic endpoint

The generic gitmcp.io/docs endpoint allows AI to pick the GitHub project dynamically.

Prompt to any AI assistant:

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

Adding a GitMCP Badge

Add this to your README.md to showcase your documentation access through GitMCP:

[![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.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "gitmcp" '{"url":"https://gitmcp.io/{owner}/{repo}"}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

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

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

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