Prometheus MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to query and analyze Prometheus metrics through standardized interfaces.
Overview
Prometheus MCP Server is a Model Context Protocol (MCP) server that allows AI assistants to query and analyze Prometheus metrics through standardized interfaces.
To use the Prometheus MCP Server, ensure your Prometheus server is accessible, configure the necessary environment variables, and run the server either directly or using Docker.
- Execute PromQL queries against Prometheus. - Discover and explore metrics, including listing available metrics and viewing query results. - Support for authentication via basic auth or bearer token. - Docker containerization for easy deployment. - Interactive tools for AI assistants with configurable options.
- Enabling AI assistants to perform real-time analysis of Prometheus metrics.
- Facilitating automated monitoring and alerting based on Prometheus data.
- Providing a standardized interface for querying metrics across different applications.
Add to your AI client
Use these steps to connect Prometheus MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"prometheus-mcp-server-pab1it0": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"prometheus-mcp-server-pab1it0": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"prometheus-mcp-server-pab1it0": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"prometheus-mcp-server-pab1it0": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"prometheus-mcp-server-pab1it0": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"prometheus-mcp-server-pab1it0": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-prometheus-mcp-server-pab1it0"
]
}
}
}FAQ
**What is the purpose of the Prometheus MCP Server?**
It enables AI assistants to interact with Prometheus metrics using a standardized protocol.
**Is Docker required to run the server?**
No, Docker is optional; you can run the server directly if preferred.
**What authentication methods are supported?**
The server supports basic authentication and bearer token authentication.