Skip to content
LangChain

Prometheus MCP Server for LangChain

io.github.pab1it0/prometheus-mcp-server

MCP server providing Prometheus metrics access and PromQL query execution for AI assistants

client:LangChain transport:stdio runtime:oci

Install Prometheus MCP Server in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "prometheus-mcp-server": {
            "transport": "stdio",
            "command": "docker",
            "args": ["run", "-i", "--rm", "ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

Prometheus MCP Server in other clients