Token导航 LogoToken导航TokenDH.com
GitLab PR Analysis MCP Server logo
开发工具stdio官方级别未说明来源级核验

GitLab PR Analysis MCP Server

MCP Server

一个集成GitLab合并请求分析与Confluence文档的MCP服务器,用于获取合并请求详情、分析代码变更并将结果存储至Confluence页面。

工具数

3

提示词数

0

GitHub Stars

0

资源数

0
代码分析PythonClaude开发工具Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

CodeByWaqas

提供方

CodeByWaqas

最后核验

2026/5/17 20:41

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv .venv

详细介绍

GitLab公关分析MCP服务器

该项目提供了一个MCP(模型控制协议)服务器,该服务器将GitLab合并请求分析与Confluence文档集成在一起。它允许您获取合并请求详细信息,分析代码更改,并将结果存储在Confluence页面中。

特性

  • 从GitLab获取合并请求详细信息
  • 分析合并请求中的代码更改
  • 生成详细报告,包括:

- 基本合并请求信息 - 代码更改统计 - 文件类型分析 - 详细的文件更改

  • Confluence中的店铺分析结果
  • 用于调试的全面日志记录

先决条件

  • Python 3.8或更高版本
  • 具有API访问权限的GitLab帐户
  • 汇流账户(可选,用于存储分析结果)
  • 访问所需的GitLab项目

安装

  1. 克隆存储库:
git https://github.com/CodeByWaqas/MRConfluenceLinker-mcp-server.git
cd MRConfluenceLinker-mcp-server
  1. 创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
  1. 安装依赖项:
pip install -r requirements.txt

uv add "mcp[cli]" python-gitlab python-dotenv atlassian-python-api requests

配置

  1. 复制示例环境文件:
cp .env.example .env
  1. 编辑 .env 使用您的凭据文件:
GITLAB_URL=https://gitlab.com
GITLAB_TOKEN=your_gitlab_token
GITLAB_PROJECT_ID=your_project_id

# Optional Confluence integration
CONFLUENCE_URL=your_confluence_url
CONFLUENCE_USERNAME=your_username
CONFLUENCE_TOKEN=your_confluence_token
CONFLUENCE_SPACE=your_space_key

获取凭证

  • GitLab代币:在GitLab中生成个人访问令牌 api 范围
  • 汇流令牌:在Atlassian帐户设置中生成API令牌

用法

  1. 启动MCP服务器:
python src/MRConfluenceLinker-mcp-server/server.py

使用Claude Desktop进行设置

# claude_desktop_config.json
# Can find location through:
# Claude -> Settings -> Developer -> Edit Config
{
  "mcpServers": {
      "MRConfluenceLinker-mcp-server": {
          "command": "uv",
          "args": [
              "--directory",
              "//MRConfluenceLinker-mcp-server/src/MRConfluenceLinker-mcp-server",
              "run",
              "server.py"
          ]
      }
  }
}

2. The server will listen for commands through stdin/stdout. You can interact with it using prompts like:

您能从项目“我的项目”中获取合并请求#1的详细信息吗? 您能分析项目“我的项目”中合并请求#1的代码更改吗? 你能在Confluence中存储项目“我的项目”中的合并请求#1的摘要吗?


## Available Tools

The server provides the following tools:

1. `fetch_mr_details`: Fetches details of a specific merge request or all merge requests
   - Parameters:
     - `project_id`: The GitLab project ID
     - `mr_id` (optional): Specific merge request ID

2. `analyze_code_changes`: Analyzes code changes in a merge request
   - Parameters:
     - `project_id`: The GitLab project ID
     - `mr_id`: The merge request ID to analyze

3. `store_in_confluence`: Stores analysis results in Confluence
   - Parameters:
     - `project_id`: The GitLab project ID
     - `mr_id` (optional): Specific merge request ID
     - `analysis` (optional): Analysis results to store

## Logging

The server generates detailed logs in `mcp_server.log` and outputs to stderr. This helps in debugging issues with:
- GitLab API access
- Confluence integration
- Code analysis
- Page creation and updates

## Error Handling

The server includes comprehensive error handling for:
- Missing environment variables
- API authentication issues
- Network connectivity problems
- Invalid project or merge request IDs
- Confluence permission issues

## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For support, please [create an issue](https://github.com/CodeByWaqas/MRConfluenceLinker-mcp-server/issues) or contact the maintainers.

## Project Structure

MRConfluenceLinker mcp服务器/ ├── src/#源代码目录 │ └── MRConfluenceLinker mcp服务器/#主服务器包 │ ├── resources/#资源模块 │ │ ├── __初始化__南美国家巴拉圭的缩写(Paraguay) │ │ ├── client.py#客户端实现/GitLab PR集成 │ ├── server.py#主服务器实现 │ └── mcp_server.log#服务器日志 ├── __皮卡什__/#Python缓存文件 ├── .git/#git仓库 ├── .gitignore#Git忽略规则 ├── 贡献.md#贡献指南 ├── 许可证#项目许可证 ├── README.md#项目文档 ├── pyproject.toml#Python项目配置 ├── requirements.txt#项目依赖关系 └── uv.lock#依赖锁定文件


### Key Components

- **Source Code**: Located in the `src/MRConfluenceLinker-mcp-server/` directory
  - `server.py`: Main MCP server implementation
  - `resources/client.py`: Client-side implementation contains GitLab PR integration

- **Configuration Files**:
  - `requirements.txt`: Python package dependencies
  - `pyproject.toml`: Project metadata and build configuration
  - `uv.lock`: Locked dependency versions
  - `.env.example`: Environment variables template

- **Documentation**:
  - `README.md`: Project overview and setup instructions
  - `CONTRIBUTING.md`: Contribution guidelines
  - `LICENSE`: Project license

- **Development**:
  - `__pycache__/`: Python cache files
  - `mcp_server.log`: Server logs for debugging

目录标签

目录标签

代码分析PythonClaude开发工具本地部署GitLab集成Confluence文档自动化报告

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

3

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP