ForkScalewayScalewaypublished Sep 24, 2026seen 2w

scaleway/opencost

forked from opencost/opencost

Open original ↗

Captured source

source ↗
published Sep 24, 2026seen 2wcaptured 2whttp 200method plain

scaleway/opencost

Description: Cost monitoring for Kubernetes workloads and cloud costs

License: Apache-2.0

Stars: 0

Forks: 0

Open issues: 0

Created: 2026-09-24T15:22:08Z

Pushed: 2026-09-24T15:23:51Z

Default branch: develop

Fork: yes

Parent repository: opencost/opencost

Archived: no

README: ![OpenSSF Best Practices](https://www.bestpractices.dev/projects/6219)

![](./opencost-header.png)

OpenCost — your favorite open source cost monitoring tool for Kubernetes and cloud spend

OpenCost give teams visibility into current and historical Kubernetes and cloud spend and resource allocation. These models provide cost transparency in Kubernetes environments that support multiple applications, teams, departments, etc. It also provides visibility into the cloud costs across multiple providers.

OpenCost was originally developed and open sourced by Kubecost. This project combines a [specification](/spec/) as well as a Golang implementation of these detailed requirements. The web UI is available in the opencost/opencost-ui repository.

[![OpenCost UI Walkthrough](./ui/src/thumbnail.png)](https://youtu.be/lCP4Ci9Kcdg) *OpenCost UI Walkthrough*

To see the full functionality of OpenCost you can view OpenCost features. Here is a summary of features enabled:

  • Real-time cost allocation by Kubernetes cluster, node, namespace, controller kind, controller, service, or pod
  • Multi-cloud cost monitoring for all cloud services on AWS, Azure, GCP
  • Dynamic on-demand k8s asset pricing enabled by integrations with AWS, Azure, and GCP billing APIs
  • Supports on-prem k8s clusters with custom CSV pricing
  • Allocation for in-cluster K8s resources like CPU, GPU, memory, and persistent volumes
  • Easily export pricing data to Prometheus with /metrics endpoint (learn more)
  • Carbon costs for cloud resources
  • MCP support
  • AI inference cost tracking for vLLM-based deployments (llm-d and compatible): cost per million tokens (input/output), KV cache-corrected pricing, shared infrastructure attribution, REST APIs and Prometheus metrics
  • Support for external costs like Datadog through OpenCost Plugins
  • Free and open source distribution ([Apache2 license](LICENSE))

Getting Started

OpenCost is now installed and managed via the official Helm chart only.

Quick install on any Kubernetes 1.20+ cluster:

helm repo add opencost https://opencost.github.io/opencost-helm-chart
helm repo update
helm install opencost opencost/opencost

Note: The standalone Kubernetes manifest files have been removed. Please use Helm for all installations and upgrades. See the Helm installation docs for details and configuration.

> Note for sharded Prometheus users: > If you run Prometheus in a sharded (HA) setup, set PROMETHEUS_SERVER_ENDPOINT to a global query endpoint (e.g., Thanos Query, Cortex, or Mimir). Pointing to a single Prometheus pod may result in incomplete or intermittent export results. See the Prometheus integration docs for details.

Usage

MCP Server

The OpenCost MCP (Model Context Protocol) server provides AI agents with access to cost allocation and asset data through a standardized interface. The MCP server is disabled by default (opt-in) in all OpenCost deployments, runs on port 8081, and is built into the Helm chart for easy production deployment. Users have full control to enable it or configure custom ports and settings.

Features

  • Opt-in by Default: MCP server is disabled by default to minimize the attack surface and must be explicitly enabled
  • Full User Control: Easy to enable or configure port and settings
  • Allocation Queries: Retrieve cost allocation data with filtering and aggregation
  • Asset Queries: Access detailed asset information including nodes, disks, load balancers, and more
  • Cloud Cost Queries: Query cloud cost data with provider, service, and region filtering
  • HTTP Transport: Uses HTTP for reliable communication with MCP clients
  • Simple Configuration: Easy to enable using standard environment variables
  • Helm Integration: Built into the official Helm chart for production deployments

Quick Start

Using Tilt (Development)

# Clone and start OpenCost with MCP server
# You may also need to clone opencost-ui and opencost-helm-charts repositories
# Make sure the cloned repositories are in the same parent tree as opencost

git clone https://github.com/opencost/opencost.git
cd opencost
tilt up

##### Default Configurations The UI and Prometheus both run on port 9090. You may need to port-forward to a non-default port to access both them at the same time.

Tilt configuration notes (cloud costs):

OpenCost's Tilt values (tilt-values.yaml) include extra environment variables to enable Cloud Cost ingestion in dev:

# tilt-values.yaml (excerpt)
opencost:
exporter:
extraEnv:
CLOUD_COST_ENABLED: "true"
CLOUD_COST_CONFIG_PATH: "/var/cloud-integration/cloud-integration.json"
  • Set CLOUD_COST_ENABLED to "true" to turn on cloud cost ingestion.
  • Point CLOUD_COST_CONFIG_PATH to the mounted cloud integration file used by Tilt (e.g., /var/cloud-integration/cloud-integration.json).
  • Adjust other values in tilt-values.yaml as needed during development.

Using Helm (Production)

# Add the OpenCost Helm repository
helm repo add opencost https://opencost.github.io/opencost-helm-chart
helm repo update

# Deploy OpenCost with MCP server enabled (opt-in)
helm install opencost opencost/opencost --set opencost.mcp.enabled=true

# Access MCP server via port forwarding (example)
kubectl port-forward svc/opencost 8081:8081

The MCP server is disabled by default in the Helm chart. For custom configuration:

# Deploy with MCP server...

Excerpt shown — open the source for the full document.