pmmcp
OfficialAllows pmmcp to create and organize investigation dashboards in a configured Grafana folder.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pmmcp — PCP MCP Service
An MCP server that exposes Performance Co-Pilot (PCP) metrics to AI agents via pmproxy. Enables Claude and other LLMs to query live and historical performance data from any PCP-monitored host.
Try It Out Locally
No PCP infrastructure? No problem. The bundled compose stack generates a week of realistic synthetic performance data — a SaaS production host with daily traffic patterns, morning ramps, lunch lulls, and periodic CPU/disk spikes — seeds it into pmproxy's time-series backend, and has everything ready for Claude to analyse.
1. Start the stack
podman compose up -dThis runs six services in order:
pmlogsynth-generator — generates PCP archives from
profiles/scenarios/saas-diurnal-week.ymlredis-stack — time-series backend (Valkey/Redis, port 6379)
pmlogsynth-seeder — loads the archives into the time-series store
pcp — pmcd + pmproxy, ready to serve queries (port 44322)
grafana — Grafana with PCP plugin and auto-provisioned datasources (port 3000)
mcp-grafana — MCP server for Grafana, SSE transport (port 8000)
The generator and seeder are one-shot jobs; allow ~30–60 seconds for them to complete. Check progress with:
podman compose logs -f pmlogsynth-generator pmlogsynth-seederOnce seeded, verify data is queryable:
curl -s "http://localhost:44322/series/query?expr=kernel.all.cpu.user" | head -c 2002. Browse Grafana dashboards
Open http://localhost:3000 — no login required (anonymous admin is enabled). Navigate to Connections → Data sources to see the auto-provisioned PCP Valkey (historical) and PCP Vector (live) datasources.
The mcp-grafana service exposes a Grafana MCP server at http://localhost:8000/sse for AI agents that need to create dashboards or query Grafana programmatically.
3. Connect pmmcp to Claude Code
git clone <repository-url>
cd pmmcp
uv syncAdd to .mcp.json in your project root (or ~/.claude/mcp.json for global config):
{
"mcpServers": {
"pmmcp": {
"command": "uv",
"args": ["run", "pmmcp", "--pmproxy-url", "http://localhost:44322"]
}
}
}Restart Claude Code (or /mcp to reload) and confirm pmmcp appears in the connected servers list.
4. Ask Claude to investigate
The seeded dataset is saas-prod-01 — a simulated production host with a week of
realistic diurnal traffic. Try these to get a feel for what pmmcp can do:
Explore the data:
What hosts and metrics are available?Spot the daily pattern:
Show me CPU utilisation on saas-prod-01 over the past 7 days. Are there any recurring spikes?Drill into an incident:
There's a CPU and disk spike that seems to happen every day on saas-prod-01.
When exactly does it occur, how severe is it, and how long does it last?Compare periods:
Compare the morning peak to the overnight baseline on saas-prod-01 across CPU, memory, disk, and network.Use a prompt template for a guided investigation workflow:
/investigate_subsystem subsystem=cpu host=saas-prod-015. Tear down when done
podman compose down --volumes--volumes purges the generated archive data so the next up starts fresh.
Related MCP server: prometheus-mcp
What It Does
pmmcp gives AI agents 9 MCP tools and 7 MCP prompt templates for performance investigation. See Investigation Flow Architecture for how the coordinator-specialist pattern works.
Tools
Tool | Description |
| List monitored hosts with labels and metadata |
| Browse the metric namespace tree or search by keyword |
| Get full metadata for one or more metrics |
| Fetch current metric values from a live host |
| Fetch historical time-series data with auto-interval resolution |
| Execute raw PCP series query expressions |
| Statistical comparison of two time windows |
| Full-text search across metric names and help text |
| Create computed metrics on the fly |
Prompt templates
Invoke any prompt from your MCP client to get a guided investigation workflow. All prompts follow a discovery-first pattern and include guard clauses for missing tools, no-metrics-found, and out-of-retention timeranges.
Prompt | Required args | Optional args | What it does |
| (none) |
| Registers derived metrics, then points to |
|
|
| Dispatches 6 specialists in parallel, synthesises unified root-cause narrative |
|
|
| Deep domain-expert investigation for one subsystem |
|
|
| Discovery-first investigation of a single subsystem (cpu, memory, disk, network, process, or general) |
|
|
| Maps a symptom to likely subsystems, confirms host-specific vs fleet-wide scope, delivers ranked findings with recommended actions |
|
|
| Broad-scan comparison between two time windows, ranked by magnitude of change, with root-cause hypothesis |
| (none) |
| Checks all fleet hosts across default subsystems and produces a host-by-subsystem summary with OK/WARN/CRIT indicators |
Connect to Your Infrastructure
Prerequisites
PCP installed and running on at least one monitored host
pmproxy running and accessible (default port: 44322)
Time-series tools (
pcp_fetch_timeseries,pcp_query_series,pcp_compare_windows) require pmproxy configured with a Valkey/Redis backend
Python 3.11+ with uv
Claude Code or another MCP client
Install and configure
git clone <repository-url>
cd pmmcp
uv syncAdd to .mcp.json:
{
"mcpServers": {
"pmmcp": {
"command": "uv",
"args": ["run", "pmmcp", "--pmproxy-url", "http://your-pmproxy-host:44322"]
}
}
}See Running pmmcp below for all CLI flags and environment variables.
Running pmmcp
CLI flags
Flag | Default | Description |
| (env) | pmproxy base URL; overrides |
|
| HTTP request timeout in seconds |
|
| MCP transport: |
|
| Bind host for HTTP transport |
|
| Bind port for HTTP transport |
Environment variables
Variable | Default | Description |
| (required) | pmproxy base URL |
|
| HTTP request timeout in seconds |
|
| MCP transport mode |
|
| Bind host for HTTP transport |
|
| Bind port for HTTP transport |
|
| Grafana folder for investigation dashboards |
|
| Output directory for HTML fallback reports |
Precedence: CLI flag > environment variable > default.
HTTP transport
For shared team access, run pmmcp in HTTP mode:
# Direct
uv run pmmcp --transport streamable-http --host 0.0.0.0 --port 8080 --pmproxy-url http://your-pmproxy:44322
# Docker
docker run -e PMPROXY_URL=http://your-pmproxy:44322 pmmcp:latest
# Compose (includes full PCP stack)
docker compose up -dMCP client config for a remote pmmcp server:
{
"mcpServers": {
"pmmcp": {
"url": "http://pmmcp-host:8080/mcp"
}
}
}The /healthcheck endpoint (HTTP mode only) returns JSON with pmproxy connectivity status:
curl http://localhost:8080/healthcheckContributing
See CONTRIBUTING.md.
Troubleshooting
"Connection refused"
Verify pmproxy is running:
systemctl status pmproxyCheck the URL and port in your MCP configuration
Ensure firewall allows access to port 44322:
curl http://your-pmproxy-host:44322/series/sources
"No time series data available"
Time-series queries require pmproxy's
[pmseries]section to be configured with Valkey/RedisVerify:
curl http://your-pmproxy-host:44322/series/query?expr=kernel.all.load
"No metrics found"
Verify PCP collectors are running:
pminfo -f kernel.all.loadCheck pmproxy connectivity:
curl http://your-pmproxy-host:44322/pmapi/metric?prefix=kernel
Slow responses
Reduce the time window or use a coarser interval
Use fewer metrics per query
Check pmproxy and Valkey/Redis performance independently
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
AgentPMT is the AI agent marketplace that turns any MCP-compatible AI assistant into an autonomous employee. Connect once and your agents gain access to a growing ecosystem of tools, workflows, and skills spanning communication, data analytics, development, file management, search, and more. AgentPMT dynamically discovers and orchestrates tools from across the MCP ecosystem, so your agents can independently find the right tool for any task without manual configuration.
MCP observability. Query live traffic, errors, duration, and alerts from your AI agent.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides access to Prometheus metrics and queries through standardized Model Context Protocol interfaces, allowing AI assistants to execute PromQL queries and analyze metrics data.6526MIT
- AlicenseBqualityFmaintenanceProvides seamless integration between AI assistants and Prometheus, enabling natural language interactions with your monitoring infrastructure. This server allows for effortless querying, discovery, and analysis of metrics.10655 npm27MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to query Prometheus metrics, discover available data, and analyze system performance through natural language interactions.5128 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides access to Prometheus metrics and queries, allowing AI assistants to execute PromQL queries and analyze metrics data through standardized MCP interfaces.MIT