tolsey-mcp
# tolsey-mcp
MCP server for [Tolsey](https://tolsey.xyz): web tools for AI agents. Read a page as Markdown, screenshot it, pull its tables, check its links, seal it, extract fields with quotes, and diff it against an earlier seal.
This repo is the local (stdio) server. It runs in **free mode** with no setup, or in **paid mode** where each call is paid over [x402](https://x402.org) from a local key file, under spend caps the model cannot change.
## Tools
| tool | what it does |
|---|---|
| `read` | Web page or PDF as clean Markdown (title, byline, main text, word count) |
| `shot` | Screenshot as PNG, desktop or mobile, optionally full page |
| `table` | Every `<table>` on a page as JSON arrays or CSV |
| `links` | Every link on a page with HTTP status, final URL and ok/broken |
| `seal` | Markdown and screenshot from the same page load, under one receipt |
| `extract` | Requested fields as JSON, each with the exact quote it came from (unknown fields are null) |
| `diff` | What changed on a page since an earlier seal of it |
| `token` | Facts about a Robinhood Chain token at one block (supply, owner, holders, deployer) |
| `launches` | Newest token launches on Pons (Robinhood Chain) with deployer history |
Two more tools are only useful in paid mode: `balance` (wallet balance, 24 h spend, spending policy) and `receipts` (recent paid calls with their on-chain receipts).
## Zero install: remote server
If your MCP host supports remote (Streamable HTTP) servers, you do not need this repo at all:
```
https://tolsey.xyz/v1/mcp
```
## Local install
Requires Node.js 22.13 or newer.
```sh
git clone https://github.com/tolseymcp/tolsey-mcp.git
cd tolsey-mcp
npm install
npm run build # writes dist/tolsey-mcp.mjs
```
The same single-file build is also served at https://tolsey.xyz/tolsey-mcp.mjs (with its sha256 at https://tolsey.xyz/tolsey-mcp.mjs.sha256).
### Claude Desktop
Add to `claude_desktop_config.json`, then restart Claude Desktop:
```json
{
"mcpServers": {
"tolsey": {
"command": "node",
"args": ["/absolute/path/to/tolsey-mcp/dist/tolsey-mcp.mjs"]
}
}
}
```
### Cursor
Add the same block to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global).
### Claude Code
```sh
claude mcp add tolsey -- node /absolute/path/to/tolsey-mcp/dist/tolsey-mcp.mjs
```
## Free mode and paid mode
**Free mode** (default, no `TOLSEY_KEY_FILE`): every tool goes through Tolsey's free endpoint. A few runs a day per IP, not settled on chain, no receipt. Good for trying the tools before funding anything.
**Paid mode** (`TOLSEY_KEY_FILE` set): every call is paid per call over x402. The server answers `402 Payment Required`, this client checks the price against your spending policy, signs an EIP-3009 `transferWithAuthorization` for the exact amount, and retries. A failed call is not charged. Each paid call returns the result with its transaction hash and response hash, and the client re-hashes the body to check it matches.
Payments are in USDG on Robinhood Chain, per call. The agent wallet needs USDG only, no ETH (the facilitator pays gas).
Make a fresh key for the agent, never your main wallet. The file stays on your machine and must be `chmod 600`:
```sh
mkdir -p ~/.tolsey && cd ~/.tolsey
node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))" > agent.key && chmod 600 agent.key
```
Then add `env` to the config and send that key's address a little USDG (run the `balance` tool to see the address):
```json
{
"mcpServers": {
"tolsey": {
"command": "node",
"args": ["/absolute/path/to/tolsey-mcp/dist/tolsey-mcp.mjs"],
"env": {
"TOLSEY_KEY_FILE": "/Users/you/.tolsey/agent.key",
"TOLSEY_PER_CALL_CAP": "0.02",
"TOLSEY_DAILY_CAP": "0.5"
}
}
}
}
```
## Spend caps
The spending policy comes only from the environment, never from the model. A call that breaks a rule is refused before anything is signed.
| variable | default | meaning |
|---|---|---|
| `TOLSEY_PER_CALL_CAP` | `0.02` | max USDG for one call |
| `TOLSEY_DAILY_CAP` | `1` | max USDG per rolling 24 h (every signed authorization counts) |
| `TOLSEY_RATE` | `60/60s` | max calls per window (`s`, `m` or `h`) |
| `TOLSEY_BOOTH` | Tolsey mainnet booth | only pay this `payTo` address; `any` turns the pin off |
Other settings: `TOLSEY_URL` (API base, default `https://tolsey.xyz`), `TOLSEY_RPC_URL` (default `https://robinhood-rpc.publicnode.com`), `TOLSEY_CHAIN_ID` (default `4663`), `TOLSEY_LEDGER` (local SQLite ledger of every call, default `~/.tolsey/ledger.db`).
## Links
- Setup guide: https://tolsey.xyz/api-and-mcp
- MCP Registry: `xyz.tolsey/mcp`
- Glama: https://glama.ai/mcp/connectors/xyz.tolsey/mcp
## License
MIT
TDQS
Scored across 11 tools
Most tools have clearly distinct outputs (Markdown text, PNG screenshot, JSON fields, table arrays, link statuses, token facts, wallet state), so selection is mostly unambiguous. The main overlap is `seal`, which bundles `read` + `shot` in one call, forcing the agent to choose between the bundle and the individual tools, and `launches` vs `token` both return Pons/chain facts but at different granularity (feed vs single token).
All names are single lowercase words, which is visually consistent, but the grammatical convention is mixed: verbs (`read`, `extract`, `seal`, `diff`) alongside bare nouns (`token`, `launches`, `balance`, `receipts`, `table`, `links`, `shot`). Names like `shot` and `seal` are also terse to the point of being non-obvious without the description.
Eleven tools is well within a healthy range and the set breaks into clear clusters: page reading (read/extract/table/links/shot/seal/diff), chain data (launches/token), and wallet/payments (balance/receipts). No tool appears redundant padding, and each earns its place for a distinct output format.
The page-reading lifecycle is well covered (single read, structured extract, tables, links, screenshot, compare-over-time) plus wallet and receipt introspection for the paid flow. Minor gaps exist: no batch/multi-URL fetch, no site crawl/sitemap or page-discovery/search tool, and no way to list or verify an individual receipt beyond the recent-calls feed.