prometheus
A Prometheus Model Context Protocol Server.
claude mcp add --transport stdio yshngg-prometheus-mcp-server docker run -i ghcr.io/yshngg/prometheus-mcp-server:latest
How to use
The Prometheus MCP Server provides a Go-based bridge that exposes the Prometheus HTTP API through MCP-compatible clients. It supports multiple transport methods (stdio, HTTP, and SSE) so you can interact with your Prometheus instance using natural language prompts and the MCP protocol. Core capabilities include instant queries, range queries, metadata and discovery endpoints, and management capabilities for targets, rules, and TSDB operations. This enables seamless conversational control over Prometheus observability tasks, along with full API compatibility with Prometheus v1 endpoints. To use it, run the server with your Prometheus URL and choose the desired transport. For example, run with the default stdio transport for desktop MCP clients, or use HTTP transport to expose an MCP endpoint for web-based integrations. Once running, you can issue natural language prompts that map to Prometheus API calls (e.g., asking for current CPU usage, querying a range of mem metrics, or listing available label values).
How to install
Prerequisites:
- Docker (recommended) or a local Go toolchain if building from source
- Access to a Prometheus server (v2.x) that your MCP client will query
Using Docker (recommended):
- Install Docker on your system.
- Pull and run the official image:
docker pull ghcr.io/yshngg/prometheus-mcp-server:latest
- Run with stdio transport (ideal for desktop MCP clients):
docker run --rm ghcr.io/yshngg/prometheus-mcp-server:latest --prom-addr="http://host.docker.internal:9090"
- Run with HTTP transport for web-based integrations (expose MCP port):
docker run --rm -p 8080:8080 ghcr.io/yshngg/prometheus-mcp-server:latest --prom-addr="http://host.docker.internal:9090" --transport=http --mcp-addr="0.0.0.0:8080"
From source (Go build):
- Install Go 1.23+ and set up your GOPATH if needed.
- Clone the repository and build:
git clone https://github.com/yshngg/prometheus-mcp-server.git
cd prometheus-mcp-server
make build
- Run the binary directly (example):
./prometheus-mcp-server --prom-addr="http://localhost:9090"
Additional notes
Tips and common considerations:
- The MCP server is fully compatible with Prometheus v1 HTTP API endpoints, so any MCP client can map queries to Prometheus endpoints as described in the API Compatibility section.
- Transport selection determines how MCP clients connect: stdio for desktop workflows, HTTP for web-based or remote clients, and SSE for streaming scenarios (note: SSE is deprecated in favor of HTTP in newer workflows).
- When running via Docker, you may need to adjust the --prom-addr value to point to your Prometheus instance from inside the container (e.g., use host.docker.internal on Docker Desktop or a reachable Prometheus host inside your network).
- Ensure the Prometheus URL is reachable from the MCP server process; if Prometheus is behind a firewall or in a different network, configure network routing accordingly.
- For production deployments, consider using the Docker image with a persistent MCP address binding and secure transport (HTTPS) if exposing the MCP endpoint publicly.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
agentcontrolplane
ACP is the Agent Control Plane - a distributed agent scheduler optimized for simplicity, clarity, and control. It is designed for outer-loop agents that run without supervision, and make asynchronous tool calls like requesting human feedback on key operations. Full MCP support.
kodit
👩💻 MCP server to index external repositories
mcp-web-ui
MCP Web UI is a web-based user interface that serves as a Host within the Model Context Protocol (MCP) architecture. It provides a powerful and user-friendly interface for interacting with Large Language Models (LLMs) while managing context aggregation and coordination between clients and servers.
mcp-auth-proxy
MCP Auth Proxy is a secure OAuth 2.1 authentication proxy for Model Context Protocol (MCP) servers
github-brain
An experimental GitHub MCP server with local database.