GitLab MR Confluence

Fetch GitLab MR data, analyze changes, and store results in Confluence through an MCP server.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "codebywaqas-mrconfluencelinker-mcp-server": {
      "command": "python",
      "args": [
        "src/MRConfluenceLinker-mcp-server/server.py"
      ],
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_TOKEN": "YOUR_GITLAB_TOKEN",
        "CONFLUENCE_URL": "https://confluence.example.com",
        "CONFLUENCE_SPACE": "DOCS",
        "CONFLUENCE_TOKEN": "YOUR_CONFLUENCE_TOKEN",
        "GITLAB_PROJECT_ID": "12345678",
        "CONFLUENCE_USERNAME": "user@example.com"
      }
    }
  }
}

You run an MCP server that talks to GitLab to fetch merge request details, analyzes code changes, and optionally stores the results in Confluence. This lets you automate MR insights and documentation, improving transparency and tracking across your projects.

How to use

You interact with the MCP server using a client that sends requests to the server's available tools. The core capabilities you can invoke are to fetch merge request details, analyze code changes, and store the results in Confluence. Use these actions to build reports that summarize MR information, code changes, and file-level details, then store the results for ongoing reference.

How to install

git https://github.com/CodeByWaqas/MRConfluenceLinker-mcp-server.git
cd MRConfluenceLinker-mcp-server
python -m venv .venv
source .venv/bin/activate  # On Windows, use: .venv\Scripts\activate
pip install -r requirements.txt
uv add "mcp[cli]" python-gitlab python-dotenv atlassian-python-api requests
cp .env.example .env
# Edit the .env file with your credentials
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
# Start the MCP server
python src/MRConfluenceLinker-mcp-server/server.py

Additional setup with Claude Desktop

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

Notes on usage

The server listens for commands and replies with results to stdout. Use prompts that map to the available actions, such as asking it to fetch MR details, analyze code changes, or store the analysis in Confluence. Ensure your environment variables for GitLab and Confluence are correctly configured to enable API access and page updates.

Troubleshooting and tips

If you encounter authentication issues, double-check the tokens in your environment file and ensure they have the required scopes. For network problems, verify the GitLab URL and Confluence URL are reachable from the host running the MCP server. Review logs written to mcp_server.log for diagnostics.

Security and maintenance

Keep your tokens secret and rotate them periodically. Limit permissions to only what is needed for MR fetching and Confluence updates. Regularly update dependencies to mitigate security vulnerabilities and monitor server logs for unusual activity.

Migration and compatibility

If you update to newer MCP server versions, re-check the environment configuration and any changes to required packages. Validate that the existing MR workflows continue to integrate correctly with GitLab and Confluence after upgrades.

Available tools

fetch_mr_details

Fetches details for a specific merge request or all merge requests from a given GitLab project.

analyze_code_changes

Analyzes code changes in a merge request to produce statistics and file-level insights.

store_in_confluence

Stores the analysis results as Confluence pages or updates existing pages.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational