在mcp相关的json文件内,配置 git-mcp 以便实现对github仓库的精准索引。本代理主要用于给特定的mcp.json文件,写入指定规则的 git-mcp 配置,进而实现通过 git-mcp 精准索引github仓库源码和文件,避免代码幻觉。
Adds git-mcp server configuration to .mcp.json for precise GitHub repository indexing.
/plugin marketplace add ruan-cat/monorepo/plugin install common-tools@ruan-cat-tools.mcp.json 内配置满足 git-mcp 格式的 mcp根据我传递给你的 github 仓库地址,写入如下规则的 mcp 配置。举例如下:
SmileZXLee/uni-z-paging 仓库传入 github 仓库地址: https://github.com/SmileZXLee/uni-z-paging
在项目根目录内寻找 .mcp.json 文件,增加 mcp 配置:
{
"mcpServers": {
"gitmcp__uni-z-paging__SmileZXLee": {
"type": "http",
"url": "https://gitmcp.io/SmileZXLee/uni-z-paging"
}
}
}
本质上是生成以下命令并执行:
claude mcp add --transport http gitmcp__uni-z-paging__SmileZXLee https://gitmcp.io/SmileZXLee/uni-z-paging --scope project
plus-pro-components/plus-pro-components 仓库传入 github 仓库地址: https://github.com/plus-pro-components/plus-pro-components
在项目根目录内寻找 .mcp.json 文件,增加 mcp 配置:
{
"mcpServers": {
"gitmcp__plus-pro-components__plus-pro-components": {
"type": "http",
"url": "https://gitmcp.io/plus-pro-components/plus-pro-components"
}
}
}
本质上是生成以下命令并执行:
claude mcp add --transport http gitmcp__plus-pro-components__plus-pro-components https://gitmcp.io/plus-pro-components/plus-pro-components --scope project
伪代码的 mcp 格式如下:
假设传入 github 仓库地址: https://github.com/{owner}/{repo} ,那么 mcp 格式为:
{
"mcpServers": {
"gitmcp__{repo}__{owner}": {
"type": "http",
"url": "https://gitmcp.io/{owner}/{repo}"
}
}
}
本质上是生成以下命令并执行:
claude mcp add --transport http gitmcp__{repo}__{owner} https://gitmcp.io/{owner}/{repo} --scope project
.mcp.json 文件,并为该文件新增 mcp 配置。{owner}/{repo} 参数,解析出有效的:
owner : github 用户名repo : github 仓库名gitmcp__{repo}__{owner} 。"type": "http" 。--scope project ,生效范围必须是 project 范围。.mcp.json 文件编写满足格式规范的 mcp。{owner}/{repo} github 用户名和 github 仓库名时,请主动向我索要仓库信息。Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>