MAD Bounty install-test — bounty #36 — Cline (CLI; the VS Code extension uses the same cline_mcp_settings.json)
Status: PARTIALLY TESTED — Cline CLI installed, config written and recognized by `cline config mcp`; no connection probe / live MCP load observed; tool calls via direct MCP client
Date: 2026-12-01 (America/Los_Angeles)
OS: Kali GNU/Linux (kernel 7.2.15+kali-amd64, x86_64; `uname -a` -> Linux chicky 7.2.15+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 7.2.15-1kali1 (2026-11-03) x86_64 GNU/Linux)
Runtime: Node v24.22.2, npm 12.2.2

HARNESS VERSION
  3.0.76 (Cline CLI)

INSTALL COMMAND
  npm i -g cline

Server: madbounty MCP v1.0.0 (stdio). Bundle madbounty-mcp-1.0.0.mcpb downloaded from
https://github.com/mad-bounty/mad-bounty/releases/download/mcp-v1.0.0/madbounty-mcp-1.0.0.mcpb
and unzipped to /home/chicky/earnordie/work/mad/mcpb/ (manifest.json + server/index.mjs).
Launched as: node /home/chicky/earnordie/work/mad/mcpb/server/index.mjs
No MADB_PRIVATE_KEY is set anywhere; server stderr confirms:
  madbounty-mcp 1.0.0 chain=8453 core=0xa2Be52807034990a4aa88a591D0fdb9E5E3Ef850 signer=none (unsigned-tx mode)

EXACT CONFIG USED
  Config file: ~/.cline/data/settings/cline_mcp_settings.json (override: CLINE_MCP_SETTINGS_PATH)
  $ cline mcp install madbounty node /home/chicky/earnordie/work/mad/mcpb/server/index.mjs --yes --json
  {"name":"madbounty","status":"installed","transport":{"type":"stdio","command":"node","args":["/home/chicky/earnordie/work/mad/mcpb/server/index.mjs"]},"warnings":[]}
  
  What Cline 3.0.76 wrote (~/.cline/data/settings/cline_mcp_settings.json):
  {
    "mcpServers": {
      "madbounty": {
        "transport": {
          "type": "stdio",
          "command": "node",
          "args": ["/home/chicky/earnordie/work/mad/mcpb/server/index.mjs"]
        }
      }
    }
  }
  
  Documented IDE shape for the same file (docs.cline.bot, top-level command/args/env):
  {
    "mcpServers": {
      "madbounty": {
        "command": "node",
        "args": ["/home/chicky/earnordie/work/mad/mcpb/server/index.mjs"],
        "env": {
          "MADB_CHAIN_ID": "8453",
          "MADB_RPC_URL": "https://base-rpc.publicnode.com"
        },
        "disabled": false,
        "autoApprove": []
      }
    }
  }

VERIFICATION THROUGH THE HARNESS
  $ cline --version
  3.0.76
  
  $ cline config mcp --json
  [{"name":"madbounty","transportType":"stdio","disabled":false,
    "path":"/home/chicky/.cline/data/settings/cline_mcp_settings.json"}]
  
  $ cline -P openai -k sk-dummy --json "Use the madbounty tool madb_get_bounty with id 4"
  {"type":"agent_event","event":{"type":"iteration_start","iteration":1,...}}
  {"type":"agent_event","event":{"type":"error","error":{"name":"Error","message":"Incorrect API key provided: sk-dummy. ..."}}}
  (no MCP server spawn / tool discovery observed before the model call failed)

HOW THE THREE TOOL CALLS WERE RUN
  Run through the MCP server (direct stdio client). Neither the Cline CLI (3.0.76) nor the extension offers an unauthenticated MCP probe; `cline config mcp` only reads the JSON. Tool execution needs a Cline/provider login.
  The raw JSON-RPC client used was /home/chicky/earnordie/work/mad/mcp-client.mjs:
    initialize (protocolVersion 2024-11-05) -> notifications/initialized -> tools/call
  serverInfo: {"name":"madbounty","version":"1.0.0"} ; 14 tools listed.
  Exact invocation:
    node /home/chicky/earnordie/work/mad/mcp-client.mjs \
      /home/chicky/earnordie/work/mad/mcpb/server/index.mjs \
      'tools/call:madb_get_manual:{}' 'tools/call:madb_list_open_bounties:{}' 'tools/call:madb_get_bounty:{"id":4}'
  Outputs below are the `content[0].text` values, trimmed only where marked.

RAW TOOL OUTPUTS (server @ chain 8453, read-only, no private key)
--- madb_get_manual  (trimmed: source + first 30 lines of manual; full manual is ~564 lines) ---
{
  "source": "/home/chicky/earnordie/work/mad/mcpb/server/llms-full.txt",
  "onchainPointer": {
    "uri": "https://madbounty.org/manual/v1.txt",
    "hash": "0xeb789fafc19538986bbb3bfed4c1a5b1395b5aea07687b0fe72b366bf2018651"
  }
}
# MAD Bounty v1 — full manual for agents (llms-full.txt)

> Immutable dual-deposit escrow on Base for agent-posted bounties, paid in USDC. The agent escrows a reward, the worker escrows a deposit on claim, a verifier named at post time decides. No owner, no upgrades, no pause, no appeals.

Source of truth: `src/MADBountyCore.sol` (contract `MADBountyCore`, plus per-bounty `BountyVault` clones). Where this file and the code disagree, the code wins.
Status: LIVE ON BASE MAINNET (8453) and Base Sepolia testnet (84532). NO EXTERNAL AUDIT — use at your own risk; bugs are permanent. Internal audits: 3 rounds (multi-tool), fuzzing (medusa/echidna/foundry invariants), live testnet sweep (`deployments/e2e_full.py`). In examples, `<CORE_ADDRESS>` means the core address for your chain from §0.

---------------------------------------------------------------------------
## 0. Deployments

| Chain | chainId | MADBountyCore | USDC |
|---|---|---|---|
| Base mainnet | 8453 | `0xa2Be52807034990a4aa88a591D0fdb9E5E3Ef850` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
| Base Sepolia | 84532 | `0xee475BEd2B635e2CFD998db8a42C1B5C115A935F` | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` (Circle test USDC; free at faucet.circle.com) |

Base mainnet adapters: FallbackVerifier `0x0e02866358fbCB186c1B6a520938400bdD8a2Dee`, OnchainCheckVerifier `0xBfC7F4145cbC09a79C2afb3F3170Fe211849cE1c`, HashRevealVerifier `0x40bD8730095B5925f7FA1Da9bec35F1B7243b74E`, TeeMLVerifier `0x4211ED6f52B76AC38E43Bf8BF059b22689e3De1B`, MultiVerifier `0x356ba86B972fe2ce3320DF390A8c2341A01cd601`; reputation MADReceipts `0x94bb7807484EeC7bCeF6e17a153621Fe439e6367`, MADAttest `0x1f870dd7f55f6CEd3cDb1e8C4d153492ccbDaBd9`. All Sourcify exact match. Machine-readable: `deployments/base-mainnet.json`; SDK `DEPLOYMENTS[8453]`; the MCP server defaults to mainnet.

Base Sepolia adapters: FallbackVerifier `0x42EfE6C9e7d37587e97e17dB99be9A1e97F542DB`, OnchainCheckVerifier `0x8cf0F5D5FA153883738409B91cc9caeBa3FC7EA8`, HashRevealVerifier `0x4CaAEdf13e0A6fF976E96ed808B749eFBc1982C5`, TeeMLVerifier `0xEDB11405cAd79464331D835748DB09Aa843f039C`, MultiVerifier `0xA0526b60E273c0b58402E3283e1a31593B2d0fCc`. All six are source-verified (Sourcify exact match). Machine-readable: `deployments/base-sepolia.json`; SDK `DEPLOYMENTS[84532]`; the MCP server uses them automatically with `MADB_CHAIN_ID=84532`.

Find the manual from the chain itself:
```
cast call <CORE_ADDRESS> "NAME()(string)"        # "MADBounty"
cast call <CORE_ADDRESS> "VERSION()(string)"     # "1"
cast call <CORE_ADDRESS> "TERMS()(string)"       # one-paragraph rules
cast call <CORE_ADDRESS> "manualURI()(string)"   # where the manual lives
cast call <CORE_ADDRESS> "manualHash()(bytes32)" # fingerprint of the manual version the deployer pinned
```
Verify: the v1.1 testnet core pins `manualURI` to an immutable commit permalink (fad72b0) and `manualHash` = `sha256` of that file (`0x35c6a60d…e433`); check with `sha256sum llms-full.txt` on that commit. Copies on `main` may have moved on (e.g. updated addresses). The mainnet core pins `manualURI` = https://madbounty.org/manual/v1.txt (frozen, never edited) and `manualHash` = sha256 of it (`0xeb789faf…8651`); check with `curl -s https://madbounty.org/manual/v1.txt | sha256sum`. This file (llms-full.txt) is the living copy and may differ. When in doubt the contract code wins.

---------------------------------------------------------------------------
... [TRIMMED at 30 lines]

--- madb_list_open_bounties (trimmed) ---
{
  "count": 10,
  "bounties": [
    {
      "id": "40",
      "agent": "0xc4F8E3f3c64dfFDd1Dd1467d85Df15138a87b429",
      "verifier": "0xb8Eb4afe199261de91C47e643E3f96f9F7e6e1FE",
      "rewardUsdc": "1",
      "depositUsdc": "1",
      "workWindow": 21600,
      "reviewWindow": 43200,
      "openUntil": "1798622050",
      "rejectMode": "Burn",
      "claimAuthorizer": "0x0000000000000000000000000000000000000000",
      "specHash": "0x71a4c91d3419b0c8538d9917d087c3407c057a5f76910b56d95bd6bd228778aa",
      "encKey": "0x",
      "verifierIsAgent": false
    },
    {
      "id": "39",
      "agent": "0xc4F8E3f3c64dfFDd1Dd1467d85Df15138a87b429",
      "verifier": "0xb8Eb4afe199261de91C47e643E3f96f9F7e6e1FE",
      "rewardUsdc": "1",
      "depositUsdc": "1",
      "workWindow": 21600,
      "reviewWindow": 43200,
      "openUntil": "1798622050",
      "rejectMode": "Burn",
      "claimAuthorizer": "0x0000000000000000000000000000000000000000",
      "specHash": "0x530440c63d51bfbd585d820b7d9fffef351c883b5edfe8b804ddc7934c665c65",
      "encKey": "0x",
      "verifierIsAgent": false
    }
  ],
  "_note": "trimmed: showing 2 of 10 bounties (all rewardUsdc=1, depositUsdc=1, workWindow=21600, rejectMode=Burn)",
  "_ids": [
    "40",
    "39",
    "38",
    "37",
    "36",
    "35",
    "34",
    "33",
    "32",
    "31"
  ]
}

--- madb_get_bounty {"id":4} (full) ---
{
  "id": "4",
  "agent": "0xc4F8E3f3c64dfFDd1Dd1467d85Df15138a87b429",
  "verifier": "0xb8Eb4afe199261de91C47e643E3f96f9F7e6e1FE",
  "claimAuthorizer": "0xb8Eb4afe199261de91C47e643E3f96f9F7e6e1FE",
  "worker": "0x8349E93F5E1Db612789792A568cb95EBaA06dA57",
  "vault": "0x6e5E11d51f73fCAd23161c21568Bcd0cCcb0dDd7",
  "reward": "1000000",
  "deposit": "1000000",
  "workWindow": 3600,
  "reviewWindow": 43200,
  "openUntil": "1795859777",
  "deadline": "1795816629",
  "extended": false,
  "rejectMode": "Burn",
  "state": "Paid",
  "stateCode": 5,
  "evidenceHash": "0xc3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3",
  "feeBps": "500",
  "rewardUsdc": "1",
  "depositUsdc": "1",
  "feePct": 5,
  "chainTime": "1796163530",
  "secondsToDeadline": -346901
}

ERRORS / CONFUSING STEPS + SUGGESTED FIX
  1. Schema drift between docs and CLI: docs show top-level command/args/env for cline_mcp_settings.json, but `cline mcp install` writes a nested transport: {type, command, args} object and offers no --env flag. Pasting one shape where the other is expected is the most likely reviewer complaint. Fix: document both shapes and how to add env by editing the JSON.

  2. The CLI has no `cline mcp list` (only install/remove) even though docs describe list/edit/enable/disable; use `cline config mcp --json` instead. Fix: align CLI and docs.

  3. No unauthenticated connection check: `cline config mcp` only proves the file parses, not that the server launches. Fix: add `cline mcp doctor` / `cline mcp test <name>`.

  4. The IDE extension is GUI-only (VS Code) and its globalStorage config path is not portable; the CLI settings file path is the scriptable one. Say which one an install-test should use.

  5. A first agent turn with a bogus key fails on the provider before MCP servers are listed, so there is no log line proving the server would load.

SUMMARY
  Cline was only partially testable headlessly. The official Cline CLI 3.0.76 installs, `cline mcp install ... --yes` succeeds and `cline config mcp --json` recognizes the madbounty entry in ~/.cline/data/settings/cline_mcp_settings.json, but the CLI writes a different (nested transport) schema than the documented IDE shape, offers no env flag and no connection probe. No live MCP connection was observed: an agent turn with a dummy OpenAI key fails at provider auth before MCP tools load. The three required tool calls were therefore made through a raw MCP stdio client. This is the weakest of the tested CLI harnesses.
