MCP ConfigsMar 30, 2026·2 min read

GitMCP — Remote MCP Server for Any GitHub Repo

Free remote MCP server that gives AI agents context from any GitHub project. Eliminates code hallucinations by providing real README, docs, and code. Zero setup. 7.8K+ stars.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Stage only
Trust
Trust: Established
Entrypoint
GitMCP — Remote MCP Server for Any GitHub Repo
Safe staging command
npx -y tokrepo@latest install 32ef0d9f-3202-4411-9f4a-f24fed4801eb --target codex

Stages files first; activation requires review of the staged README and plan.

TL;DR
Turn any GitHub repo into a remote MCP server by replacing github.com with gitmcp.io in the URL.
§01

What it is

GitMCP is a service that transforms any public GitHub repository into a remote MCP server. Instead of cloning a repository and parsing its docs locally, you replace github.com with gitmcp.io in the repo URL, and GitMCP serves the repository's README, documentation, and file structure as MCP resources that AI agents can consume directly.

This is useful when an AI agent needs context from a library or framework's documentation to generate correct code. Instead of the developer pasting documentation into the chat, the agent connects to the GitMCP endpoint and reads the docs as structured MCP resources.

§02

How it saves time or tokens

Manually pasting documentation into AI chat contexts is tedious and often incomplete. You might paste the README but miss the API reference, or paste too much irrelevant content that wastes tokens. GitMCP provides the AI agent with direct, structured access to the entire repository's documentation, letting it pull exactly the pages it needs.

The service also eliminates the need to set up local MCP servers for documentation access. Instead of running a local server process for each library you work with, you add a single remote MCP endpoint and GitMCP handles serving any GitHub repo on demand.

§03

How to use

  1. Take any GitHub repo URL and replace github.com with gitmcp.io:
  • https://github.com/facebook/react becomes https://gitmcp.io/facebook/react
  1. Add the endpoint to your MCP client configuration:

```json

{

"mcpServers": {

"react": {

"command": "npx",

"args": ["mcp-remote", "https://gitmcp.io/facebook/react"]

}

}

}

```

  1. The AI agent can now query React's documentation as MCP resources.
§04

Example

Connecting to multiple library docs simultaneously:

{
  "mcpServers": {
    "react": {
      "command": "npx",
      "args": ["mcp-remote", "https://gitmcp.io/facebook/react"]
    },
    "next": {
      "command": "npx",
      "args": ["mcp-remote", "https://gitmcp.io/vercel/next.js"]
    },
    "tailwind": {
      "command": "npx",
      "args": ["mcp-remote", "https://gitmcp.io/tailwindlabs/tailwindcss"]
    }
  }
}

What the AI agent can access through GitMCP:

ResourceDescription
README.mdRepository's main documentation
docs/ directoryDocumentation files if present
File listingsBrowse repository structure
Specific filesRead any file by path
Package metadatapackage.json, Cargo.toml, pyproject.toml
§05

Related on TokRepo

§06

Common pitfalls

  • Using GitMCP with private repositories. GitMCP only works with public GitHub repositories. Private repos require authentication that the service does not currently support. For private repos, set up a local MCP server with GitHub API credentials.
  • Adding too many GitMCP endpoints simultaneously. Each endpoint adds to the AI's context window. If you connect 10 library docs at once, the agent may not effectively use any of them due to context overflow. Connect only the libraries relevant to your current task.
  • Expecting real-time updates. GitMCP may cache repository content. If a library just released a major update, the cached docs might be stale. For time-sensitive documentation needs, check the library's website directly.

Frequently Asked Questions

How does GitMCP work under the hood?+

GitMCP runs as a hosted service that fetches repository content from GitHub's API when an MCP client connects. It parses the repo's README, documentation directories, and file structure, then serves them as MCP resources. The mcp-remote npm package handles the MCP protocol communication between your local client and the GitMCP server.

Is GitMCP free to use?+

Yes. GitMCP is a free service for public repositories. Since it reads from public GitHub repos, there are no authentication or subscription requirements. However, the service has rate limits to prevent abuse. For heavy usage, consider caching the documentation locally.

Can I use GitMCP with GitLab or Bitbucket repositories?+

GitMCP is currently designed for GitHub repositories. It relies on GitHub's API and URL structure. For GitLab or Bitbucket repos, you would need a similar service built for those platforms or a local MCP server that can access those hosting services.

Which AI clients support remote MCP servers?+

Any MCP client that supports the mcp-remote transport can use GitMCP. This includes Claude Desktop, Claude Code, Cursor, and other editors with MCP support. The mcp-remote npm package bridges local MCP clients with remote MCP servers over HTTP.

Does GitMCP parse documentation beyond the README?+

Yes. GitMCP can serve any file from the repository, including documentation directories (docs/, doc/), configuration files (package.json, tsconfig.json), and source files. The AI agent can request specific files by path, enabling deep dives into library internals when needed.

Citations (3)
🙏

Source & Thanks

Created by Ido Salomon. Licensed under MIT. idosal/git-mcp — 7,800+ GitHub stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets