Security Demo (Claude Desktop)
Run the full BattleChain security demo in the Claude Desktop chat app via the MCP server — Claude deploys and exploits a vault, you sign in MetaMask. No coding required.
Using Claude Code (terminal, desktop app, or IDE)? Use the One-Prompt Demo instead — it runs from a single prompt with nothing to install. This page is for the claude.ai chat app (Claude Desktop), which can't run a terminal, so it drives the demo through an MCP server.
Run the complete BattleChain security demo from the Claude Desktop chat app — without writing a line of code. The BattleChain MCP server wires into Claude Desktop: Claude deploys the contracts, creates the safe harbor agreement, and guides you through the exploit step by step. MetaMask handles all transaction signing.
What You'll Need
Claude Desktop
Download and install Claude Desktop (the claude.ai chat app) and sign in. This is the chat application — not Claude Code.
MetaMask
Install the MetaMask browser extension in Chrome, Firefox, or Brave. Claude opens a local signing page for each step — MetaMask handles approvals in your browser.
A test wallet with BattleChain Testnet ETH
Use a dedicated test wallet — never one that holds real funds.
BattleChain Testnet
| Network Name | BattleChain Testnet |
| Chain ID | 627 |
| RPC URL | https://testnet.battlechain.com |
| Explorer | https://explorer.testnet.battlechain.com/ |
| Currency | ETH |
| CAIP-2 ID | eip155:627 |
1. Get free Sepolia ETH from the Google Cloud faucet — 0.05 ETH is plenty.
2. Bridge to BattleChain at portal.battlechain.com/bridge — select Sepolia to BattleChain Testnet.
Python (macOS / Linux) or WSL (Windows)
On macOS or Linux, Python 3.10+ is required (python3 --version). On Windows, the installer runs inside WSL — wsl --install from an admin PowerShell, then restart.
Step 1 — Install the MCP Server
The installer adds the battlechain-mcp server and updates Claude Desktop's config automatically.
curl -fsSL https://raw.githubusercontent.com/Cyfrin/battlechain-mcp/main/install.sh | bash
Run the Windows command in PowerShell — not inside a WSL terminal.
The installer confirms when Claude Desktop's configuration has been updated.
Step 2 — Restart Claude Desktop
Fully quit Claude Desktop and reopen it. New MCP servers load only on restart.
Step 3 — Start the Demo
Open a new conversation and send:
Run the BattleChain security demo.
Claude narrates each step and opens a signing page in your browser when transactions are ready. Approve them in MetaMask, then return to Claude Desktop to continue.
What Happens
| Step | What Claude does |
|---|---|
| 1 — Deploy | Deploys VulnerableVault to BattleChain Testnet, which deploys and seeds its own token with 1,000 tokens |
| 2 — Safe Harbor | Creates the on-chain safe harbor agreement (bounty terms + recovery rules), locks its commitment window, and adopts it |
| 3 — Attack Mode | Submits an attack mode request and immediately approves it via the testnet DAO moderator |
| 4 — Exploit | Deploys an Attacker contract that drains the vault via reentrancy, then splits proceeds: 90% returned to the protocol, 10% kept as the whitehat bounty |
In this demo you are both the protocol owner and the whitehat, so both the 90% recovery and the 10% bounty arrive in the same wallet. The vault holds 1,000 tokens; the Attacker deposits an additional 100-token seed to open its vault position, so you end up with 1,100 tokens total.
One-Prompt Demo (Claude Code)
The same demo from a single prompt in Claude Code — no MCP, no install
Deploy and Battle-Test
The full protocol workflow with AI CLI or manual commands
Attack a Contract
The whitehat path — find targets, exploit, and collect bounties
Troubleshooting
Claude says it doesn't have BattleChain tools
The MCP server isn't loaded. Make sure you fully quit and reopened Claude Desktop after running the installer.
The signing page opens but MetaMask doesn't appear
MetaMask must be installed in the same browser that opened the signing page. Set that browser as your system default and try again.
Transactions are failing or the demo is stuck
Check that MetaMask is connected to BattleChain Testnet (chain ID 627) and that your wallet has testnet ETH. If a previous run left partial state, ask Claude to run prepare_environment — it resets the demo so you can start fresh.