prometheus / prometheus/alertmanager
Embedded native MCP server support
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Proposal
Context
As AI agents (e.g., SRE troubleshooting tools like HolmesGPT, Claude Desktop, Cursor, or custom internal LLM assistants) become integral to modern incident response workflows, there is an increasing need for standard interfaces to interact with observability systems.
Currently, for an AI assistant or SRE agent to inspect firing alerts or manage silences in Alertmanager, operators must deploy and maintain external proxy/wrapper services (e.g., eyazici90/mcp-alertmanager). Running sidecars or external bridge containers introduces:
- Operational Overhead: Managing extra deployment manifests, image updates, and lifecycle management.
- Deployment Complexity: Unnecessary network hops and protocol translation between the agent and Alertmanager.
- Duplicated effort: Many different implementations across with almost identical tools exposed.
Describe the solution you'd like
Embed a native Model Context Protocol (MCP) server directly into Alertmanager (or behind a feature flag/CLI parameter), allowing AI agents and SRE tools to interact with standard MCP clients.
Key Capabilities & Tools to Expose via MCP:
- Alert Operations:
list_alerts: Query active/firing alerts with support for label matchers, states (active,suppressed,unprocessed), and receivers.get_alert_groups: Retrieve alert groups according to the routing tree for root-cause context.
- Silence Operations:
list_silences: Retrieve active or historical silences with matcher filtering.get_silence: Fetch specific silence metadata by ID.create_silence: Create new silences with matchers, duration, author, and comments.delete_silence: Expire or delete an active silence.
- Status & Configuration:
get_status: Retrieve uptime, cluster status, and active configuration metadata.
Configuration Flag Proposal:
# Feature flag approach
./alertmanager --enable-feature=mcp-server --web.mcp-listen-address=":8012"
# Or standard flags
./alertmanager --mcp.enabled=true --mcp.listen-address=":8012"
Provide a --disable-write: Disable write tools (create/update/delete operations) flag as well(e.g: creating silences).
There is https://github.com/prometheus/prometheus-mcp which has list_alerts, although, missing whole others. Also, bundling alertmanager tools with other prom fucntionalities(e.g: tsdb_stats, wal_replay_status etc) would increase context window. Moreover, alertmanager can be used by any other alert rulers besides prometheus(e.g: custom ruler or grafana managed alerting backed by elasticsearch, loki)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Alertmanager's existing CLI and API entry points; the issue names no repository files or tests. Compare the proposed MCP alert, silence, and status operations with current interfaces, then define the feature boundary, configuration flags, write-operation controls, and validation needed for an embedded server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100