MCP Server
The Voltimax Platform MCP Server (Voltimax.Platform.McpServer) exposes the platform's metrics and logs APIs as Model Context Protocol (MCP) tools, enabling AI assistants and LLM-based agents to query telemetry data, inspect asset health, and search logs using natural language.
Architecture
The MCP server is a standalone ASP.NET Core application that acts as a proxy between MCP clients (e.g., Claude Desktop, VS Code Copilot) and the Voltimax Platform API:
- Transport: HTTP with Server-Sent Events (SSE) via
ModelContextProtocol.AspNetCore - API Client: Refit-generated typed clients (
IMetricsApi,ILogsApi) fromVoltimax.Platform.Client - Configuration: Single
McpServer:PlatformApiBaseUrlsetting pointing to the platform API
Available Tools
Asset Metrics
| Tool | Description |
|---|---|
get_asset_summaries | Latest telemetry frame for each asset in a gateway |
get_asset_inventory | Comprehensive inventory of all assets and their ingested metrics |
get_asset_health | Health status based on data freshness and ingestion patterns |
get_latest_metrics | Most recent value for each metric across all frames |
get_metric_statistics | Comprehensive statistics (min, max, avg, sum, std dev) over a time range |
get_single_metric | Current value and basic statistics for a specific metric |
get_metric_rate | Rate of change for cumulative metrics (e.g., energy counters) |
Metric Definitions
| Tool | Description |
|---|---|
get_metric_definitions | All metric schema definitions (keys, units, descriptions) |
get_metric_profiles | Available metric profile levels (Basic, Standard, Advanced) |
get_metrics_for_profile | Metrics included in a specific profile level |
get_ingestion_stats | Ingestion pipeline statistics and per-gateway breakdowns |
get_metric_coverage | Coverage analysis comparing defined vs. actually ingested metrics |
Telemetry Queries
| Tool | Description |
|---|---|
query_telemetry | Flexible query with filtering by assets, metrics, time ranges, and pagination |
query_histogram | Time-series histogram bucketed by intervals, grouped by asset and metric |
Cross-Asset Analysis
| Tool | Description |
|---|---|
get_assets_by_metric | Find all assets reporting a specific metric |
get_cross_asset_aggregate | Aggregate a metric across all assets (sum, avg, min, max) |
get_top_assets | Rank assets by metric values (top N highest/lowest) |
Logs
| Tool | Description |
|---|---|
search_logs | Search gateway logs using Elasticsearch query syntax |
Configuration
The server requires a single configuration section in appsettings.json:
json
{
"McpServer": {
"PlatformApiBaseUrl": "https://localhost:5001"
}
}| Setting | Description | Default |
|---|---|---|
PlatformApiBaseUrl | Base URL of the Voltimax Platform API | https://localhost:5001 |
Running Locally
bash
dotnet run --project src/Voltimax.Platform.McpServerThe server starts on https://localhost:46408 (HTTP: http://localhost:46409) by default.
Connecting an MCP Client
Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
json
{
"mcpServers": {
"voltimax": {
"url": "http://localhost:46409/sse"
}
}
}VS Code (Copilot)
Add to your workspace .vscode/mcp.json:
json
{
"servers": {
"voltimax": {
"type": "sse",
"url": "http://localhost:46409/sse"
}
}
}