Provides up-to-date GitHub project docs and code via MCP for grounded AI queries.
Configuration
View docs{
"mcpServers": {
"anillahane-git-mcp": {
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}GitMCP connects an AI assistant to GitHub repositories so you can access up-to-date project documentation and code without leaving your IDE. By exposing MCP endpoints for specific repositories or for dynamic access, you get accurate, context-rich answers that stay grounded in the source material.
Connect your AI assistant to a GitMCP endpoint to start querying documentation and code. You can use a specific repository endpoint to lock access to one project or a dynamic endpoint to choose a repository on the fly. Once connected, ask questions about the project, request code examples, or pull documentation on demand. The assistant will fetch the latest material from the repository and respond with grounded, actionable results.
Prerequisites: You need Node.js and a package manager to run development or local testing flows.
1) Clone the MCP server repository.
2) Install dependencies.
3) Run the server locally for development.
# Local development setup (example flow)
git clone https://github.com/idosal/git-mcp.git
cd git-mcp
pnpm install
# Run for development
npm run dev
# or
pnpm devGitMCP supports both HTTP-based remote servers and local stdio servers. You specify the endpoint you want to connect to for each AI assistant. Below are the explicit connection examples that you can copy into your client configuration.
{
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}If you prefer a local, process-based setup (stdio), use this command and arguments:
{
"mcpServers": {
"gitmcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://gitmcp.io/{owner}/{repo}"
]
}
}
}Connect a specific repository with an HTTP endpoint to ensure focused access while you test with your AI assistant.
{
"mcpServers": {
"gitmcp": {
"url": "https://gitmcp.io/microsoft/playwright-mcp"
}
}
}Or run via a dynamic, on-demand endpoint using a stdio configuration.
{
"mcpServers": {
"gitmcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://gitmcp.io/docs"
]
}
}
}Choose the endpoint that aligns with your access needs. The HTTP endpoint is straightforward for fixed projects; the dynamic endpoint gives you flexibility across multiple repositories. Only connect to endpoints you explicitly intend to query, and respect repository access controls and robots.txt where applicable.
If the AI cannot fetch documentation, verify that the endpoint URL or command is correctly configured in your client. Ensure network access to the MCP server and that the target repository is publicly accessible or properly authorized for your setup.
GitMCP provides several tools to access and query repository content. The primary tools and their purposes are shown here so you can use them from your AI assistant.
fetch_<repo-name>_documentation
search_<repo-name>_documentation
fetch_url_content
search_<repo-name>_codeRetrieves the primary documentation (such as llms.txt) from a GitHub repository to give the AI a high-level understanding of the project.
Searches the repository documentation to find specific features, functions, or concepts without loading the entire document set.
Fetches content from links referenced in the documentation and converts it into a readable format for the AI.
Searches the repository's code using GitHub code search to find concrete code examples and implementation details.