<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aniket</title>
    <description>The latest articles on DEV Community by Aniket (@aniketatgithub).</description>
    <link>https://dev.to/aniketatgithub</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4181736%2Fd3836567-cd72-4e9d-8562-eb4b37594c85.jpg</url>
      <title>DEV Community: Aniket</title>
      <link>https://dev.to/aniketatgithub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aniketatgithub"/>
    <language>en</language>
    <item>
      <title>My AI agent kept hallucinating metric names, so I built it a Prometheus MCP server</title>
      <dc:creator>Aniket</dc:creator>
      <pubDate>Tue, 13 Oct 2026 09:13:55 +0000</pubDate>
      <link>https://dev.to/aniketatgithub/my-ai-agent-kept-hallucinating-metric-names-so-i-built-it-a-prometheus-mcp-server-388a</link>
      <guid>https://dev.to/aniketatgithub/my-ai-agent-kept-hallucinating-metric-names-so-i-built-it-a-prometheus-mcp-server-388a</guid>
      <description>&lt;p&gt;If you've pointed an AI agent at a live incident, you've seen the failure mode: it invents a plausible-sounding metric, queries it, gets an empty result, and confidently invents another. The Prometheus HTTP API is a bad interface for an LLM — it's powerful, but nothing helps the agent discover what's actually there before it starts guessing.&lt;/p&gt;

&lt;p&gt;I work in production engineering, so I built the interface I wanted the agent to have: prom-mcp, an MCP (Model Context Protocol) server for Prometheus written in Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it gives the agent
&lt;/h2&gt;

&lt;p&gt;Three capabilities, shaped for triage rather than raw API access:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;PromQL queries with readable output.&lt;/strong&gt; Instant and range queries, formatted like a triage note instead of a JSON wall.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert explanations.&lt;/strong&gt; When an alert is firing, the agent gets the alert joined with the rule definition that produced it — the expression, the labels, the annotations — so it can reason about the real condition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery before querying.&lt;/strong&gt; Series and label discovery tools let the agent check which metrics actually exist, which kills the hallucination loop at the source.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plus a triage prompt that walks the agent through an incident in order: what's firing, since when, what's the blast radius.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Single Go binary, zero dependencies, stdio transport:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add prom &lt;span class="nt"&gt;--&lt;/span&gt; prom-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set &lt;code&gt;PROM_URL&lt;/code&gt; if your Prometheus isn't at &lt;code&gt;http://localhost:9090&lt;/code&gt;. No server handy? &lt;code&gt;prom-mcp demo&lt;/code&gt; runs against fixtures so you can see the tool shapes in action. Claude Desktop users can grab the MCPB bundle from the GitHub releases, and it's listed on the official MCP Registry as &lt;code&gt;io.github.aniketatgithub/prom-mcp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/aniketatgithub/prom-mcp" rel="noopener noreferrer"&gt;https://github.com/aniketatgithub/prom-mcp&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd like feedback on
&lt;/h2&gt;

&lt;p&gt;The tool shapes. If you run agents against real infrastructure, what questions do you wish yours could ask your metrics stack mid-incident? That list is my roadmap.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>prometheus</category>
      <category>go</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
