OpenAPI authorization
Authorization: Bearer <MCPO_API_KEY>
The NRP Accounting MCP server provides read-only access to NRP accounting data stored in ClickHouse. It is intended for AI clients and tools that need to answer questions about namespace, institution, node, and resource usage.
get_latest_data_date: get the most recent ingested accounting datelist_active_namespaces: list namespaces with observed usage in a date windowlist_filter_values: discover distinct filter values from actual usage rowstop_resource_consumers: rank namespaces, institutions, or nodes for one resourceget_usage_timeseries: return a daily trend for one namespace, institution, node, or node institutionget_namespace_summary: summarize one namespace by resource and unitget_namespace_daily_trend: return a namespace trend view, defaulting to the last 30 daystop_nodes_for_namespace: rank the highest-usage nodes for one namespace and one resourceget_namespace_details: return namespace metadata, recent trend, and top nodesquery_resource_usage: flexible escape hatch for custom aggregationshttps://nrp-accounting-mcp.nrp-nautilus.io/https://nrp-accounting-mcp.nrp-nautilus.io/openapihttps://nrp-accounting-mcp.nrp-nautilus.io/openapi/docsMCPO_API_KEYOpenAPI authorization
Authorization: Bearer <MCPO_API_KEY>
list_active_namespaces default to the last 30 days.list_filter_values and list_active_namespaces return values observed in actual usage rows, not a static catalog.total_count and is_truncated.gpu, cpu, memory, storage, fpga, network.gpu_hours, gpu-hours, GPU hours, and cpu_core_hours are normalized automatically.resource=gpu returns rows with unit=gpu_hours.foo between 2026-03-22 and 2026-04-21.”foo by GPU usage this week.”gpu and cpu in prompts.The implementation lives in:
Kubernetes manifests live under k8s/base, including:
deployment-mcp.yamldeployment-openapi.yamlservice-mcp.yamlservice-openapi.yamlingress-mcp.yamlconfigmap.yamlsecret.yamlDeployment shape:
Deployment/nrp-accounting-mcp runs the native FastMCP HTTP server on port 8000.Deployment/nrp-accounting-openapi runs mcpo as an MCP-to-OpenAPI bridge on port 8000.nrp-accounting-mcp.nrp-nautilus.io./ to the native MCP service and /openapi to the OpenAPI bridge service.Container and runtime details:
ghcr.io/djw8605/nrp-clickhouse:latestimagePullPolicy: Always is set to avoid stale cached images when using latest.mcpo --host 0.0.0.0 --port 8000 --root-path /openapi --api-key "$MCPO_API_KEY" -- python -m nrp_accounting_pipeline.mcp_serverRequired secret and config values:
CLICKHOUSE_HOSTCLICKHOUSE_USERCLICKHOUSE_PASSWORDMCPO_API_KEYMCP_ALLOWED_HOSTSMCP_ALLOWED_ORIGINSAdmin notes:
421 Invalid Host header.401 Missing or invalid Authorization header, configure its OpenAPI tool server with the Bearer token from MCPO_API_KEY.gpu-hours, query resource=gpu instead. Aliases are normalized automatically, but canonical resource names are still preferred.