Home / MCP / GitMCP MCP Server
Provides up-to-date repository docs and code access via MCP with targeted, low-hallucination queries.
Configuration
View docs{
"mcpServers": {
"playwright_mcp": {
"url": "https://gitmcp.io/microsoft/playwright-mcp"
}
}
}GitMCP is a remote MCP server that lets your AI assistants read up-to-date documentation and code directly from a GitHub project. It reduces hallucinations by providing grounded access to project content, making it easier to ask questions about APIs, usage, and implementation details across repositories or GitHub Pages sites.
Choose how you want to connect to projects. For a specific repository, use the URL format gitmcp.io/{owner}/{repo}. For a generic, on-demand setup, use gitmcp.io/docs. Example concrete endpoints you might connect to are https://gitmcp.io/microsoft/playwright-mcp (a specific repository) and the dynamic endpoint https://gitmcp.io/docs.
Connect your AI assistant by selecting a client and following its setup steps. You can access tools like documentation fetching, smart search, and code search to answer questions with the latest content from the target repository.
Prerequisites: you should have a modern Node.js environment and a preferred package manager installed (Node.js, npm or pnpm). Ensure you have access to a terminal or command prompt.
1) Clone the MCP server starter repository locally.
2) Install dependencies using your preferred package manager.
3) Run the server in development mode to test locally.
Tools you will interact with include fetch_<repo-name>_documentation, search_<repo-name>_documentation, fetch_url_content, and search_<repo-name>_code for targeted queries and code navigation. When the server runs with the dynamic endpoint, there are generic variants like fetch_generic_documentation, search_generic_documentation, and search_generic_code that require specifying the repository context at query time.
Security and privacy are core to GitMCP. It accesses only public content, respects robots.txt rules for GitHub Pages, and does not store user queries or permanently retain project data. You can self-host the server if you prefer full control.
Example usage patterns include querying for API usage, looking up implementation details in code, and searching the repository’s documentation to quickly gather accurate information for integration or debugging tasks.
Fetches the primary documentation for the specified repository to give the AI a broad overview of the project's purpose and setup.
Searches the repository's documentation for a specific query to quickly locate relevant sections.
Retrieves and converts linked content found in documentation into a readable format for the AI.
Searches the repository code to find concrete usage examples and implementation details.
Generic documentation fetch tool used when querying with the dynamic endpoint to obtain repository-specific docs.
Generic code search tool used with the dynamic endpoint to locate code examples across repos.
Generic documentation search tool used with the dynamic endpoint to pinpoint relevant material.