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.
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.
npx -y tokrepo@latest install 32ef0d9f-3202-4411-9f4a-f24fed4801eb --target codexStages files first; activation requires review of the staged README and plan.
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.
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.
How to use
- Take any GitHub repo URL and replace
github.comwithgitmcp.io:
https://github.com/facebook/reactbecomeshttps://gitmcp.io/facebook/react
- Add the endpoint to your MCP client configuration:
```json
{
"mcpServers": {
"react": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/facebook/react"]
}
}
}
```
- The AI agent can now query React's documentation as MCP resources.
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:
| Resource | Description |
|---|---|
| README.md | Repository's main documentation |
| docs/ directory | Documentation files if present |
| File listings | Browse repository structure |
| Specific files | Read any file by path |
| Package metadata | package.json, Cargo.toml, pyproject.toml |
Related on TokRepo
- AI Tools for Coding — Browse AI coding tools that consume documentation through MCP.
- AI Tools for Documentation — Explore documentation tools and doc-as-code approaches.
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
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.
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.
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.
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.
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)
- GitMCP GitHub Repository— GitMCP turns GitHub repos into remote MCP servers
- MCP Documentation— Model Context Protocol for AI tool integration
- npm Registry— mcp-remote package for remote MCP server connections
Related on TokRepo
Source & Thanks
Created by Ido Salomon. Licensed under MIT. idosal/git-mcp — 7,800+ GitHub stars
Discussion
Related Assets
Exa MCP Server — Remote Search Tools for Agents
Exa MCP Server connects clients to Exa’s hosted web/code search tools via a remote MCP URL, with simple config for Cursor, VS Code, Claude Code, and Codex.
google-tag-manager-mcp-server — GTM MCP Remote Connector
Connect Google Tag Manager to MCP clients via an OAuth-backed remote server using mcp-remote + npx. Verified 152★; pushed 2026-05-14.
WinRemote MCP — Remote Windows Control Server
WinRemote MCP is a Windows MCP server you run on the target machine, exposing desktop automation, process control, and file operations to MCP clients.
Awesome Remote MCP Servers — Directory of Hosted MCPs
Hosted MCP server directory: copy/paste server URLs with no local installs. Includes a Claude Code HTTP/SSE installation guide.