kanmi-perf-mcp
v0.1.0 · MIT License (Free)
Model Context Protocol server for AI assistant integration with KanmiPerf performance data. Enables Claude Code and other MCP clients to access real-time performance metrics.
Install
npm install -g kanmi-perf-mcp
Start the Server
# Default (http://127.0.0.1:3960)
kanmi-perf-mcp
# Custom port/host
kanmi-perf-mcp --port 4000 --host 0.0.0.0
Claude Code Configuration
{
"mcpServers": {
"kanmi-perf": {
"command": "node",
"args": ["path/to/kanmi-perf-mcp/src/server.js"],
"env": {
"PORT": "3960"
}
}
}
}
Available Resources
- Core Web Vitals — LCP, CLS, INP, FCP, TTFB
- Runtime Metrics — Long tasks, memory usage, network info
- Historical Data — Performance trends over time
- Site Comparisons — Relative performance data
MCP Tools
| Tool | Description |
|---|---|
kanmi_analyze_site | Deep performance analysis |
kanmi_get_recommendations | AI-powered optimization suggestions |
kanmi_compare_sites | Relative performance comparison |
kanmi_detect_regressions | Performance degradation detection |
kanmi_export_data | Export performance reports |
API Endpoints
Resources
GET /mcp/resources # List all data sources
GET /mcp/resources/site-{id} # Get specific site data
GET /mcp/resources/sites # Get site list
Analysis
POST /mcp/tools/analyze # Analyze site performance
POST /mcp/tools/recommend # Get recommendations
Real-time
GET /events # SSE stream for live updates
Configuration
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 3960 |
HOST | Server host | 127.0.0.1 |
Requirements
- Node.js 18+
- At least one KanmiPerf package for data source
- MCP-compatible AI assistant (Claude Code recommended)