Data as of

GitMCP for Claude Code: Setup & Config

GitMCP turns public GitHub repositories and GitHub Pages projects into documentation sources for Claude Code.

What you can do with GitMCP in Claude Code

Ground coding questions in public GitHub documentation and code without repository-side setup.

  • Find implementation examples in public project code.
  • Switch between repository documentation sources through the dynamic endpoint.
  • Follow external references mentioned in project documentation.

Before you start: GitMCP in Claude Code

  • An MCP-compatible client
  • A public GitHub repository or GitHub Pages project
  • npx when using the documented local bridge

Replace {owner} and {repo} with the desired public project's identifiers. This command is the README's bridge configuration, not a locally hosted GitMCP server. Direct SSE clients can use the URL; https://gitmcp.io/docs is the documented dynamic alternative. Tool names for repository-specific access are reproduced as shown in the supplied README.

GitMCP Claude Code configuration

  1. Choose Claude Code configuration scope

    For GitMCP, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add GitMCP to Claude Code

    Use the git-mcp entry below in mcpServers. Keep GitMCP's documented sse connection fields and your other Claude Code entries.

  3. Check GitMCP in Claude Code

    GitMCP: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "git-mcp": {
      "type": "sse",
      "url": "https://gitmcp.io/%7Bowner%7D/%7Brepo%7D"
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'git-mcp' '{"type":"sse","url":"https://gitmcp.io/%7Bowner%7D/%7Brepo%7D"}'

GitMCP tools available to Claude Code

GitMCP's stored tool list documents 7 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

fetch__documentation

For GitMCP's fetch__documentation, review the permission request and arguments in Claude Code before approval.

search__documentation

For GitMCP's search__documentation, review the permission request and arguments in Claude Code before approval.

fetch_url_content

For GitMCP's fetch_url_content, review the permission request and arguments in Claude Code before approval.

Read linked reference content in a format suitable for an assistant.

search__code

For GitMCP's search__code, review the permission request and arguments in Claude Code before approval.

Find repository implementation examples through GitHub code search.

fetch_generic_documentation

For GitMCP's fetch_generic_documentation, review the permission request and arguments in Claude Code before approval.

Fetch documentation for a specified repository through the dynamic endpoint.

search_generic_code

For GitMCP's search_generic_code, review the permission request and arguments in Claude Code before approval.

search_generic_documentation

For GitMCP's search_generic_documentation, review the permission request and arguments in Claude Code before approval.

Search documentation for a selected repository through the generic server.

GitMCP: full stored tool descriptions

Troubleshooting GitMCP in Claude Code

  • Inspect claude mcp list, then GitMCP's connection to gitmcp.io in /mcp. Complete Claude Code authentication only for a trusted service.
  • GitMCP: check sse connectivity to gitmcp.io from Claude Code; a stdio command is not a replacement for this endpoint.
  • Transport mismatch: GitMCP's catalog lists stdio; the displayed Claude Code configuration uses sse.
  • Known limitation: Access is limited to publicly available content.
  • Known limitation: The generic endpoint depends on choosing the intended repository correctly.
  • Known limitation: GitHub Pages retrieval follows robots.txt restrictions.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

GitMCP — details. Claude Code guide

Frequently asked questions

Register GitMCP with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.