Back to GuidesDeveloper

Cloptima CLI MCP Setup

8 min readUpdated May 2026

What You Get

Cloptima CLI includes an embedded stdio MCP server. You run cloptima mcp serve locally and your AI client can pull cost intelligence into conversations, investigations, and engineering workflows without any hosted MCP endpoint.

Prerequisites

Install cloptima-cli, create a Personal Access Token in Cloptima settings, and export CLOPTIMA_ACCESS_TOKEN in your shell environment before starting your MCP client.

MCP Server Command

Use this command as the MCP server process in your client configuration. Add --read-only when you want the server to reject mutating operations.

cloptima mcp serve
cloptima mcp serve --read-only

Claude Desktop Example

Add an MCP server entry that launches cloptima and passes your access token via environment variables.

{
  "mcpServers": {
    "cloptima": {
      "command": "cloptima",
      "args": ["mcp", "serve"],
      "env": {
        "CLOPTIMA_ACCESS_TOKEN": "pat_..."
      }
    }
  }
}

Cursor Example

Use the same command/args pattern in Cursor's MCP settings.

{
  "mcpServers": {
    "cloptima": {
      "command": "cloptima",
      "args": ["mcp", "serve"],
      "env": {
        "CLOPTIMA_ACCESS_TOKEN": "pat_..."
      }
    }
  }
}

Cline Example

Configure Cline's MCP server entry with identical command wiring.

{
  "mcpServers": {
    "cloptima": {
      "command": "cloptima",
      "args": ["mcp", "serve"],
      "env": {
        "CLOPTIMA_ACCESS_TOKEN": "pat_..."
      }
    }
  }
}

How Clients Discover It

Your MCP client will automatically discover the available Cloptima capabilities after launch. In practice, that means users can ask cost questions, investigate anomalies, review recommendations, explore Kubernetes cost context, and run recurring cost checks from the AI tool they already use.

Validation and Troubleshooting

Run cloptima version and cloptima accounts list in the same shell used by your AI client. If MCP calls fail, verify token scope, account membership, that cloptima is available in PATH for the MCP client process, and that your client supports stdio MCP transport.

Put This Guide Into Practice

Cloptima automates the strategies described in this guide.

No credit card required
5-minute setup
30-day trial