Testnetsats and USDhb here have no value.
Skip to content
Open testnet app

MCP ​

hardbasis mcp serves every CLI command as an MCP tool over stdio. A tool call runs through the same dispatcher as the CLI and sends identical bytes. Install the CLI first (Install).

Start it ​

Claude Code:

bash
claude mcp add hardbasis -- hardbasis mcp
claude mcp add hardbasis -- hardbasis mcp --confirm ack   # the desktop app's Code tab

Claude Desktop, Cursor and Gemini CLI take the same entry, each in its own file (untested in these clients; only Claude Code is measured):

clientconfig file
Claude DesktopmacOS ~/Library/Application Support/Claude/claude_desktop_config.json; Windows %APPDATA%\Claude\claude_desktop_config.json; or Settings, Developer, Edit Config
Cursorproject .cursor/mcp.json, or global ~/.cursor/mcp.json
Gemini CLI~/.gemini/settings.json
json
{ "mcpServers": { "hardbasis": { "command": "hardbasis", "args": ["mcp"] } } }

Codex (~/.codex/config.toml, untested):

toml
[mcp_servers.hardbasis]
command = "hardbasis"
args = ["mcp"]

Grok Bot (xAI, x.com/bot, untested): it runs on xAI's cloud computer and has no config file. Ask it in chat to add a custom server with this start command, and give it HARDBASIS_API_KEY as an environment variable on the server entry. A localhost server does not work there.

bash
npx -y @hardbasis/cli mcp --confirm ack

From a source checkout without the binary installed:

bash
claude mcp add hardbasis -- pnpm --silent --dir "$PWD" exec tsx src/cli/main.ts mcp

Client matrix ​

Measured by sending one acknowledged testnet write through each client.

clientadvertises elicitationrenders prompt--confirm
Claude Code desktop app (Code tab)yesno (declines in about 10 ms)ack
claude CLI 2.1.310, interactive terminalyesyeselicit
Claude Desktop (chat)untesteduntestedelicit until measured
Grok Bot (xAI)untesteduntestedack until measured

Where the prompt does not render, run --confirm ack and treat the agent's acknowledgement as the only gate.

Tool groups ​

Tools are named hb_<group>_<verb>. Which groups a server exposes depends on whether a key is configured:

groupdefault, no keydefault, with key--groups all
markets, public, por, health, deploymentyesyesyes
account, positions, orders, cancel-all-after, fills, funding, limits, sessions, usdhb, withdrawals, deposits, deposit-invoices, liquidationsnoyesyes
referral, promoter, leaderboard, faucet, signupnonoyes

--groups g1,g2 serves exactly the groups you name. Read tools carry readOnlyHint: true; write, funds and credential tools carry destructiveHint: true and the description prefix [WRITE: requires acknowledged=true].

The two gates ​

  1. The agent. A write tool refuses with cli_ack_required unless the call carries acknowledged: true. The agent sets it only when you asked for that exact action.
  2. You. When the client supports MCP elicitation, the server shows a one-line summary and one required choice with no default. Only the affirmative choice (place order, cancel order, send, mint, redeem) sends the write.

dryRun: true sends nothing and needs neither gate.

A refused call ​

The agent calls hb_orders_create without the flag:

json
{
  "marketId": "btc-usd",
  "side": "buy",
  "type": "limit",
  "limitPriceQ8": "5000000000000",
  "contracts": "1"
}

Nothing is sent, and the result is:

json
{
  "code": "cli_ack_required",
  "error": "hb_orders_create is write-class: nothing was sent. Call again with acknowledged=true only if the user explicitly asked for it."
}

An accepted call ​

You asked for one btc-usd contract, bought at a limit of 50000.00. The agent calls again with "acknowledged": true. In a client that renders prompts you see:

text
BUY 1 contract btc-usd, limit 50,000.00
action: place order | do not place

Pick place order and the order is sent; the result is the venue's order body.

Elicit or ack ​

client answerresultwhat the agent should do
the affirmative choicethe write is sentreport the result
decline, cancel, or another valuecli_user_declinedstop; retry only if you ask again
no answer within the timeoutcli_user_declinedstop; retry only if you ask again
decline in under 500 mscli_confirm_not_renderedtell you the prompt never showed; suggest --confirm ack
no elicitation supportthe write is sent, with a noterelay the note to you
  • --confirm elicit (the default) asks you per write, as above.
  • --confirm ack makes the agent's acknowledged the only gate, on purpose, and the server says so in its instructions. Use it for clients that cannot render prompts (the matrix above).
  • For a mint, redeem or withdrawal, the prompt is built from the quote the server returned. If a mint or redeem quote expires while you read it, the server re-quotes once after you confirm and proceeds only within the venue's served requoteToleranceQ9; a larger change asks you again.

Autopilot ​

bash
hardbasis mcp --autopilot

Autopilot runs writes without either gate. In exchange the server arms cancel-all-after at start, re-arms it every 30 s, and disarms it on clean shutdown, so a crashed or hung agent leaves no resting orders. Funds and credential tools stay out of reach.

It is testnet only. On mainnet it is refused with cli_autopilot_requires_limits: an unattended agent on real money needs limits the venue enforces per key, and those are not served yet (R-AP-10).

The audit stream ​

The server writes one JSON line per event to stderr:

  • server_start: network, groups, tool count, autopilot, confirm_mode (elicit or ack), elicitation (available or unavailable), and the detected client.
  • tool_call: tool, group, effect, the money fields, and for writes confirm (confirmed, declined, not_rendered, timeout, unavailable, ack or autopilot) with confirmMs.
  • tool_result: whether it succeeded, and the error code if not.

HARDBASIS_MCP_AUDIT=off disables it. Keys never appear beyond hb_...<last4>.

Last updated 2026-11-02

Program policy v1 · numbers current as of 2026-11-25

Testnet: test sats have no value. Nothing on this page is an offer, a solicitation, or advice.