GitMCP is a remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs for AI assistants. It enables tools like Cursor, Claude, and VSCode to access up-to-date documentation and code directly from GitHub repositories, eliminating code hallucinations and providing accurate information even for libraries the AI has never encountered.
Setting up GitMCP requires no downloads or installations on your part. You simply need to configure your AI assistant to connect to the appropriate GitMCP URL.
Select one of these URL formats based on your needs:
gitmcp.io/{owner}/{repo}
{owner}.gitmcp.io/{repo}
gitmcp.io/docs
Replace {owner}
with the GitHub username or organization name, and {repo}
with the repository name.
Update your Cursor configuration file at ~/.cursor/mcp.json
:
{
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}
{
"mcpServers": {
"gitmcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://gitmcp.io/{owner}/{repo}"
]
}
}
}
Update your Windsurf configuration file at ~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"gitmcp": {
"serverUrl": "https://gitmcp.io/{owner}/{repo}"
}
}
}
Update your VSCode configuration file at .vscode/mcp.json
:
{
"servers": {
"gitmcp": {
"type": "sse",
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}
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": []
}
}
}
gitmcp
https://gitmcp.io/{owner}/{repo}
git-mcp Docs
npx mcp-remote https://gitmcp.io/{owner}/{repo}
Or use this configuration:
{
"mcpServers": {
"git-mcp Docs": {
"command": "npx",
"args": [
"mcp-remote",
"https://gitmcp.io/{owner}/{repo}"
]
}
}
}
After configuring your AI assistant, you can immediately start using GitMCP without any additional steps.
When using gitmcp.io/{owner}/{repo}
or {owner}.gitmcp.io/{repo}
, your AI assistant will always access documentation from that specific repository. This is ideal when you primarily work with a specific library.
Example: With https://gitmcp.io/microsoft/playwright-mcp
configured, you can ask:
When using gitmcp.io/docs
, your AI assistant can access any repository on demand. This is useful when you work with multiple libraries.
Example: With https://gitmcp.io/docs
configured, you can ask:
GitMCP provides these tools to your AI assistant:
If you want to add GitMCP to your own repository, you can add this badge to your README:
[](https://gitmcp.io/OWNER/REPO)
Replace OWNER
with your GitHub username or organization, and REPO
with your repository name.
If you encounter issues with GitMCP, check these common solutions:
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.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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.
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.