MCP.so
Sign In
Servers

MCP Prometheus Server

@drewstreib

A sophisticated MCP server for Prometheus queries demonstrating advanced Haskell practices

Overview

What is MCP Prometheus Server?

A production-ready Model Context Protocol (MCP) server implementation in Haskell that provides Claude Desktop with access to Prometheus metrics and queries. It offers five tools for querying, discovering, and exploring Prometheus metrics, built with strict exception handling and thread-safe patterns.

How to use MCP Prometheus Server?

Install using the pre-built binary, build from source with GHC 9.12+ and Cabal, or run via Docker. Configure Claude Desktop by adding an entry in claude_desktop_config.json pointing to the server binary with the --prometheus-url argument pointing to your Prometheus instance.

Key features of MCP Prometheus Server

  • Seamless Claude Desktop integration via MCP protocol
  • Five tools: query, query range, series, metrics, labels
  • Production-ready error handling and logging
  • Thread-safe execution with strict evaluation
  • Pre-built binary, source build, and Docker options
  • Comprehensive test suite with unit and integration tests
  • BSD 3-Clause open source license

Use cases of MCP Prometheus Server

  • Ask Claude "What's the current CPU usage?" using instant PromQL queries
  • Visualize memory usage trends over the last hour with range queries
  • Discover available metric names in your Prometheus instance
  • Find time series matching specific label selectors
  • Explore all label names used across metrics for filtering

FAQ from MCP Prometheus Server

What dependencies are required to build from source?

GHC 9.12+ and Cabal 3.0+ are required; GHCup is recommended for installation.

How do I configure the Prometheus server URL?

Set the PROMETHEUS_URL environment variable or use the --prometheus-url command-line option (default: http://your-prometheus-server:9090).

What should I do if the Docker container exits immediately?

The MCP server expects stdio interaction; use the -it flags when running the container.

Can I connect to a Prometheus server on a different network with Docker?

Yes, ensure both containers are on the same Docker network by using --network flags.

Is the server compatible with JSON-RPC notifications?

Yes, it properly handles notifications without returning responses per the JSON-RPC specification.

Tags

More from Developer Tools