Cycles — Budget Authority for AI Agents

v0.6.1
io.github.runcycles/cycles-mcp-server Checked 4 days ago Published 4 months ago

Runtime budget authority for AI agents — reserve, enforce, reconcile spend across providers

Values you need

VariableWhat it is
CYCLES_API_KEYrequired secret Cycles API key for authentication. Set CYCLES_MOCK=true for local development without a key.
CYCLES_BASE_URLrequired URL of the Cycles server (e.g. https://api.runcycles.io). Required unless CYCLES_MOCK=true.
CYCLES_MOCKoptional Enable mock mode for local development — no API key or live server required. Default: false
CYCLES_DEFAULT_TENANToptional Optional default tenant merged into any tool call that omits it (explicit fields win).
CYCLES_DEFAULT_WORKSPACEoptional Optional default workspace merged into any tool call that omits it (explicit fields win).
CYCLES_DEFAULT_APPoptional Optional default app merged into any tool call that omits it (explicit fields win).
CYCLES_DEFAULT_WORKFLOWoptional Optional default workflow merged into any tool call that omits it (explicit fields win).
CYCLES_DEFAULT_AGENToptional Optional default agent merged into any tool call that omits it (explicit fields win).
CYCLES_DEFAULT_TOOLSEToptional Optional default toolset merged into any tool call that omits it (explicit fields win).

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add cycles-mcp-server -e 'CYCLES_API_KEY=<CYCLES_API_KEY>' -e 'CYCLES_BASE_URL=<CYCLES_BASE_URL>' -- npx -y --package=@runcycles/mcp-server@0.6.1 cycles-mcp-server
Add to claude_desktop_config.json
{
  "mcpServers": {
    "cycles-mcp-server": {
      "args": [
        "-y",
        "--package=@runcycles/mcp-server@0.6.1",
        "cycles-mcp-server"
      ],
      "command": "npx",
      "env": {
        "CYCLES_API_KEY": "<CYCLES_API_KEY>",
        "CYCLES_BASE_URL": "<CYCLES_BASE_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "cycles-mcp-server": {
      "args": [
        "-y",
        "--package=@runcycles/mcp-server@0.6.1",
        "cycles-mcp-server"
      ],
      "command": "npx",
      "env": {
        "CYCLES_API_KEY": "<CYCLES_API_KEY>",
        "CYCLES_BASE_URL": "<CYCLES_BASE_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "CYCLES_API_KEY",
      "id": "cycles-api-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "CYCLES_BASE_URL",
      "id": "cycles-base-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "cycles-mcp-server": {
      "args": [
        "-y",
        "--package=@runcycles/mcp-server@0.6.1",
        "cycles-mcp-server"
      ],
      "command": "npx",
      "env": {
        "CYCLES_API_KEY": "${input:cycles-api-key}",
        "CYCLES_BASE_URL": "${input:cycles-base-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.cycles-mcp-server]
command = "npx"
args = ["-y", "--package=@runcycles/mcp-server@0.6.1", "cycles-mcp-server"]
env = { "CYCLES_API_KEY" = "<CYCLES_API_KEY>", "CYCLES_BASE_URL" = "<CYCLES_BASE_URL>" }

For AI agents

  1. Ask the user for: CYCLES_API_KEY, CYCLES_BASE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: cycles_reserve, cycles_commit, cycles_release, cycles_extend, cycles_decide, cycles_check_balance, cycles_list_reservations, cycles_get_reservation, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json