DeepBookieDOCS
Open app ↗
Get Started / Quickstart: MCP

Quickstart: MCP

DeepBookie ships as an MCP server. Any MCP client — Claude Desktop, Cursor, Claude Code — can read markets and trade both DeepBook markets (Predict and Spot) in plain language.

Reads run free. Writes build an unsigned Sui transaction, which a key on your machine signs. The key never reaches the model and never leaves your computer.

Install

Run it on demand, no install:

npx -y @deepbookie/mcp

Or install it once, globally — this gives you the deepbookie-mcp command:

npm install -g @deepbookie/mcp

Configure your client

Add a deepbookie entry to your client’s MCP config. The file path depends on your client.

Claude Desktop — macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "deepbookie": {
      "command": "npx",
      "args": ["-y", "@deepbookie/mcp"],
      "env": {
        "DEEPBOOKIE_NETWORK": "testnet"
      }
    }
  }
}

If you installed globally, drop args and call the binary directly:

{
  "mcpServers": {
    "deepbookie": {
      "command": "deepbookie-mcp",
      "env": {
        "DEEPBOOKIE_NETWORK": "testnet"
      }
    }
  }
}
1
Save the config
Put the block above into your client config file.
2
Restart your client
The DeepBookie tools appear under the deepbookie server.
3
Try it
Ask: "show me the BTC market".
Note

Per-client config for Cursor and Claude Code, plus the full env table, lives at /surfaces/mcp.

The local key

The server signs on your machine with a local Ed25519 key. The model never sees it. On first run the server loads a key in this order:

  1. DEEPBOOKIE_PRIVATE_KEY — a suiprivkey… secret from the environment.
  2. The keystore file — a saved key, written with 0600 permissions (owner-only).
  3. Otherwise it auto-generates one, saves it to the keystore, and logs the new address so you can fund it.

The keystore path depends on your OS:

  • macOS / Linux: ~/.deepbookie/config.json
  • Windows: under %APPDATA% (%APPDATA%\.deepbookie\config.json)

Fund that address with testnet SUI (for gas) and dUSDC before placing a bet. dUSDC is operator-gated — there is no public faucet. Tap Get dUSDC in the web app, or request it via the tally form.

Environment variables

VariablePurposeDefault
DEEPBOOKIE_NETWORKSui network to targettestnet
DEEPBOOKIE_PRIVATE_KEYLocal signing key (suiprivkey…)auto-generated
DEEPBOOKIE_MANAGER_IDPre-set Predict manager objectresolved at runtime
DEEPBOOKIE_BALANCE_MANAGER_IDPre-set Spot balance manager objectresolved at runtime
DEEPBOOKIE_LOG_LEVELLog verbosity; set debug to troubleshootinfo

Troubleshooting

Server doesn’t appear in your client. Check the config path is right for your OS, the JSON is valid, and you fully restarted the client. Set DEEPBOOKIE_LOG_LEVEL to debug for more detail.

Reading logs (Claude Desktop). The server logs to stderr; your client captures it. On macOS, tail ~/Library/Logs/Claude/mcp*.log.

Writes fail with “no dUSDC in wallet”. Your auto-generated wallet has no funds yet. Copy the address the server logged on first run, then fund it with testnet SUI for gas and grab dUSDC via Get dUSDC in the web app or the tally form.

Warning

Testnet only. The key sits in plaintext on disk, so fund the address sparingly and never reuse it for mainnet.