io.github.major/pcp
This server provides real-time system performance metrics via Performance Co-Pilot (PCP), enabling users to monitor CPU, memory, disk, network, processes and more through natural language queries.
README
pcp-mcp
MCP server for Performance Co-Pilot (PCP) metrics.
Query system performance metrics via the Model Context Protocol - CPU, memory, disk I/O, network, processes, and more.
📖 Full Documentation | 🚀 Getting Started
🚀 Quick Start (No Install)
Run immediately with uvx — no installation required:
uvx pcp-mcp
Or install as a persistent global tool:
uvx tool install pcp-mcp
pcp-mcp
📦 Installation
pip install pcp-mcp
Or with uv:
uv add pcp-mcp
📋 Requirements
- Python: 3.10+
- PCP: Performance Co-Pilot with
pmcdandpmproxyrunning# Fedora/RHEL/CentOS sudo dnf install pcp sudo systemctl enable --now pmcd pmproxy # Ubuntu/Debian sudo apt install pcp sudo systemctl enable --now pmcd pmproxy
⚙️ Configuration
Configure via environment variables:
| Variable | Description | Default |
|---|---|---|
PCP_HOST |
pmproxy host | localhost |
PCP_PORT |
pmproxy port | 44322 |
PCP_TARGET_HOST |
Target pmcd host to monitor | localhost |
PCP_USE_TLS |
Use HTTPS for pmproxy | false |
PCP_TLS_VERIFY |
Verify TLS certificates | true |
PCP_TLS_CA_BUNDLE |
Path to custom CA bundle | (optional) |
PCP_TIMEOUT |
Request timeout (seconds) | 30 |
PCP_USERNAME |
HTTP basic auth user | (optional) |
PCP_PASSWORD |
HTTP basic auth password | (optional) |
PCP_ALLOWED_HOSTS |
Hostspecs allowed via host param | (optional) |
🎯 Usage
Monitor localhost (default)
pcp-mcp
Monitor a remote host
PCP_TARGET_HOST=webserver1.example.com pcp-mcp
Or use the CLI flag:
pcp-mcp --target-host webserver1.example.com
Connect to remote pmproxy
PCP_HOST=metrics.example.com pcp-mcp
Use SSE transport
pcp-mcp --transport sse
🔌 MCP Client Configuration
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"pcp": {
"command": "uvx",
"args": ["pcp-mcp"]
}
}
}
For remote monitoring:
{
"mcpServers": {
"pcp": {
"command": "uvx",
"args": ["pcp-mcp", "--target-host", "webserver1.example.com"]
}
}
}
💡 Using
uvxmeans you don't need pcp-mcp installed — it runs directly from PyPI.
🛠️ Available Tools
System Monitoring
get_system_snapshot- Point-in-time system overview (CPU, memory, disk, network, load)get_process_top- Top processes by CPU, memory, or I/O usagequery_metrics- Fetch current values for specific PCP metricssearch_metrics- Discover available metrics by name patterndescribe_metric- Get detailed metadata about a metric
Example Queries
"What's the current CPU usage?"
→ Uses get_system_snapshot
"Show me the top 10 processes by memory usage"
→ Uses get_process_top(sort_by="memory", limit=10)
"What metrics are available for network traffic?"
→ Uses search_metrics(pattern="network")
"Get detailed info about kernel.all.load"
→ Uses describe_metric(name="kernel.all.load")
💡 Use Cases
Performance Troubleshooting
Ask Claude to:
- "Analyze current system performance and identify bottlenecks"
- "Why is my disk I/O so high?"
- "Which processes are consuming the most CPU?"
System Monitoring
- "Give me a health check of the production server"
- "Compare CPU usage over the last minute"
- "Monitor network traffic on eth0"
Capacity Planning
- "What's the memory utilization trend?"
- "Show me disk usage across all filesystems"
- "Analyze process resource consumption patterns"
🏗️ Architecture
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ LLM │ ◄─MCP─► │ pcp-mcp │ ◄─HTTP─► │ pmproxy │ ◄─────► │ pmcd │
└─────────┘ └─────────┘ └─────────┘ └─────────┘
(REST API) (metrics)
- pcp-mcp: FastMCP server exposing PCP metrics via MCP tools
- pmproxy: PCP's REST API server (runs on port 44322 by default)
- pmcd: PCP metrics collector daemon
- Remote monitoring: Set
PCP_TARGET_HOSTto query a different pmcd instance via pmproxy
🔧 Development
# Install dependencies
uv sync --dev
# Run all checks
make check
# Individual commands
make lint # ruff check
make format # ruff format
make typecheck # ty check
make test # pytest with coverage
📖 Documentation
Full documentation at https://major.github.io/pcp-mcp
📄 License
MIT
<!-- mcp-name: io.github.major/pcp -->
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。