GitMCP is a free, open-source Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub for AI assistants. It allows tools like Cursor to access up-to-date documentation and code directly from the source, eliminating hallucinations and improving code accuracy.
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}
GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol (MCP):
GitMCP currently supports:
For the GitHub repository https://github.com/microsoft/playwright-mcp
, add https://gitmcp.io/microsoft/playwright-mcp
as an MCP server to Windsurf.
Example prompt to Claude:
"How do I use the Playwright MCP"
For the GitHub Pages site langchain-ai.github.io/langgraph
, add https://langchain-ai.gitmcp.io/langgraph
as an MCP server to Cursor.
Example prompt to Cursor:
"Add memory to my LangGraph agent"
With the generic gitmcp.io/docs
endpoint, the AI can pick the GitHub project on the fly.
Example prompt:
"I want to learn about the OpenAI Whisper speech recognition model. Explain how it works."
GitMCP provides several tools to AI assistants:
fetch_<repo-name>_documentation
Gets the primary documentation from a GitHub repository.
When it's useful: For general questions about a project's purpose, features, or how to get started
search_<repo-name>_documentation
Lets the AI search through a repository's documentation by providing a specific search query.
When it's useful: For specific questions about particular features, functions, or concepts
fetch_url_content
Helps the AI get information from links mentioned in the documentation.
When it's useful: When documentation references external information that would help answer your question
search_<repo-name>_code
Searches through the actual code in the repository using GitHub's code search.
When it's useful: When you want examples of how something is implemented or need technical details not covered in documentation
Note: When using the dynamic endpoint (
gitmcp.io/docs
), these tools are named slightly differently (fetch_generic_documentation
,search_generic_code
, andsearch_generic_documentation
) and need additional information about which repository to access.
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.