# cron402 MCP server

> Schedules webhook calls and manages recurring tasks using USDC payments on the Base network.

- Repository: https://github.com/userdefault13/ai-cron-site
- Page: https://hostedmcp.org/servers/userdefault13/cron402-mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 1.1.1

## Install

### Claude Code

```sh
claude mcp add --env 'CRON402_PRIVATE_KEY=<YOUR_CRON402_PRIVATE_KEY>' cron402-mcp -- npx -y cron402-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "cron402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cron402-mcp"
      ],
      "env": {
        "CRON402_PRIVATE_KEY": "<YOUR_CRON402_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "cron402-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cron402-mcp"
      ],
      "env": {
        "CRON402_PRIVATE_KEY": "<YOUR_CRON402_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"cron402-mcp","type":"stdio","command":"npx","args":["-y","cron402-mcp"],"env":{"CRON402_PRIVATE_KEY":"<YOUR_CRON402_PRIVATE_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "cron402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cron402-mcp"
      ],
      "env": {
        "CRON402_PRIVATE_KEY": "<YOUR_CRON402_PRIVATE_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add cron402-mcp --env 'CRON402_PRIVATE_KEY=<YOUR_CRON402_PRIVATE_KEY>' -- npx -y cron402-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.cron402-mcp]
command = "npx"
args = ["-y", "cron402-mcp"]

[mcp_servers.cron402-mcp.env]
CRON402_PRIVATE_KEY = "<YOUR_CRON402_PRIVATE_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'CRON402_PRIVATE_KEY=<YOUR_CRON402_PRIVATE_KEY>' cron402-mcp npx -- -y cron402-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "cron402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cron402-mcp"
      ],
      "env": {
        "CRON402_PRIVATE_KEY": "<YOUR_CRON402_PRIVATE_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CRON402_PRIVATE_KEY` | no | yes | Agent wallet private key (0x…). Fund with USDC on Base mainnet or Sepolia. Without it the server starts read-only: the free tools still work. |
| `CRON402_API_URL` | no | no | cron402 API base URL. Defaults to the production Worker. |
| `CRON402_NETWORK` | no | no | CAIP-2 network id. Default eip155:8453 (Base mainnet); use eip155:84532 for Sepolia. |
| `CRON402_STATE_DIR` | no | no | Directory where created job ids are remembered so list_crons can recover them. Defaults to ~/.cron402. |

## Tools (10)

- `cron402_guide`: READ THIS FIRST before using any other cron402 tool. Free, no payment. Returns the exact step-by-step procedure for scheduling a recurring webhook, what each tool costs, and the rules you must follow.
- `check_wallet`: Free. Check the cron402 payment wallet before spending: returns the address, network, USDC balance, ETH balance for gas, and how many runs it can afford. Call this before create_cron or topup_cron.
- `preview_schedule`: Free, no payment. Turn a schedule into a validated cron expression and show the next 5 run times in UTC. Accepts plain English like 'every 15 minutes' or 'every weekday at 9am', or a 5-field cron expression. ALWAYS call this before create_cron and show the user the result.
- `create_cron`: PAID: spends $0.008 USDC. Create a scheduled job that calls a webhook URL on a repeating schedule. Call this ONCE per request — calling it twice creates two jobs and charges twice. Run preview_schedule first. Returns a jobId you must report to the user. The job is created with 1 run credit, so it fires once and then stops unless you call topup_cron.
- `topup_cron`: PAID: spends $0.008 per credit ($0.008 / $0.08 / $0.80). Add prepaid run credits to an existing job. Each credit pays for one fire. Also reactivates a job that ran out of credits. Call ONCE — repeating it charges again.
- `get_cron`: Free. Get one job's current status, remaining credits, next run time, and its last 20 executions with HTTP status codes and errors. Use this to answer 'is my cron working?'.
- `list_crons`: Free. List the cron jobs created from this machine with this wallet, with each one's live status and remaining credits. Use this when the user asks what is scheduled or you have lost a job id.
- `pause_cron`: Free. Stop a job from firing without deleting it. Credits are kept. Signs an EIP-712 authorization with the configured wallet — only the wallet that paid for the job can do this.
- `resume_cron`: Free. Start a paused job firing again. The job needs at least 1 credit — if it is 'exhausted', call topup_cron instead. Signs an EIP-712 authorization with the configured wallet.
- `delete_cron`: Free but PERMANENT and irreversible: deletes a job forever and does not refund unused credits. Confirm with the user before calling. If they only want it to stop for now, use pause_cron instead.

## FAQ

### Do I need an API key to use this server?

No, you do not need accounts or API keys; your crypto wallet serves as your credential.

### Can I test a schedule before paying for it?

Yes, you can use the preview_schedule tool to validate a schedule and see the next five run times for free.

### What happens if I don't provide a private key?

The server will still start and allow you to use free tools, but paid tools will not work.
