Cover image

结束幻觉! GITMCP是任何GitHub项目的免费,开源的远程MCP服务器

3 years

Works with Finder

4

Github Watches

69

Github Forks

1.2k

Github Stars

GitMCP

image

What is GitMCPFeaturesGetting StartedHow It WorksExamplesFAQPrivacyContributingLicense

Twitter Follow Twitter Follow

🤔 What is GitMCP?

Stop vibe-hallucinating and start vibe-coding!

GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms any GitHub project (repositories or GitHub pages) into a documentation hub. It allows AI tools like Cursor to access up-to-date documentation and code, ending hallucinations seamlessly.

✨ Features

  • 😎 Latest Documentation on ANY GitHub Project: Grant your AI assistant seamless access to the GitHub project's documentation and code. The built-in smart search capabilities help find exactly what the AI needs without using too many tokens!
  • 🧠 No More Hallucinations: With GitMCP, your AI assistant can provide accurate and relevant answers to your questions.
  • ☁️ Zero Setup: GitMCP runs in the cloud. Simply add the chosen GitMCP URL as an MCP server in your IDE — no downloads, installations, signups, or changes are required.
  • Free and Private: GitMCP is open-source and completely free to use. It doesn't collect personal information or store queries. You can even self-host it!

🚀 Getting Started

Using GitMCP is as easy as it gets! Just follow these steps:

Step 1: Choose the type of server you want

Choose one of these URL formats depending on what you want to connect to:

  • For GitHub repositories: gitmcp.io/{owner}/{repo}
  • For GitHub Pages sites: {owner}.gitmcp.io/{repo}
  • For any repository (dynamic): gitmcp.io/docs

Replace {owner} with the GitHub username or organization name, and {repo} with the repository name.

For your convenience, you can also use the conversion tool on the landing page to format the GitHub URL into an MCP URL!

Step 2: Connect your AI assistant

Select your AI assistant from the options below and follow the configuration instructions:

Connecting Cursor

  1. Update your Cursor configuration file at ~/.cursor/mcp.json:
    {
      "mcpServers": {
        "gitmcp": {
          "url": "https://gitmcp.io/{owner}/{repo}"
        }
      }
    }
    

Connecting Claude Desktop

  1. In Claude Desktop, go to Settings > Developer > Edit Config
  2. Replace the configuration with:
    {
      "mcpServers": {
        "gitmcp": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://gitmcp.io/{owner}/{repo}"
          ]
        }
      }
    }
    

Connecting Windsurf

  1. Update your Windsurf configuration file at ~/.codeium/windsurf/mcp_config.json:
    {
      "mcpServers": {
        "gitmcp": {
          "serverUrl": "https://gitmcp.io/{owner}/{repo}"
        }
      }
    }
    

Connecting VSCode

  1. Update your VSCode configuration file at .vscode/mcp.json:
    {
      "servers": {
        "gitmcp": {
          "type": "sse",
          "url": "https://gitmcp.io/{owner}/{repo}"
        }
      }
    }
    

Connecting Cline

  1. 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": []
        }
      }
    }
    

Note: Remember to replace {owner} and {repo} with the actual GitHub username/organization and repository name. You can also use the dynamic endpoint https://gitmcp.io/docs to allow your AI to access any repository on demand.

⚙️ How It Works

GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol (MCP), a standard that lets AI tools request additional information from external sources.

What happens when you use GitMCP:

  1. You provide the GitMCP URL to your AI assistant (e.g., gitmcp.io/microsoft/typescript). GitMCP exposes tools like documentation fetching, smart search, code search, etc.
  2. Prompt the AI assistant on documentation/code-related questions.
  3. Your AI sends requests to GitMCP to use its tools (with your approval).
  4. GitMCP executes the AI's request and returns the requested data.
  5. Your AI receives the information and generates a more accurate, grounded response without hallucinations.

💡 Examples

Here are some examples of how to use GitMCP with different AI assistants and repositories:

Example 1: Using Windsurf with a specific repository

For the GitHub repository https://github.com/microsoft/playwright-mcp, add https://gitmcp.io/microsoft/playwright-mcp as an MCP server to Windsurf.

Prompt to Claude:

"How do I use the Playwright MCP"

Windsurf will pull the relevant documentation from GitMCP to implement the memory feature correctly.

Example 2: Using Cursor with a GitHub Pages site

For the GitHub Pages site langchain-ai.github.io/langgraph, add https://langchain-ai.gitmcp.io/langgraph as an MCP server to Cursor.

Prompt to Cursor:

"Add memory to my LangGraph agent"

Cursor will pull the relevant documentation and code from GitMCP to correctly implement the memory feature.

Example 3: Using Claude Desktop with the dynamic endpoint

You don't have to pick specific repositories. The generic gitmcp.io/docs endpoint allows AI to pick the GitHub project on the fly!

Prompt to any AI assistant:

"I want to learn about the OpenAI Whisper speech recognition model. Explain how it works.

Claude will pull the data from GitMCP and answer the question.

🛠️ Tools

GitMCP provides AI assistants with several valuable tools to help them access, understand, and query GitHub repositories.

fetch_<repo-name>_documentation

This tool gets the primary documentation from a GitHub repository. It works by retrieving relevant documentation (e.g., llms.txt). This gives the AI a good overview of what the project is about

When it's useful: For general questions about a project's purpose, features, or how to get started

search_<repo-name>_documentation

This tool lets the AI search through a repository's documentation by providing a specific search query. Instead of loading all documentation (which could be very large), it uses smart search to find just the relevant parts.

When it's useful: For specific questions about particular features, functions, or concepts within a project

fetch_url_content

This tool helps the AI get information from links mentioned in the documentation. It retrieves the content from those links and converts it to a format the AI can easily read.

When it's useful: When documentation references external information that would help answer your question

search_<repo-name>_code

This tool searches through the actual code in the repository using GitHub's code search. It helps AI find specific code examples or implementation details.

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, and search_generic_documentation) and need additional information about which repository to access.

❓ FAQ

What is the Model Context Protocol?

The Model Context Protocol is a standard that allows AI assistants to request and receive additional context from external sources in a structured manner, enhancing their understanding and performance.

Does GitMCP work with any AI assistant?

Yes, GitMCP is compatible with any AI assistant supporting the Model Context Protocol, including tools like Cursor, VSCode, Claude, etc.

Is GitMCP compatible with all GitHub projects?

Absolutely! GitMCP works with any public GitHub repository without requiring any modifications. It prioritizes the llms.txt file and falls back to README.md or other pages if the former is unavailable. Future updates aim to support additional documentation methods and even generate content dynamically.

Does GitMCP cost money?

No, GitMCP is a free service to the community with no associated costs.

🔒 Privacy

GitMCP is deeply committed to its users' privacy. The service doesn't have access to or store any personally identifiable information as it doesn't require authentication. In addition, it doesn't store any queries sent by the agents. Moreover, as GitMCP is an open-source project, it can be deployed independently in your environment.

GitMCP only accesses content that is already publicly available and only when queried by a user. GitMCP does not automatically scrape repositories. Before accessing any GitHub Pages site, the code checks for robots.txt rules and follows the directives set by site owners, allowing them to opt out. Please note that GitMCP doesn't permanently store data regarding the GitHub projects or their content.

👥 Contributing

We welcome contributions! Please take a look at our contribution guidelines.

Local Development Setup

  1. Clone the repository

    git clone https://github.com/idosal/git-mcp.git
    cd git-mcp
    
  2. Install dependencies

    npm install
    # or if you prefer pnpm
    pnpm install
    
  3. Run locally for development

    npm run dev
    # or
    pnpm dev
    

Using MCP Inspector for Testing

  1. Install the MCP Inspector tool:

    npx @modelcontextprotocol/inspector
    
  2. In the inspector interface (http://localhost:5173):

    • Set Transport Type to SSE
    • Enter your GitMCP URL (e.g., http://localhost:8787/docs)
    • Click "Connect"

📄 License

This project is licensed under the Apache License 2.0.

Disclaimer

GitMCP is provided "as is" without warranty of any kind. While we strive to ensure the reliability and security of our service, we are not responsible for any damages or issues that may arise from its use. GitHub projects accessed through GitMCP are subject to their respective owners' terms and conditions. GitMCP is not affiliated with GitHub or any of the mentioned AI tools.

相关推荐

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Beria Joey
  • 你的职业规划师,不走弯路就问我。Sponsor:小红书“ ItsJoe就出行 ”

  • Benedikt Ess
  • FindetundanalysiertOnlineProdukteeinschlielichAmazonnachVolumenBewertungenundPreis

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • GeyserMC
  • 与Minecraft客户端/服务器通信的库。

  • awslabs
  • AWS MCP服务器 - 将AWS最佳实践直接带入您的开发工作流程的专门MCP服务器

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • GLips
  • MCP服务器向像光标这样的AI编码代理提供FIGMA布局信息

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

    Reviews

    4 (1)
    Avatar
    user_wxJETjtd
    2025-04-17

    Git-mcp by idosal is a fantastic tool for managing Git repositories efficiently. Its straightforward interface and robust features make it a valuable addition to my workflow. Highly recommend checking it out if you're looking for a reliable and user-friendly Git management solution.