@escro/mcp 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -78,28 +78,25 @@ Local client config (Claude Desktop / Cursor):
78
78
  | `ESCRO_RPC_URL` | Yes | Solana RPC endpoint URL. |
79
79
  | `CLUSTER` | No | `devnet` or `mainnet`. Selects the program ID and USDC mint. Defaults to `devnet`. |
80
80
  | `ESCRO_WALLET_SECRET` | No | Base58-encoded ed25519 secret key, or the JSON byte array from a Solana CLI keypair file. When set, the write tools are registered and transactions are signed with this wallet. When unset, the server runs read-only. Never logged. |
81
+ | `ESCRO_SPEND_CAP_USDC` | On mainnet, to create | The most USDC the wallet may hold in open escrows, each counted as amount plus fee (for example `50` or `12.5`). `create_escrow` refuses a create that would pass it before the create is sent, and on mainnet refuses every create while it is unset; `pay_402` on the escrow rail is held to the same cap and the same refusal; a 402 payable only through an `exact` entry (the x402 rail) is refused on mainnet whether or not this is set. An operator setting: no tool takes a cap from the agent. The cap holds per server process (the `@escro/sdk` `spendCap`): open deposits from the API plus this process's creates in flight. A `create_escrow` that fails after its create was sent keeps its deposit in flight, and shrinks the cap's room, until the server restarts or a later write tool on that escrow succeeds (which confirms it); the server never re-confirms a create. Two servers or other buyer processes on one wallet each enforce it and together can pass it; run one per wallet, or split the cap. |
82
+ | `ESCRO_PAY_402_ALLOW_PRIVATE_HOSTS` | No | `1` lets `pay_402` reach a loopback, link-local or private host, such as a worker on this machine or network. Unset or empty, `pay_402` refuses, before any request, a URL whose host is a loopback, link-local or private address, or a name that resolves to a private address when checked; any other value stops the server at start. On mainnet `pay_402` refuses an `http:` URL either way, except to a host this setting admits. An operator setting: no tool input sets it. The request itself connects only to addresses that pass the same rule, from one resolution of the name, so a name its owner re-points after the check (DNS rebinding) is refused; an escrow entry's job specification host is held to that rule before anything is funded. The rule needs direct egress and local DNS: the request resolves each host with this machine's resolver and connects directly to the admitted addresses, ignoring an HTTP or HTTPS proxy set in the environment, so on a network reachable only through a proxy `pay_402` fails before anything is funded or signed. An embedder of `@escro/mcp/tools` whose own `@escro/sdk` predates `pay()`'s `admitAddress` gets only the check, not the connection-time rule. |
81
83
 
82
84
  The write tools exist only when `ESCRO_WALLET_SECRET` is present. The hosted endpoint is
83
85
  wallet-less by construction and never registers them.
84
86
 
85
87
  ## Tools
86
88
 
87
- Read tools (always available):
88
-
89
- - `list_escrows` — list escrows with optional filters (state, assigned worker, pagination).
90
- - `get_escrow` — fetch a single escrow by its on-chain PDA address.
91
-
92
- Write tools (require `ESCRO_WALLET_SECRET`):
93
-
94
- - `create_escrow` — create and fund an escrow for a named worker (buyer pays amount plus fee).
95
- - `claim_task` — claim an assigned task as the worker.
96
- - `submit_deliverable` — submit a deliverable (content hash plus optional proof URI).
97
- - `release_payment` — release payment to the worker for a submitted deliverable (buyer only).
98
- - `cancel_escrow` — cancel a funded escrow before any worker has claimed it (full refund).
99
- - `raise_dispute` — raise a dispute; either party may call.
100
-
101
- Every tool maps one to one onto an `@escro/sdk` method. The MCP layer holds no business
102
- logic of its own.
89
+ The read tools (escrows, EscroBots discovery, EscroRep) are always registered. The write
90
+ tools, which sign and send transactions, are registered only when `ESCRO_WALLET_SECRET` is
91
+ set. Every tool maps one to one onto an `@escro/sdk` method; the MCP layer holds no business
92
+ logic of its own. Each tool carries MCP annotations (`title`, `readOnlyHint`,
93
+ `destructiveHint`, `idempotentHint`, `openWorldHint`): the tools that move or freeze USDC are
94
+ marked destructive. Your MCP client lists every tool with its parameters and description
95
+ (`tools/list`), from the server itself, so the list is always the running version's.
96
+
97
+ A typical buyer flow from a chat client: `list_bots` (role `worker`, a capability) →
98
+ `get_reputation` on the candidates → `create_escrow` with the chosen `assignedWorker` →
99
+ `get_escrow` until `SUBMITTED` → judge the deliverable yourself → `release_payment`.
103
100
 
104
101
  ## Privacy Policy
105
102