Thanos MCP Server

An MCP server that helps AI agents easily explore and understand system performance data over time

What is Thanos MCP Server?

The Thanos MCP Server is a Model Context Protocol (MCP) server that bridges AI agents with your Prometheus/Thanos monitoring infrastructure. It allows AI assistants to execute PromQL queries and analyze metrics data directly, enabling intelligent monitoring and observability workflows.

🔍 PromQL Query Tool

Execute PromQL queries against Thanos/Prometheus endpoints directly from your AI assistant

🔌 MCP Integration

Works seamlessly with MCP-compatible clients like Cursor and other AI development tools

🌐 Global Metrics Access

Query aggregated metrics across your entire monitoring infrastructure from a single endpoint

Prerequisites

  • Thanos Query or Prometheus running on localhost:9090
  • MCP-compatible client (e.g., Cursor)
  • Go 1.25.0 or higher

Installation

  1. Clone the repository from GitHub
  2. Build the server: go build -o thanos-mcp.exe src/main.go
  3. Configure in your MCP client using the configuration below

Example Usage

Thanos MCP Server Example Usage

Configuration

Add the following configuration to your MCP client settings:

{
  "mcpServers": {
    "thanos-mcp-server": {
      "command": "/path/to/thanos-mcp.exe",
      "args": []
    }
  }
}

Example Queries

Once configured, you can ask your AI assistant to run queries like:

// Example PromQL query
topk(10, sum by (job) (process_resident_memory_bytes{job!=""}))

Development Status

This project is currently in active development. Features may change and breaking changes are expected. Use at your own risk.

📂 View on GitHub