CloudZero MCP server

Integrates with CloudZero's v2 API to enable direct querying of cloud cost data, dimensions, budgets, and insights for financial teams analyzing spending patterns and optimization opportunities.
Back to servers
Setup instructions
Provider
Dustin Burke
Release date
Mar 19, 2025
Language
Python
Stats
3 stars

This MCP server allows you to interact with your CloudZero cost data through Large Language Models like Claude. You can query your cloud billing information, analyze trends, and visualize costs directly through natural language conversations.

Installation

Prerequisites

Setting Up the Environment

  1. Install the project dependencies:

    uv init
    uv sync
    
  2. Generate a CloudZero API key from CloudZero API Keys page

  3. Create a .env file with your API key:

    CLOUDZERO_API_KEY=YOUR_SECRET_KEY
    

Installing the MCP Server in Claude Desktop

  1. Install the MCP server:

    uv run mcp install server.py
    
  2. Configure Claude Desktop:

    • Open Claude Desktop and navigate to Settings > Developer > Edit Config
    • Edit your claude_desktop_config.json file to include:
    "CloudZero": {
      "command": "/Users/USERNAME/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/Users/USERNAME/workspace/open_source/cloudzero-mcp/server.py"
      ]
    }
    

    Note: Replace USERNAME with your actual username.

  3. Restart Claude Desktop to activate the MCP server.

Usage

Verifying the Setup

After installation, confirm the server is working by asking Claude:

"What tools are available for cloud billing?"

Claude should list the CloudZero MCP tools that are available.

Available Tools

The MCP server provides these CloudZero-specific tools:

  • get_costs: Retrieve billing data between specific dates
  • get_dimensions: Get billing dimensions
  • list_budgets: Display all budgets
  • list_insights: Show available insights

Example Queries

You can ask Claude questions about your cloud costs such as:

  • "Show me last month's AWS costs"
  • "Compare costs between January and February"
  • "Plot a month-over-month cost difference"
  • "What are my top spending services?"

Troubleshooting

Debugging the MCP Server

If you encounter issues, you can run the development server with an interactive GUI:

uv run mcp dev server.py

This launches a debugging interface where you can inspect requests and responses without restarting Claude Desktop.

Common Issues

  • If Claude doesn't recognize the CloudZero tools, check your claude_desktop_config.json configuration
  • Verify your API key is correctly set in the .env file
  • Look for error messages in Claude Desktop's logs under the Settings menu

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "CloudZero" '{"command":"/Users/USERNAME/.local/bin/uv","args":["run","--with","mcp[cli]","mcp","run","/Users/USERNAME/workspace/open_source/cloudzero-mcp/server.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "CloudZero": {
            "command": "/Users/USERNAME/.local/bin/uv",
            "args": [
                "run",
                "--with",
                "mcp[cli]",
                "mcp",
                "run",
                "/Users/USERNAME/workspace/open_source/cloudzero-mcp/server.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "CloudZero": {
            "command": "/Users/USERNAME/.local/bin/uv",
            "args": [
                "run",
                "--with",
                "mcp[cli]",
                "mcp",
                "run",
                "/Users/USERNAME/workspace/open_source/cloudzero-mcp/server.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later