Agent setup
Give your agent a clear job.
Inspect a strategy, manage it within its mandate, or bring the money home. Each role has its own authority.
Start with a live read.
The hosted MCP server lists strategies, checks their controls, reports rescue status and verifies sealed receipts. It holds no key and signs nothing.
Connect a Streamable HTTP MCP client
claude mcp add --transport http klear https://klear-near.vercel.app/api/mcp
Ask your agent to inspect a strategy and explain its six trust checks before taking any action.
Choose a strategy to inspectRun a guardian locally.
A funded NEAR testnet account can sign the rescue. Your key stays on your machine. The judge chooses the orders and payout destination; the courier relays them and pays EVM gas.
From the repository root, after installing the agent requirements and setting up your NEAR testnet account:
claude mcp add klear-local -- .tools/venv/bin/python agents/mcp_server.py # Or run the rescue directly make rescue ACCOUNT=<you>.testnet
The local server adds start_rescue and rescue_log. A reward is due per leg only after the judge verifies delivery.
Let the AI propose.
Configure the manager account when creating the strategy. Its NEAR key is limited to proposing orders and sending heartbeats. The judge signs only what fits your mandate.
- On the strategy page, download the runner and that strategy’s configuration.
- On a machine you keep online, follow the configuration to install the restricted manager key, evidence signer and testnet gas wallet. Run the companion and give it an HTTPS address.
- Pair the runner once from the strategy page, then click Start manager. It waits for test funds and attested evidence before making trade proposals.
Use --sealed and --strategy-file to keep instructions private. Install the sealed requirements and keep your NEAR AI Cloud API key and strategy file on the runner.