harshmaur
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"GitLab communication server": {
"args": [
"-y",
"@harshmaur/gitlab-mcp"
],
"command": "npx",
"env": {
"GITLAB_API_URL": "your_gitlab_api_url",
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token"
}
}
}
}
服务介绍
@harshmaur/gitlab-mcp
GitLab MCP(Model Context Protocol)服务器。
安装和执行
通过 Smithery 安装
要通过 Smithery 自动为 Claude Desktop 安装 GitLab MCP 服务器:
bash
npx -y @smithery/cli install @harshmaur/gitlab-mcp --client claude
手动安装
bash
npx @harshmaur/gitlab-mcp
环境变量配置
在运行服务器之前,您需要设置以下环境变量:
bash
GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token
GITLAB_API_URL=your_gitlab_api_url # 默认: https://gitlab.com/api/v4
许可证
MIT 许可证
如何使用
与 Claude App、Cline、Roo Code 一起使用
当与 Claude App 一起使用时,您需要直接设置您的 API 密钥和 URL。
json
{
"mcpServers": {
"GitLab communication server": {
"command": "npx",
"args": ["-y", "@harshmaur/gitlab-mcp"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token",
"GITLAB_API_URL": "your_gitlab_api_url"
}
}
}
}
与 Cursor 一起使用
当与 Cursor 一起使用时,您可以设置环境变量并按如下方式运行服务器:
bash
env GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token GITLAB_API_URL=your_gitlab_api_url npx @harshmaur/gitlab-mcp
GITLAB_PERSONAL_ACCESS_TOKEN: 您的 GitLab 个人访问令牌。GITLAB_API_URL: 您的 GitLab API URL。(默认:https://gitlab.com/api/v4)