NewAgent Observability — find failures before customers do.
Back to directory
Kubecost logo

Kubecost MCP server: 11 read-only Kubernetes cost tools

A first-party server with eleven read-only tools, and the savings half is the half worth connecting for.

Connector
Official, bundled with the Helm chart
Coverage
Cost allocation, rightsizing, abandoned workloads, savings
Tools
11, all on by default
Biggest risk for an agent
Recommendations are advice, not applied changes

Checked 6 October 2026 · from Kubecost's repository, its README and the server's own tools/list response

One of 91 guides to monitoring and developer tools. Each covers what an AI coding agent can get out of the tool through MCP, the protocol that lets the agent query the tool directly.

Summary

Kubecost ships a first-party MCP server, mcp-kubecost, described in its own README as the Kubecost FinOps MCP Server. It registers 11 tools, all read-only.

Half of them are savings rather than reporting: container rightsizing, cluster rightsizing, persistent-volume sizing, unclaimed volumes, local disk savings, resource quotas and abandoned workloads.

Surveys from before mid-2026 predate it. The repository was created on 10 June 2026, and v0.18.0 shipped on 5 October 2026.

What is the Kubecost MCP server?

It is Kubecost's server for the Model Context Protocol. Kubecost allocates Kubernetes spend, so a connected agent reaches cost by cluster, namespace and workload.

The reporting half is two tools. kubecost_get_workload_costs returns allocation grouped by cluster and workload, and kubecost_get_cost_comparison compares two time windows, which is how a spike gets attributed.

The savings half is seven tools, each pointed at a different waste pattern. Oversized containers, oversized node groups and oversized volumes are three of them.

The rest cover volumes nobody claimed, underused local disks, missing resource quotas, and workloads with almost no network traffic.

Kubecost's eleven read-only tools concentrate on Kubernetes allocation, savings opportunities and workload rightsizing. They explain cluster spend and state, without covering source review, releases or agent behavior.

Part of the workWhat Kubecost has hereCan an agent reach it
Code, tests & reviewNoneNothing for code or review
CI & releaseNoneNo pipeline or deployment tools
Production observabilityWorkload utilization, abandoned workloadsPartial. kubecost_get_abandoned_workloads finds pods with abnormally low network traffic; there are no metrics, logs or traces
Agent observability & evalsNoneNo traces or evaluations for your own agents
AI cost managementKubernetes cost allocation and savings recommendationsPartial. Kubernetes spend is the core strength. Token spend is not a Kubecost concept

In practice, Kubecost answers what a cluster costs and where the waste is. The savings tools are the reason to connect it: they name specific workloads with specific recommendations. It cannot apply any of them, so the change still goes through your normal path.

What can an AI agent do with Kubecost?

TaskToolsWorksWatch out for
Ask what a namespace costskubecost_get_workload_costs kubecost_list_windowsYesCall kubecost_list_windows first, or the query can be rejected for its window
Explain a cost spikekubecost_get_cost_comparisonYesCompares two windows, so the answer depends on which two you pick
Find the biggest wins firstkubecost_get_savings_overviewYesThe ranking is by estimated saving, so it does not rank by how easy a change is to make
Right-size containerskubecost_get_container_sizingYesRecommendations vary by sizing profile, so the profile is part of the answer
Right-size the cluster itselfkubecost_get_cluster_rightsizingYesCovers node group scale-in, scale-out and instance-type changes
Clean up storagekubecost_get_pv_sizing kubecost_get_unclaimed_volumes kubecost_get_local_disk_savingsYesUnclaimed volumes are provisioned and unbound, which is pure waste
Find workloads nobody useskubecost_get_abandoned_workloads kubecost_get_quota_sizingYesAbandoned means abnormally low network traffic, which is a heuristic

kubecost_get_savings_overview is the right first call. It ranks every savings category, so the agent can go straight to the one worth the most rather than calling all seven savings tools.

11 tools registered, all on by default, all read-only

Cost reporting3
kubecost_get_workload_costskubecost_get_cost_comparisonkubecost_list_windows
Savings, ranked1
kubecost_get_savings_overview
Compute savings2
kubecost_get_container_sizingkubecost_get_cluster_rightsizing
Storage savings3
kubecost_get_pv_sizingkubecost_get_unclaimed_volumeskubecost_get_local_disk_savings
Waste detection2
kubecost_get_abandoned_workloadskubecost_get_quota_sizing

The README states eleven tools, all read-only, and the wire agrees exactly. Every tool leaves cluster state unchanged. Counted on 25 August 2026 from the installed package. Names follow v0.18.0, released 5 October 2026.

What the tool definitions cost in context

A client that loads every tool definition at the start of a session spends this much context before the first question. Claude Code defers definitions by default through tool search, and loads a tool's definition when the agent needs it. The method below gives the version and date measured.

A context window is the amount of text a model can hold at once. A client that loads every tool definition upfront sends each tool's name, description and input schema to the model when the session starts. That list is charged whether or not a single tool is called.

On 25 August 2026, 11 tools cost between 5,140 and 9,055 tokens, which is 2.6% to 4.5% of a 200,000-token window. Later releases renamed every tool, so current figures differ.

The descriptions and the schemas are both large. Descriptions average 841 characters and schemas 1,079, because each savings tool explains its filters and its sizing assumptions.

Tool setToolsTokens (GPT-5.6, GPT-5.5)Tokens (GPT-4, GPT-3.5)Tokens (Claude Haiku 4.5 to Opus 5)Share of a 200,000-token window
Every tool, as registered on 25 August 2026115,161 to 6,2745,140 to 6,2956,970 to 9,0552.6% to 4.5%

Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 25 August 2026 from tools/list on the package installed from the repository. It was run locally with a placeholder base URL.

Registration is static, so no Kubecost instance answered. Figures cover name, description and input schema. The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 22%. Reasoning tokens are output, spent per request. This count is billed as input whenever the client loads it.

The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. The definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is about a third.

Kubecost MCP server limits: where answers come back incomplete

Kubecost returns recommendations, not applied changes. The limits below follow from that.

The agent says: “I have right-sized the deployment.” Nothing was applied.

All eleven tools are read-only, and the README says so. kubecost_get_container_sizing returns recommendations and a saving estimate; it does not change a workload.

The saving is therefore potential rather than realized, and it stays potential until someone edits the manifest.

Guard: Require the agent to describe savings as recommendations, and to name the sizing profile that produced them.

The agent says: “This workload is abandoned.” That is a network-traffic heuristic.

kubecost_get_abandoned_workloads returns pods with abnormally low network traffic, which its README calls possible abandoned workloads. A batch job or a local-only process fits that pattern while being entirely in use.

Guard: Treat the list as candidates for a conversation with the owning team, not as a delete list.

Guides written before mid-2026 will tell you Kubecost has no MCP server.

Lists compiled before June 2026 record Kubecost as having none, because kubecost/mcp-kubecost was created on 10 June 2026.

Guard: Check the kubecost/mcp-kubecost repository directly for the current state.

How to configure Kubecost MCP for agents

  1. 1

    Decide between the bundled and the standalone version

    The README says the MCP is bundled with the Kubecost Helm installation by default, and that the repository may carry newer versions.

  2. 2

    Check the Kubecost version

    The README states compatibility with any Kubecost 3.x, with release notes worth reading for dependencies.

  3. 3

    Set the base URL

    KUBECOST_BASE_URL is required, and the server exits with a named configuration error without it.

  4. 4

    Read the auth documentation separately

    Authentication, OIDC, API keys and pod hardening live in the repository's own auth documentation rather than the main README.

Paste this into your agent’s instructions

Every savings number is a recommendation under an assumed sizing profile, and none of it has been applied. The block keeps both facts in the answer.

Terminal
When you answer using Kubecost MCP tools, state:
- The cluster, namespace and time window the numbers cover.
- That savings figures are recommendations, not applied
  changes, and which sizing profile produced them.
- For abandoned workloads, that the signal is abnormally low
  network traffic rather than a proven lack of use.
Never state that data does not exist. State that no workloads
matched the window and filters above.
Write your answer in ASD-STE100 Simplified Technical
English. Use short sentences with one idea in each.

Do you need the MCP server at all?

Not for a monthly review. Kubecost's own interface shows the same savings, and it costs nothing in context.

The connector earns its place when the agent is already in the cluster's manifests. Reading a rightsizing recommendation and editing the resource block is one conversation rather than two tools.

OpenCost is the upstream open-source project and ships its own MCP server, which covers allocation without Kubecost's savings analysis.

Connect it when an agent is changing manifests. Use the interface for periodic review.

Kubecost MCP server setup

The simplest route is the Helm chart, because the MCP ships bundled with the Kubecost installation by default.

For a local client, install the package from the repository and point KUBECOST_BASE_URL at your Kubecost service. An HTTP entry point is also provided.

Claude Code

No credentials appear here for a cluster-internal Kubecost. Authentication, OIDC and API keys are documented separately in the repository.

Terminal
claude mcp add-json "kubecost" '{"command":"mcp-kubecost",
  "env":{"KUBECOST_BASE_URL":"http://kubecost.internal:9090"}}'

Cursor

In ~/.cursor/mcp.json. No credentials appear here for a cluster-internal instance; the base URL is the only required value.

Terminal
{"mcpServers":{"kubecost":{"command":"mcp-kubecost",
  "env":{"KUBECOST_BASE_URL":"http://kubecost.internal:9090"}}}}

Codex CLI

Codex reads TOML, so the JSON blocks above will not transfer. No credentials belong here either for an unauthenticated instance.

Terminal
[mcp_servers.kubecost]
command = "mcp-kubecost"
env = { KUBECOST_BASE_URL = "http://kubecost.internal:9090" }

Every other client

Each block below is the configuration for one client, with the file path and the key that client expects.

The bundled Helm route

The default path, and the one most installations already have. No credentials appear here: the chart configures OIDC or API keys where they are needed.

Terminal
# The MCP ships with the Kubecost Helm install by default.
# The repository's own chart carries newer versions:
#   charts/mcp-kubecost
HTTP entry point

The package installs a second entry point for HTTP transport. No credentials appear here; authorize the port itself or put OIDC in front of it.

Terminal
KUBECOST_BASE_URL=http://kubecost.internal:9090 \
mcp-kubecost-http

Read-only access, permissions and security

  • Every tool reads

    The README states all eleven are read-only, and the captured list contains no create, update or delete tool.

  • Nothing is applied

    Rightsizing and quota tools return recommendations; changing a workload still goes through your normal deployment path.

  • Telemetry is flagged as experimental

    The README carries a telemetry section marked experimental, which is worth reading before a production rollout.

  • Auth is documented apart from the README

    Authentication, OIDC, API keys and pod hardening live in the repository's auth documentation.

Troubleshooting

The server exits at startup
KUBECOST_BASE_URL is missing. The server raises a configuration error naming that variable and stops before registering tools.
Cost queries reject the time window
Call kubecost_list_windows first. It returns the valid windows a Kubecost cost query accepts.
Rightsizing numbers look aggressive
Container recommendations depend on a sizing profile. The README documents the profiles and the percentile each uses, so the profile is part of the answer.
A workload is flagged abandoned but is in use
kubecost_get_abandoned_workloads finds pods with abnormally low network traffic. A workload that does local work without network traffic will look abandoned to it.
Tools go missing after an upgrade
v0.18.0 renamed every tool and prompt to the kubecost_<verb>_<noun> pattern. Update allowlists and saved prompts that use the old names, such as get_savings_overview.

Kubecost MCP server: Reference

ItemValue
StatusRepository created 10 June 2026 · pushed 5 October 2026 · v0.18.0
Adoption1 star on 6 October 2026 · first-party in the kubecost organization
LicenseApache-2.0
DistributionBundled with the Kubecost Helm installation, plus a chart and Dockerfile in the repository
CompatibilityAny Kubecost 3.x, per the README
AuthKUBECOST_BASE_URL required; OIDC and API keys documented separately
Tools11, all on by default, all read-only
Entry pointsmcp-kubecost for stdio and mcp-kubecost-http for HTTP
Context cost5,140 to 9,055 tokens, measured 25 August 2026

What engineers report

The repository is new and has little adoption to report, so the facts below are its own metadata and the wire capture.

What was checkedWhat it shows
Stars1
Created10 June 2026
Last push5 October 2026
LicenseApache-2.0
Tools returned by tools/list11
Tools claimed by the README11, matching exactly
Writing tools0
Average description841 characters per tool, on 25 August 2026

Repository facts from the GitHub API, retrieved 6 October 2026. Tool counts come from the server's own tools/list response on 25 August 2026, and match the README's stated count of eleven. Tool names follow the v0.18.0 source.

Should you connect an agent to Kubecost?

Yes. Best for the bundled Helm deployment, with savings treated as candidates rather than decisions.

Strongest fit
Kubecost users who want savings recommendations named in the same session where the manifests get edited.
Main advantage
Seven savings tools covering distinct waste patterns, ranked by kubecost_get_savings_overview.
Main weakness
New and unproven: created in June 2026 with no adoption signal yet.
Operational risk
Low. Every tool reads, and nothing it recommends is applied automatically.

From Oodle

One platform for agent traces and infrastructure

Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface.

See agent observability

Frequently asked questions

Does Kubecost have an MCP server?

Yes, since June 2026. kubecost/mcp-kubecost is first-party and Apache-2.0. Lists compiled before June 2026 record it as having none.

How many tools does it have?

11, all read-only. Counted from the server's own tools/list response on 25 August 2026, matching the count its README states. v0.18.0 renamed all 11 on 5 October 2026 and kept the count.

Do I have to install it?

Usually not. The README says the MCP is bundled with the Kubecost Helm installation by default, though the repository may carry newer versions.

Can an agent apply a rightsizing recommendation?

No. Every tool reads. The recommendation has to be applied through your normal deployment path.

What does abandoned mean?

kubecost_get_abandoned_workloads returns pods with abnormally low network traffic. It is a heuristic, so a local-only or batch workload can appear on the list.

Changelog

  • 5 October 2026. v0.18.0 renamed every tool and prompt to a kubecost_<verb>_<noun> pattern, a breaking change. It also moved to FastMCP 4.
  • 1 September 2026. kubecost/mcp-kubecost v0.11.0 released.
  • 25 August 2026. v0.8.0 released.
  • 7 July 2026. First release, v0.1.1. Three releases shipped that day, up to v0.2.0.
  • 10 June 2026. kubecost/mcp-kubecost created on GitHub.

Sources

Every number on the page traces to one of these

  1. Repository facts from the GitHub API · kubecost/mcp-kubecost, retrieved 6 October 2026
  2. Tool rename mapping from the repository CHANGELOG at tag v0.18.0
  3. Tool list, read-only claim, Helm bundling and version compatibility from the repository README
  4. Tool counts, descriptions and schema sizes from the server's own tools/list response

Kubecost’s own MCP documentation

Also cloud and Kubernetes cost:

For what the cluster is doing: