holmesgpt-runbook-mcp
holmesgpt-runbook-mcp
MCP server for HolmesGPT — runbook search, gap detection, AI-assisted drafting, and root cause analysis.
Works with any LLM provider (Anthropic, OpenAI, Azure OpenAI, or any OpenAI-compatible endpoint) and any Git provider (GitHub, GitLab, or Azure DevOps).
What it does
Five tools that give HolmesGPT (and any Confluence MCP client) a structured runbook layer:
Tool | What it does |
| CQL search by |
| Full runbook content by page ID or title |
| Fast LLM (LLM_FAST_MODEL) classifies an investigation log as a runbook gap |
| Capable LLM (LLM_CAPABLE_MODEL) drafts a runbook from investigation logs → opens draft PR/MR |
| Pulls matching runbooks + capable LLM reasons over live incident data |
Why CQL beats full-text search
Runbooks published via python-mkdocs-to-confluence include a confluence_properties: frontmatter block that renders as a Confluence Page Properties macro. This server queries those properties directly:
property["Service"]="payments-api" AND property["Failure-Mode"]="OOMKill"Holmes finds the exact runbook on the first query instead of ranking 40 pages that mention both terms.
Runbook format
Runbooks must use the Polarpoint AI-optimised runbook format with confluence_properties frontmatter. The template is included in this repo at docs/runbook-template.md. runbook_draft generates this format automatically.
Prerequisites
HolmesGPT running in your cluster
Confluence space for runbooks (published via the MkDocs plugin)
A Git repo containing runbook markdown sources (GitHub, GitLab, or Azure DevOps)
An API key for your LLM provider of choice
Quickstart
1. Install with your providers
# Anthropic + GitHub (default)
pip install "holmesgpt-runbook-mcp[anthropic-github]"
# OpenAI + GitLab
pip install "holmesgpt-runbook-mcp[openai-gitlab]"
# Anthropic + Azure DevOps
pip install "holmesgpt-runbook-mcp[anthropic-azure-devops]"
# Everything
pip install "holmesgpt-runbook-mcp[all]"2. Deploy to Kubernetes
# Create secrets (or use ExternalSecrets — see deploy/externalsecret.yaml)
kubectl create secret generic holmesgpt-runbook-mcp-secrets \
--namespace platform-tools \
--from-literal=llm-api-key=$LLM_API_KEY \
--from-literal=confluence-url=$CONFLUENCE_URL \
--from-literal=confluence-username=$CONFLUENCE_USERNAME \
--from-literal=confluence-api-token=$CONFLUENCE_API_TOKEN \
--from-literal=git-token=$GIT_TOKEN
kubectl apply -f deploy/3. Wire into HolmesGPT
# holmes-config.yaml
mcpServers:
- name: holmesgpt-runbook-mcp
url: http://holmesgpt-runbook-mcp.platform-tools.svc.cluster.local:8080/mcp4. Test the connection
curl http://holmesgpt-runbook-mcp.platform-tools.svc.cluster.local:8080/healthLLM provider configuration
Set LLM_PROVIDER and the relevant variables. Everything else is optional.
Anthropic (default)
LLM_PROVIDER=anthropic
LLM_API_KEY=sk-ant-...
# Optional overrides:
LLM_FAST_MODEL=claude-haiku-4-5-20251001
LLM_CAPABLE_MODEL=claude-sonnet-4-6OpenAI
LLM_PROVIDER=openai
LLM_API_KEY=sk-...
LLM_FAST_MODEL=gpt-4o-mini # default
LLM_CAPABLE_MODEL=gpt-4o # defaultAzure OpenAI
LLM_PROVIDER=azure
LLM_API_KEY=<azure-api-key>
LLM_BASE_URL=https://<resource>.openai.azure.com/
LLM_AZURE_API_VERSION=2024-02-01 # default
LLM_FAST_MODEL=gpt-4o-mini # deployment name
LLM_CAPABLE_MODEL=gpt-4o # deployment nameOpenAI-compatible (Ollama, vLLM, Together, Groq, etc.)
LLM_PROVIDER=openai-compatible
LLM_BASE_URL=http://ollama.platform-tools.svc.cluster.local:11434/v1
LLM_API_KEY=none # use 'none' if endpoint doesn't require a key
LLM_FAST_MODEL=llama3
LLM_CAPABLE_MODEL=llama3:70bGit provider configuration
Set GIT_PROVIDER and the relevant variables.
GitHub (default)
GIT_PROVIDER=github
GIT_TOKEN=ghp_... # PAT with repo write scope
GIT_RUNBOOK_REPO=org/repo
GIT_BASE_BRANCH=main # default
# Self-hosted GitHub Enterprise:
# GIT_HOST=github.myco.comGitLab
GIT_PROVIDER=gitlab
GIT_TOKEN=glpat-... # Personal access token with api scope
GIT_RUNBOOK_REPO=group/repo # or group/subgroup/repo
GIT_BASE_BRANCH=main
# Self-hosted:
GIT_HOST=https://gitlab.myco.com # default: https://gitlab.comAzure DevOps
GIT_PROVIDER=azure-devops
GIT_TOKEN=<pat> # PAT with Code (Read & Write) scope
GIT_HOST=https://dev.azure.com/my-org
GIT_RUNBOOK_REPO=ProjectName/RepoName
GIT_BASE_BRANCH=mainFull environment variable reference
Variable | Required | Default | Description |
|
|
| |
| ✅ | — | API key for your LLM provider |
| provider default | Model for classification (cheap/fast) | |
| provider default | Model for drafting and RCA (more capable) | |
| ✅ azure/compatible | — | Endpoint URL for Azure or self-hosted |
|
| Azure OpenAI API version | |
|
|
| |
| ✅ | — | Git provider personal access token |
|
|
| |
|
| Branch to open PRs/MRs against | |
| ✅ azure-devops | — | Self-hosted URL or Azure DevOps org URL |
| ✅ | — | e.g. |
| ✅ | — | Atlassian email |
| ✅ | — | Atlassian API token |
|
| Confluence space key | |
|
| Path prefix for runbook files in repo |
Development
# Install dev dependencies (includes all providers)
pip install -e ".[dev]"
# Run tests
pytest tests/
# Lint
ruff check src/ tests/
black --check src/ tests/
# Run locally (stdio transport for MCP Inspector)
python -m holmesgpt_runbook_mcp.serverHow runbook_draft works
Holmes calls
investigation_classifyduring an active investigation — the fast LLM classifies the log and returnshas_gap=truewith service/failure_mode/resolution extractedHolmes accumulates classified gaps (in memory or a simple store)
When gap count for a (service, failure_mode) pair hits threshold, Holmes calls
runbook_draftwith the accumulated logsThe capable LLM drafts the runbook in the AI-optimised format, extracting real commands from the investigation logs
runbook_draftopens a draft PR/MR withStatus: Draft— a platform engineer reviews and mergesThe MkDocs CI build publishes the merged runbook to Confluence
Next time the same alert fires,
runbook_searchfinds it on the first CQL query
Related
HolmesGPT — the AI troubleshooting assistant this server extends
python-mkdocs-to-confluence — MkDocs plugin that publishes the Page Properties this server queries
Blog: HolmesGPT Knows What Your Runbooks Are Missing — the post this repo was built from
License
Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/polarpoint-io/holmesgpt-runbook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server