The CloudZero Cost Data Integration for Claude project enables users to interact with their cloud cost data in CloudZero using a Large Language Model (LLM) like Claude. This integration leverages the Model Context Protocol (MCP) server and the CloudZero v2 API to provide tools for querying and analyzing cloud cost data directly from Claude Desktop.
get_costs
, get_dimensions
, list_budgets
, and list_insights
.The MCP server acts as a bridge between Claude Desktop and the CloudZero API. Here’s a high-level overview of the process:
graph LR
%%{init: {'theme':'neutral'}}%%
%% Define nodes
A[MCP Host]
B[Local MCP Server]
C[CloudZero API]
D[(Cloud Costs Data)]
%% Define connections
A -->|JSON-RPC 2.0| B
B -->|HTTP/JSON| C
C <--> D
subgraph CloudZero_SaaS
C
D
end
subgraph Background_process
B
end
subgraph Claude_Desktop
A
end
subgraph Local_Machine
Claude_Desktop
Background_process
end
%% Define styles
classDef client padding:10px
classDef server padding:10px
classDef api padding:10px
classDef db padding:10px
%% Apply styles
class A client
class B server
class C api
class D db
initialize
request to the MCP server.Clone the repository and install dependencies:
shell
uv init
uv sync
Generate your CloudZero API key and add it to the .env
file:
env
CLOUDZERO_API_KEY=YOUR_SECRET_KEY
Install the MCP server into Claude Desktop:
shell
uv run mcp install server.py
Edit claude_desktop_config.json
to configure the MCP server:
json
"CloudZero": {
"command": "/Users/USERNAME/.local/bin/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"/Users/USERNAME/workspace/open_source/cloudzero-mcp/server.py"
]
}
Restart Claude Desktop to launch the MCP server.
Once the MCP server is running, you can interact with your cloud cost data directly from Claude Desktop. For example, ask:
For troubleshooting, you can run the MCP development server with an interactive GUI:
uv run mcp dev server.py
This project is licensed under the MIT License.