# workerfuse for agents

workerfuse pauses runaway Cloudflare Workers. It checks spend every five minutes and pauses a script that passes its limit.

## Install for a user

To set up workerfuse for a user, follow [install.md](https://workerfuse.com/install.md). The user signs in and approves your client, then creates a scoped Cloudflare token in the browser. You connect the account with `connect_cloudflare_account`. Tool calls need a trial or an active subscription, except `connect_cloudflare_account`, which starts the trial.

## MCP server

- Endpoint: `https://workerfuse.com/mcp`
- ChatGPT endpoint: `https://workerfuse.com/mcp/chatgpt`. It has the same tools except `connect_cloudflare_account`. Connect Cloudflare accounts on the dashboard.
- Transport: stateless Streamable HTTP with JSON responses
- Auth: OAuth 2.1 with PKCE and dynamic client registration. Add the URL with no key, and your client starts OAuth on the first 401. Scopes: `spend:read` for reads, `guard:write` for changes, `offline_access` for refresh. A `wf_` API key in `Authorization: Bearer` also works and has full access. See [auth.md](https://workerfuse.com/auth.md).
- Public: `server/discover` only. `initialize`, `tools/list` and `tools/call` need credentials.
- Plan: tool calls need a trial or an active subscription. See [pricing.md](https://workerfuse.com/pricing.md).
- Skills: [workerfuse-install](https://workerfuse.com/.well-known/agent-skills/workerfuse-install/SKILL.md) and [workerfuse-mcp](https://workerfuse.com/.well-known/agent-skills/workerfuse-mcp/SKILL.md). Docs: [workerfuse.com/developers](https://workerfuse.com/developers).

Connect Claude Code, then run `/mcp` and choose **Authenticate**:

```sh
claude mcp add --transport http workerfuse https://workerfuse.com/mcp
```

## Tools

`accountId` is the 32-character Cloudflare account ID. It is not the workerfuse login ID. Call `list_accounts` to get it. You can omit `accountId` when the login has one account.

| Tool | Effect |
|---|---|
| `list_accounts` | Read the Cloudflare accounts connected to this login, their mode and their last report time. |
| `get_spend` | Read the latest estimated hourly and daily spend for each script. |
| `list_events` | Read the latest 100 reports that contain pauses or alerts. |
| `pause_script` | Queue a pause of one script for the next guard run. |
| `resume_script` | Queue a restore of the latest recorded pause of one script. |
| `set_limits` | Replace all hosted limits for one Cloudflare account. |
| `connect_cloudflare_account` | Check a scoped Cloudflare `token`, store it encrypted, and start managed guarding and the trial. |

The four write tools are marked destructive. A queued command is not proof that it ran. Read the next reports with `list_events` to confirm it. A command can take two runs, about 10 minutes.

## Rules for agents

- Ask the user before you call `pause_script`, `resume_script`, `set_limits`, or `connect_cloudflare_account`.
- Spend values are estimates from Cloudflare analytics. They are not live billing.
- Treat the API key like a password. Do not write it to logs or commit it.

## Support

support@workerfuse.com
