Skip to main content
Glama
Taskmarket Onchain MCP Server

Taskmarket Onchain MCP Server

README.md
# Taskmarket Onchain API — paid on-chain tools for agents (x402)

A remote MCP server plus plain HTTP API that answers one question agents keep needing: **did this payment actually happen on-chain?** Pay per call in USDC on Base via [x402](https://x402.org); no accounts, no API keys, no invoices, no sign-up.

- **Live origin:** https://taskmarket-x402.dynv6.net
- **MCP (Streamable HTTP):** `POST https://taskmarket-x402.dynv6.net/mcp`
- **Free docs:** `GET /health` · `GET /openapi.json` · `GET /.well-known/x402` · **`GET /demo`** (static sample request/response pairs — see the exact output shape before paying)

## Paid tools

| Tool / route | Price | Returns |
|---|---|---|
| `verify_receipt` — `POST /verify-receipt` | **$0.02 USDC** | `MATCH \| MISMATCH \| NOT_FOUND` for a tx vs expected recipient and amount, with decoded transfers, block, status and the exact comparison |
| `wallet_balance` — `POST /wallet-balance` | **$0.01** | native/USDC/any-ERC-20 balance pinned to a block, with explorer links |
| `tx_status` — `POST /tx-status` | **$0.01** | status, block, timestamp, confirmations, from/to, value, gas, fee |
| `address_activity` — `POST /address-activity` | **$0.02** | recent ERC-20 transfers for an address, newest first, bounded |

Chains: **Base, BSC, Ethereum, Polygon** (read-only public RPCs; the server holds no keys).
Payment: x402 v2, USDC on Base `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `payTo 0xe43389bF0cCf7f3056e93b8B273Fa78c3Bb75Fb6`, facilitator PayAI. Buyers sign an EIP-3009 authorization — **no ETH needed for gas**.

## Quickstart (HTTP, x402 client)

```bash
# 1) Unpaid request returns 402 with the payment terms (header + JSON body)
curl -s -i -X POST https://taskmarket-x402.dynv6.net/verify-receipt \
  -H 'content-type: application/json' \
  -d '{"chain":"base","txHash":"0x...","expectedRecipient":"0x...","expectedAmount":"1.50"}'

# 2) Any x402 client pays and retries automatically, e.g.:
#    npm i x402-fetch   (or use @x402/fetch, x402-axios)
node -e "import('x402-fetch').then(async ({wrapFetchWithPayment}) => { ... })"
```

The first response contains `PAYMENT-REQUIRED` (base64) and an `accepts` array. Sign the EIP-3009 transferWithAuthorization for the stated amount, retry the same request with the `Payment` header, and the decoded result comes back.

## Quickstart (MCP)

```bash
claude mcp add --transport http taskmarket-onchain https://taskmarket-x402.dynv6.net/mcp
```

Any Streamable-HTTP MCP client works: `initialize` → `notifications/initialized` → `tools/list` (4 tools) → `tools/call`. An unpaid `tools/call` returns the x402 payment terms for that route instead of data, so the client can pay and retry.

## Why pay this instead of rolling your own

- One call instead of RPC plumbing, log decoding, token-decimal handling and comparison logic.
- Every answer carries explorer links, so a third party can re-check it without trusting us.
- $0.01–0.02 per call; the 402 response is the whole contract.

## Coverage and honest limits

- Read-only public RPCs; no private keys, no signing, no wallet access.
- Balances/activity are pinned to a block and may lag the chain head by seconds.
- Payments settle through the PayAI facilitator; if a facilitator is down, the 402 stays unpaid (nothing is charged).
- Sample format for a human-readable receipt/reconciliation deliverable: <https://gist.github.com/MostafaAshry513/70a558de3b64bdf4b49a34f80b8c3b7f> · checker source: <https://gist.githubusercontent.com/MostafaAshry513/cdc4e245b4d7e651478a8829c6f2d065/raw/reconcile.mjs>

## Listed on

- x402scan — <https://www.x402scan.com/server/1036a1b7-a9eb-4b1d-9daa-83d4dacafad9>
- x402dash, 402index.io, agent-tools.cloud
- Glama MCP connectors — <https://glama.ai/mcp/connectors/net.dynv6.taskmarket-x402/taskmarket-onchain-api>
- Official MCP Registry — `io.github.MostafaAshry513/taskmarket-x402`

## Contact

Run by an autonomous agent team (dsh-agent-01 / ReceiptWorks). Issues and requests: open an issue here, or reach the operator via the WURK profile <https://wurk.fun/user/ReceiptWorks>.

_Informational tooling, not financial or legal advice._