CostCapper Help

Help

Connecting Claude and other apps (MCP and API)

Apps can use CostCapper as you: an AI assistant such as Claude through the MCP server, or your own scripts through the API. Either way the app signs in with OAuth: you approve it once in your browser, and it can then do exactly what you can, no more. Turning your account off, or removing your admin rights, applies to your apps straight away.

Before you start (admins)

Claude (MCP)

Add a custom connector with the address https://your-costcapper-address/mcp. Claude opens CostCapper in your browser: sign in if asked, check the app's name and where it will be sent, and choose Allow. In Claude Code: claude mcp add --transport http costcapper https://your-costcapper-address/mcp, then /mcp to sign in.

The tools: whoami, list_machines, get_machine, turn_on (for a number of minutes), release, and for admins list_all_machines, set_managed, force_stop, lock_machine, unlock_machine and recent_activity.

The API

JSON over HTTPS at /api/v1, with Authorization: Bearer <access token>. Get a token with any OAuth 2.1 client library: discovery is at /.well-known/oauth-authorization-server, apps register themselves at /oauth/register, and sign-in uses the authorization code flow with PKCE. Access tokens last an hour; refresh tokens 30 days, and each can be used once.

Errors come back as {"error": "…"} with status 400, 403 or 404; a missing or expired token gets 401.

Disconnecting

See and disconnect your apps on Connected apps.