Lets agents manage, sync and update multiple Git repositories at once through the MGit command-line tool.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add mgit --env LANGUAGE='<LANGUAGE>' --env MGIT_CMD='<MGIT_CMD>' --env PROJECT_NAME='<PROJECT_NAME>' --env REPO_NAME='<REPO_NAME>' -- npx @liangshanli/mcp-server-mgit~/.codex/config.toml
[mcp_servers.mgit]
command = "npx"
args = ["@liangshanli/mcp-server-mgit"]
env = { LANGUAGE = "<LANGUAGE>", MGIT_CMD = "<MGIT_CMD>", PROJECT_NAME = "<PROJECT_NAME>", REPO_NAME = "<REPO_NAME>" }
# codex mcp add mgit --env LANGUAGE='<LANGUAGE>' --env MGIT_CMD='<MGIT_CMD>' --env PROJECT_NAME='<PROJECT_NAME>' --env REPO_NAME='<REPO_NAME>' -- npx @liangshanli/mcp-server-mgit~/.cursor/mcp.json
{
"mcpServers": {
"mgit": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-mgit"
],
"env": {
"LANGUAGE": "<LANGUAGE>",
"MGIT_CMD": "<MGIT_CMD>",
"PROJECT_NAME": "<PROJECT_NAME>",
"REPO_NAME": "<REPO_NAME>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"mgit": {
"type": "stdio",
"command": "npx",
"args": [
"@liangshanli/mcp-server-mgit"
],
"env": {
"LANGUAGE": "<LANGUAGE>",
"MGIT_CMD": "<MGIT_CMD>",
"PROJECT_NAME": "<PROJECT_NAME>",
"REPO_NAME": "<REPO_NAME>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"mgit": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-mgit"
],
"env": {
"LANGUAGE": "<LANGUAGE>",
"MGIT_CMD": "<MGIT_CMD>",
"PROJECT_NAME": "<PROJECT_NAME>",
"REPO_NAME": "<REPO_NAME>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"mgit": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-mgit"
],
"env": {
"LANGUAGE": "<LANGUAGE>",
"MGIT_CMD": "<MGIT_CMD>",
"PROJECT_NAME": "<PROJECT_NAME>",
"REPO_NAME": "<REPO_NAME>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"mgit": {
"command": "npx",
"args": [
"@liangshanli/mcp-server-mgit"
],
"env": {
"LANGUAGE": "<LANGUAGE>",
"MGIT_CMD": "<MGIT_CMD>",
"PROJECT_NAME": "<PROJECT_NAME>",
"REPO_NAME": "<REPO_NAME>"
}
}
}
}需要的环境变量
LANGUAGEMGIT_CMDPROJECT_NAMEREPO_NAME
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。