
How to add GitMCP to Cursor
Free remote MCP that turns any GitHub repo into a live documentation source to cut hallucinations. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 4.5k★ · sse · no auth
Cursor config for GitMCP
Connect client to https://gitmcp.io/{owner}/{repo} (or https://gitmcp.io/docs){
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/docs"
}
}
}Remote server — no local install needed. Restart the client after saving the config.
Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the GitMCP config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of GitMCP's tools to confirm it's connected.
Before you start
- An MCP-capable client (Cursor, Claude Desktop, Claude Code, Windsurf, VS Code, Cline, Highlight AI, Augment Code, Msty, etc.)
- A public GitHub repository or GitHub Pages site to point at (private repos are not supported)
- No account, API key, or token required — the service is free and unauthenticated
What GitMCP can do in Cursor
fetch_<repo>_documentationRetrieves the primary documentation (llms.txt, then README/docs) for a specific repo endpoint.
search_<repo>_documentationSemantic/keyword search across a repo's documentation for a given query.
search_<repo>_codeSearches the repository's actual source code via GitHub code search.
fetch_url_contentFetches the content of a URL/link referenced inside the documentation.
fetch_generic_documentationGeneric-endpoint variant (gitmcp.io/docs) that fetches docs for a repo named at query time.
search_generic_documentationGeneric-endpoint variant that searches docs for any specified owner/repo.
search_generic_codeGeneric-endpoint variant that searches code for any specified owner/repo.
Security
This is a third-party hosted service that fetches public GitHub content on your behalf; it should only be pointed at repositories whose docs you trust. No credentials are sent, so private repos are not supported.
GitMCP + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the GitMCP config there under the "mcpServers" key and restart the client.
Is GitMCP safe to use with Cursor?
This is a third-party hosted service that fetches public GitHub content on your behalf; it should only be pointed at repositories whose docs you trust. No credentials are sent, so private repos are not supported.
Does GitMCP require an API key or GitHub token?
No. It is free and unauthenticated, reading only public GitHub content on demand. Private repositories are not supported.
What's the difference between the repo URL and the gitmcp.io/docs endpoint?
A repo URL (gitmcp.io/owner/repo) is locked to one project and is slightly more secure; gitmcp.io/docs is a dynamic endpoint where the model chooses the repo at query time, which is more flexible.
How does it decide what documentation to serve?
It prioritizes an `llms.txt` file if the repository provides one, then falls back to README.md and other documentation in the repo.