release-doc-mcp
README.md
# release-doc-mcp
MCP server that:
1. Given a repo name, finds the image tag + version from the latest successful
GitHub Actions workflow run.
2. Creates a Confluence page documenting that version, image tag, and a link
to the workflow run.
## How version/image tag extraction works
The GitHub client fetches the latest successful run of a workflow (optionally
filtered by workflow file and branch), then scans each job's logs for lines
matching two regexes (defaults below), returning the first job where both
match:
- Version: `Version:\s*(\S+)`
- Image tag: `Image tag:\s*(\S+)`
These defaults match workflows that print lines like `Image tag: myapp:1.2.3`
and `Version: 1.2.3` to the job log (e.g. via `echo` or `$GITHUB_STEP_SUMMARY`
plus a plain echo). If your workflow logs a different format, override
`RELEASE_VERSION_REGEX` / `RELEASE_IMAGE_TAG_REGEX` in your environment.
## Setup
```bash
python -m venv .venv
./.venv/Scripts/pip install -e ".[dev]" # Windows
# source .venv/bin/activate && pip install -e ".[dev]" # macOS/Linux
cp .env.example .env
```
Fill in `.env`:
- `GITHUB_TOKEN` — a PAT with `actions:read` on the target repos.
- `CONFLUENCE_BASE_URL` — e.g. `https://your-domain.atlassian.net/wiki`.
- `CONFLUENCE_EMAIL` / `CONFLUENCE_API_TOKEN` — Confluence Cloud API token auth.
- `CONFLUENCE_SPACE_KEY` — default space for created pages.
- `CONFLUENCE_PARENT_PAGE_ID` — optional parent page to nest pages under.
## Running the server
```bash
./.venv/Scripts/release-doc-mcp # Windows
# .venv/bin/release-doc-mcp # macOS/Linux
```
It speaks MCP over stdio. To use it from Claude Code / Claude Desktop, add it
as an MCP server, e.g. in Claude Code:
```bash
claude mcp add release-doc -- /full/path/to/.venv/Scripts/release-doc-mcp.exe
```
(Configure `GITHUB_TOKEN`/`CONFLUENCE_*` in your shell/user environment, or as
`env` entries in the MCP server config, so they're available to the process.)
## Tools
- `get_image_version(repo, workflow_file="", branch="")` — returns version,
image tag, and workflow run info for a repo.
- `create_confluence_release_page(repo, version, image_tag, workflow_run_url, workflow_name="", job_name="", space_key="", parent_page_id="")` —
creates a Confluence page for an already-known version/tag.
- `document_release(repo, workflow_file="", branch="", space_key="", parent_page_id="")` —
does both steps in one call.
## Tests
```bash
./.venv/Scripts/python -m pytest
```
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues