如何将 GitMCP Docs 远程 MCP 连接到 Claude Code

约 1 分钟即可把 GitMCP 的远程 MCP 服务端接入 Claude Code。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。

🧑‍💻 Community✓ VerifiedStreamable HTTPPublic · No Auth🛡️ A+~740 tok5 tools
Streamable HTTPhttps://gitmcp.io/docs
claude mcp add --transport http gitmcp https://gitmcp.io/docs

接入步骤

  1. 执行添加命令 — 运行 claude mcp add --transport http gitmcp https://gitmcp.io/docs``。
  2. 完成认证 — 无需认证——GitMCP Docs MCP 为免密公开端点。在 Claude Code 内运行 /mcp 可触发 OAuth 流程。
  3. 验证状态 — 运行 claude mcp list 应显示已连接。若 OAuth 回调失败,先 claude mcp remove gitmcp 再重新添加,并确认浏览器能访问回调地址。在 在线 Inspector 中粘贴 https://gitmcp.io/docs 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(5)

ToolSafetyDescriptionParameters
match_common_libs_owner_repo_mapping
~147 tok
🟠 WriteMatch a library name to an owner/repo. Don't use it if you have an owner and repo already. Use this first if only a library name was provided. If found - you can use owner and repo to call other tools. If not found - try to use the library name directly in other tools.library*: string
fetch_generic_documentation
~115 tok
🟢 ReadFetch documentation for any GitHub repository by providing owner and project nameowner*: stringrepo*: string
search_generic_documentation
~155 tok
🟢 ReadSemantically search in documentation for any GitHub repository by providing owner, project name, and search query. Useful for specific queries.owner*: stringrepo*: stringquery*: string
search_generic_code
~185 tok
🟢 ReadSearch for code in any GitHub repository by providing owner, project name, and search query. Returns matching files. Supports pagination with 30 results per page.owner*: stringrepo*: stringquery*: stringpage: number
fetch_generic_url_content
~118 tok
🟢 ReadGeneric tool to fetch content from any absolute URL, respecting robots.txt rules. Use this to retrieve referenced urls (absolute urls) that were mentioned in previously fetched documentation.url*: string

更多连接指南