{
  "markdown": "# pcp-mcp\n\nMCP server for [Performance Co-Pilot (PCP)](https://pcp.io/) metrics.\n\nQuery system performance metrics via the Model Context Protocol - CPU, memory, disk I/O, network, processes, and more.\n\n📖 **[Full Documentation](https://major.github.io/pcp-mcp)** | 🚀 **[Getting Started](https://major.github.io/pcp-mcp/getting-started/)**\n\n[![CI](https://github.com/major/pcp-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/major/pcp-mcp/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/major/pcp-mcp/branch/main/graph/badge.svg)](https://codecov.io/gh/major/pcp-mcp)\n[![PyPI version](https://badge.fury.io/py/pcp-mcp.svg)](https://pypi.org/project/pcp-mcp/)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## 🚀 Quick Start (No Install)\n\nRun immediately with [uvx](https://docs.astral.sh/uv/) — no installation required:\n\n```bash\nuvx pcp-mcp\n```\n\nOr install as a persistent global tool:\n\n```bash\nuvx tool install pcp-mcp\npcp-mcp\n```\n\n## 📦 Installation\n\n```bash\npip install pcp-mcp\n```\n\nOr with [uv](https://docs.astral.sh/uv/):\n\n```bash\nuv add pcp-mcp\n```\n\n## 📋 Requirements\n\n- **Python**: 3.10+\n- **PCP**: Performance Co-Pilot with `pmcd` and `pmproxy` running\n  ```bash\n  # Fedora/RHEL/CentOS\n  sudo dnf install pcp\n  sudo systemctl enable --now pmcd pmproxy\n  \n  # Ubuntu/Debian\n  sudo apt install pcp\n  sudo systemctl enable --now pmcd pmproxy\n  ```\n\n## ⚙️ Configuration\n\nConfigure via environment variables:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `PCP_HOST` | pmproxy host | `localhost` |\n| `PCP_PORT` | pmproxy port | `44322` |\n| `PCP_TARGET_HOST` | Target pmcd host to monitor | `localhost` |\n| `PCP_USE_TLS` | Use HTTPS for pmproxy | `false` |\n| `PCP_TLS_VERIFY` | Verify TLS certificates | `true` |\n| `PCP_TLS_CA_BUNDLE` | Path to custom CA bundle | (optional) |\n| `PCP_TIMEOUT` | Request timeout (seconds) | `30` |\n| `PCP_USERNAME` | HTTP basic auth user | (optional) |\n| `PCP_PASSWORD` | HTTP basic auth password | (optional) |\n| `PCP_ALLOWED_HOSTS` | Hostspecs allowed via host param | (optional) |\n\n## 🎯 Usage\n\n### Monitor localhost (default)\n\n```bash\npcp-mcp\n```\n\n### Monitor a remote host\n\n```bash\nPCP_TARGET_HOST=webserver1.example.com pcp-mcp\n```\n\nOr use the CLI flag:\n\n```bash\npcp-mcp --target-host webserver1.example.com\n```\n\n### Connect to remote pmproxy\n\n```bash\nPCP_HOST=metrics.example.com pcp-mcp\n```\n\n### Use SSE transport\n\n```bash\npcp-mcp --transport sse\n```\n\n## 🔌 MCP Client Configuration\n\n### Claude Desktop\n\nAdd to `~/.config/claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pcp-mcp\"]\n    }\n  }\n}\n```\n\nFor remote monitoring:\n\n```json\n{\n  \"mcpServers\": {\n    \"pcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pcp-mcp\", \"--target-host\", \"webserver1.example.com\"]\n    }\n  }\n}\n```\n\n> 💡 Using `uvx` means you don't need pcp-mcp installed — it runs directly from PyPI.\n\n## 🛠️ Available Tools\n\n### System Monitoring\n\n- **`get_system_snapshot`** - Point-in-time system overview (CPU, memory, disk, network, load)\n- **`get_process_top`** - Top processes by CPU, memory, or I/O usage\n- **`query_metrics`** - Fetch current values for specific PCP metrics\n- **`search_metrics`** - Discover available metrics by name pattern\n- **`describe_metric`** - Get detailed metadata about a metric\n\n### Example Queries\n\n```\n\"What's the current CPU usage?\"\n→ Uses get_system_snapshot\n\n\"Show me the top 10 processes by memory usage\"\n→ Uses get_process_top(sort_by=\"memory\", limit=10)\n\n\"What metrics are available for network traffic?\"\n→ Uses search_metrics(pattern=\"network\")\n\n\"Get detailed info about kernel.all.load\"\n→ Uses describe_metric(name=\"kernel.all.load\")\n```\n\n## 💡 Use Cases\n\n### Performance Troubleshooting\n\nAsk Claude to:\n- \"Analyze current system performance and identify bottlenecks\"\n- \"Why is my disk I/O so high?\"\n- \"Which processes are consuming the most CPU?\"\n\n### System Monitoring\n\n- \"Give me a health check of the production server\"\n- \"Compare CPU usage over the last minute\"\n- \"Monitor network traffic on eth0\"\n\n### Capacity Planning\n\n- \"What's the memory utilization trend?\"\n- \"Show me disk usage across all filesystems\"\n- \"Analyze process resource consumption patterns\"\n\n## 🏗️ Architecture\n\n```\n┌─────────┐         ┌─────────┐          ┌─────────┐         ┌─────────┐\n│   LLM   │ ◄─MCP─► │ pcp-mcp │ ◄─HTTP─► │ pmproxy │ ◄─────► │  pmcd   │\n└─────────┘         └─────────┘          └─────────┘         └─────────┘\n                                         (REST API)          (metrics)\n```\n\n- **pcp-mcp**: FastMCP server exposing PCP metrics via MCP tools\n- **pmproxy**: PCP's REST API server (runs on port 44322 by default)\n- **pmcd**: PCP metrics collector daemon\n- **Remote monitoring**: Set `PCP_TARGET_HOST` to query a different pmcd instance via pmproxy\n\n## 🔧 Development\n\n```bash\n# Install dependencies\nuv sync --dev\n\n# Run all checks\nmake check\n\n# Individual commands\nmake lint       # ruff check\nmake format     # ruff format\nmake typecheck  # ty check\nmake test       # pytest with coverage\n```\n\n## 📖 Documentation\n\nFull documentation at [https://major.github.io/pcp-mcp](https://major.github.io/pcp-mcp)\n\n## 📄 License\n\nMIT\n\n<!-- mcp-name: io.github.major/pcp -->\n",
  "bytes": 5410,
  "sha": "e012c70275f5297510d53a3f9f2b071233a01cc206ce67c65b9c95b375b0d44d",
  "repo_slug": "major/pcp-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_major_pcp_25f70847/readme"
}