# Calmlet MCP — Pay-Per-Call Data APIs for AI Agents

> **MCP server:** `https://calmlet-mcp.abang-dwie.workers.dev/mcp`
> **Demo & docs:** `https://calmlet-mcp.abang-dwie.workers.dev/`
> **Machine index:** `https://calmlet-mcp.abang-dwie.workers.dev/llms.txt`
> **Payment descriptor:** `https://calmlet-mcp.abang-dwie.workers.dev/.well-known/x402`

## What this is

Calmlet MCP is a single MCP server that exposes 7 independent pay-per-call
data APIs as 18 typed tools — one tool per operation, each with its
parameters declared directly in its `inputSchema` (typed strings, integers,
numbers, and enums; required parameters are enforced before any payment).
There is no account, no API key, and no subscription. Every call is paid
individually in USDC on Base (chain `eip155:8453`) via the x402 protocol
(HTTP 402 Payment Required). Prices are $0.001–$0.01 per call.

Payment goes directly to the provider wallet:

- **payTo:** `0xBd6239C56a7127CD583b10eD460c4E73BC91b866`
- **Asset:** USDC on Base, `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
- **Network:** Base mainnet, `eip155:8453`
- **Protocol:** x402 v2

## How to connect

This is a standard MCP server over HTTP (JSON-RPC 2.0, no SSE transport).
Point any MCP client at the MCP URL above:

```json
{
  "mcpServers": {
    "calmlet": {
      "url": "https://calmlet-mcp.abang-dwie.workers.dev/mcp",
      "transport": "http"
    }
  }
}
```

Or call it directly with curl:

```bash
# 1. List tools (18 typed tools, free)
curl -s -X POST https://calmlet-mcp.abang-dwie.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

# 2. Call a tool (unpaid first call returns the x402 payment challenge)
curl -s -X POST https://calmlet-mcp.abang-dwie.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"fx_rates","arguments":{"base":"USD"}}}'
```

## How payment works

1. Call a tool **without** payment. The server answers with the x402
   payment challenge: the exact price, the USDC asset contract, the payTo
   address, and the network. Nothing is charged at this step.
2. Pay exactly the quoted amount in USDC on Base to the payTo address
   (EIP-3009 `transferWithAuthorization`, or any x402 client library such
   as `@x402/fetch` / the x402 Python package, which does this
   automatically).
3. Retry the same `tools/call` with the `X-PAYMENT` header set to the
   signed payment payload. The server returns the data (HTTP 200).
4. A failed call is not charged: if the upstream API errors, no payment
   is settled for that call.

Each tool call is one paid operation. There is no free tier and no trial
call on the paid tools; the `tools/list` and `initialize` methods are free.

## Tools

Every tool takes its parameters directly as `arguments` — no wrapper.
All prices are in USDC on Base per call. Required parameters are marked
with `*`.

### Taskmarket Data — $0.001 per call

Live Taskmarket bounty tasks (Tempo + Base chains): open tasks, task detail,
top winners, market summary. Use it when an agent needs to find paid
micro-tasks to work on, check a task's details, or see who is winning.

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `taskmarket_tasks` | $0.001 | `chain` (enum tempo/base/all), `limit` (1–50), `max_subs`, `min_reward`, `sort` (enum newest/reward_desc/reward_asc/deadline_asc) | Open bounty tasks: title, reward in USD, submission count, requester |
| `taskmarket_task_detail` | $0.001 | `id`*, `chain` (enum tempo/base) | Full description, awards, submissions for one task |
| `taskmarket_winners` | $0.001 | `limit` (1–50), `sort` (enum reputation/tasks) | Top winners leaderboard: rank, agent, completed tasks, total earnings in USD |
| `taskmarket_summary` | $0.001 | `chain` (enum tempo/base/all) | Bounty market summary: total tasks, total rewards, agents, open-task sample stats |

Example — list the newest low-competition tasks:

```json
{"name": "taskmarket_tasks", "arguments": {"max_subs": 20, "sort": "newest", "limit": 10}}
```

#### Taskmarket Alerts (webhook, REST only — not an MCP tool)

Push notifications for new bounty tasks, instead of polling. A dispatcher
checks the board every 2 minutes and POSTs each new task that matches your
filter to your webhook URL. One credit = one alert delivered (webhook
answered 2xx); failed deliveries are retried on the next run (max 3 tries).

Flow:

1. `POST https://taskmarket-data-api.abang-dwie.workers.dev/v1/alerts/subscribe`
   (free) with `{"webhook_url": "https://your-server/hook", "min_reward_usd": 0.5, "chains": ["tempo", "base"]}`.
   Returns `subscription_id` + `secret` — the secret is shown only once.
   `webhook_url` must be https with a public host (no localhost/private IP).
2. `POST /v1/alerts/topup` (x402) with `{"subscription_id": "sub_...", "credits": 50}`.
   Price: $0.01 USDC per credit, minimum 10 credits ($0.10). Credits are
   added only after settlement. Unpaid, the endpoint answers 402 with the
   exact amount (credits × $0.01).
3. Test delivery free (no credits charged): `POST /v1/alerts/test` with
   `{"subscription_id": "sub_...", "secret": "..."}` — sends one sample alert
   with a real recent task. Limited to 1 test per hour per subscription.
4. Check status free: `GET /v1/alerts/subscriptions/{id}` (never returns
   the secret). Delete free: `DELETE /v1/alerts/subscriptions/{id}` with the
   secret in header `X-Alert-Secret` or body `{"secret": "..."}`.

Each alert is a POST with headers `X-Calmlet-Event: task.new` and
`X-Calmlet-Signature: sha256=<hex>` (HMAC-SHA256 of the raw body, keyed by
your subscription secret — verify it before trusting the payload):

```json
{"event": "task.new", "task": {"id": "0x...", "reference_code": "TSK-XXXXXX", "title": "...", "chain": "tempo", "reward_usd": 5, "reward_pool_usd": 5, "submission_count": 0, "created_at": "2026-12-02T00:00:00.000Z", "url": "https://taskmarket-data-api.abang-dwie.workers.dev/v1/tasks/0x..."}, "subscription_id": "sub_...", "delivered_at": "2026-12-02T00:00:00.000Z", "source": "Taskmarket API", "fetched_at": "2026-12-02T00:00:00.000Z"}
```

### SEC Filing Watch — $0.005–$0.01 per call

Latest SEC filings (8-K / 10-Q / 10-K) for a US public company, with a
5-bullet extractive summary and XBRL financials.

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `sec_filings` | $0.005 | `ticker`*, `form` (enum 8-K/10-Q/10-K/all), `limit` (1–10) | Latest filings for a ticker, with 5-bullet summary |
| `sec_filings_financials` | $0.010 | `ticker`* | XBRL financials: revenue, net income, EPS basic/diluted, year-over-year change |
| `sec_filings_latest` | $0.005 | `form` (enum 8-K/10-Q/10-K), `limit` (1–20) | Latest material filings across the whole market (default 8-K) |

Example — what did Apple just file:

```json
{"name": "sec_filings", "arguments": {"ticker": "AAPL", "limit": 5}}
```

### DeFi Fundamentals — $0.002–$0.005 per call

DeFi protocol TVL with 1d/7d change and per-chain split, top yield pools,
stablecoin peg status.

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `defi_protocol` | $0.002 | `slug`* (DefiLlama slug, e.g. aave) | A protocol's TVL, 1d/7d change, per-chain split (top 10 chains with share) |
| `defi_yields` | $0.005 | `chain`, `limit` (1–20), `min_apy` (0–100000) | Top yield pools by APY |
| `defi_stablecoins_peg` | $0.005 | `limit` (1–50) | Stablecoins more than 0.5% off their $1 peg, with circulating supply, sorted by largest deviation |

Example — TVL of a protocol:

```json
{"name": "defi_protocol", "arguments": {"slug": "aave"}}
```

### FX+Macro — $0.002–$0.005 per call

FX reference rates, currency conversion, FX history, and ECB macro series
(HICP, GDP, rates, unemployment).

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `fx_rates` | $0.002 | `base` (ISO 4217, default USD), `symbols` (comma-separated, max 20) | Latest FX reference rates for a base currency |
| `fx_convert` | $0.002 | `from`*, `to`*, `amount` (number, default 1) | Convert an amount between two currencies at the reference rate |
| `fx_history` | $0.005 | `base` (default USD), `symbols` (default IDR), `days` (1–365, default 30) | FX history for a base currency |
| `fx_macro_ecb` | $0.005 | `series` (comma-separated HICP/GDP/M3/MRO/DFR/UNEMP, empty = all 6) | ECB macro series (HICP, GDP, rates, unemployment) |

Example — EUR/USD rate:

```json
{"name": "fx_rates", "arguments": {"base": "EUR", "symbols": "USD"}}
```

### Global Weather — $0.002–$0.005 per call

Current weather and hourly forecast up to 9 days for any latitude/longitude
(source: MET Norway).

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `weather_current` | $0.002 | `lat`* (-90–90), `lon`* (-180–180) | Current weather at a coordinate |
| `weather_forecast` | $0.005 | `lat`*, `lon`*, `days` (1–9, default 3) | Hourly forecast up to 9 days |

Example — current weather in Jakarta (-6.2088, 106.8456):

```json
{"name": "weather_current", "arguments": {"lat": -6.2088, "lon": 106.8456}}
```

### Email Validation — $0.001 per call

Validate one email address: syntax, MX record via DNS-over-HTTPS,
disposable and role-based detection, 0–100 score.

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `email_validate` | $0.001 | `email`* | Validation result with score and checks |

Example:

```json
{"name": "email_validate", "arguments": {"email": "alice@example.com"}}
```

### IP Geolocation — $0.001 per call

Geolocate one IPv4 address: country, region, city, latitude/longitude,
ASN and organization (DB-IP Lite data).

| Tool | Price | Parameters | What it returns |
|---|---|---|---|
| `ip_lookup` | $0.001 | `ip`* | Geolocation result for the IP |

Example:

```json
{"name": "ip_lookup", "arguments": {"ip": "8.8.8.8"}}
```

## Rules for agents using this server

- **Check the price before you pay.** Every unpaid call returns the exact
  price in its 402 challenge. Never pay more than the quoted amount.
- **One tool = one payment.** A `tools/call` with a different tool is a
  new paid call, even on the same API.
- **Do not retry a paid call blindly.** If a paid call times out or returns
  5xx, check the result first: payments are settled per successful
  response, and replaying the same payment payload is rejected.
- **Parameters are validated before payment.** A call with a missing
  required parameter returns a JSON-RPC error (`-32602`) without charging
  anything. Fix the parameters and call again.
- **No refunds for correct data.** If the API returned the data you asked
  for, the payment stands — verify the tool and parameters before
  paying.
- **Rate limits:** none published. Be a polite client: one call at a time
  per task, no parallel floods.

## Discovery files

- `skill.md` (this file) — full instructions for agents.
- `llms.txt` — compact index of tools, prices, and links.
- `/.well-known/x402` — merged x402 payment descriptor of all 7 APIs
  (17 resources).
- `/` — human-readable demo page with live 402 challenge examples.

## Compatibility note

Older clients may still call the 7 previous operation-routed tool names
(`taskmarket_data`, `sec_filings`, `defi_fundamentals`, `fx_macro`,
`global_weather`, `email_validate`, `ip_lookup`) with
`{"operation": "<op>", "params": {...}}`. Those names still work but are
no longer listed in `tools/list` — new clients should use the 18 typed
tools above.

## Provider

Calmlet (calmlet.ai) — independent API provider. Questions about a listing:
`abang.dwie@gmail.com`.
