register_borrower returns. Signing and policy stay outside this page: keys are in Key management, and the person-in-the-loop steps are in Borrower onboarding.
Connect
- Read setup-staging and mcp-connect-staging.
- Point the host at
https://staging.mcp.sohopay.xyz/mcp. - Finish OAuth in the browser. The server id for staging is
sohopay-staging.
terminal_id. If two clients share a remote MCP connection, pass a distinct terminal_id on register_borrower.
What to store
register_borrower returns:
borrower_id— the canonical borrower UUID. Do not substitute a principal id from the OAuth token.operational_agent_id— the UUID for this terminal. Pass it on spend, balance, and repayment tools when the borrower has more than one terminal.terminal_id— the host’s terminal. Persist it with the workload key.
get_context when you need identity, credit, authorization, and the next step in one call. whoami returns JWT claims only and does not call the backend.
Workload key
Generate an Ed25519 key on the host with@sohopay/agent-signer and register it with register_agent_workload_key plus a proof-of-possession signature. The private key never goes to SohoPay. Until that key is registered, prepare_x402_payment returns X402_AGENT_KEY_NOT_REGISTERED.
Next steps
Borrower onboarding
Wallet proof, agent grant, and handle.
Payment flow
What to do on HTTP 402.

