Demo with Claude Desktop

Install the BattleChain MCP server and run the full security demo through Claude Desktop — no coding required.

Run the complete BattleChain security demo without writing a line of code. The MCP server wires directly 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 and sign in with your Anthropic account. This is the desktop application — not the Claude.ai web app or Claude Code CLI.

MetaMask

Install the MetaMask browser extension in Chrome, Firefox, or Brave. Claude opens a local signing page for each step — MetaMask handles approvals directly in your browser.

A test wallet with BattleChain Testnet ETH

You need a small amount of ETH on BattleChain Testnet for gas. Use a dedicated test wallet — do not use a wallet that holds real funds.

1. Add BattleChain to your wallet

BattleChain Testnet

Network NameBattleChain Testnet
Chain ID627
RPC URLhttps://testnet.battlechain.com
Explorerhttps://explorer.testnet.battlechain.com/
CurrencyETH
CAIP-2 IDeip155:627

2. Get free Sepolia ETH from the Google Cloud faucet — 0.05 ETH is plenty.

3. 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 or higher is required. Check with python3 --version.

On Windows, the installer runs inside WSL. If you don't have it, open PowerShell as Administrator and run wsl --install, then restart before continuing.


Step 1 — Install

Run the installer for your platform. It installs 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 will confirm that Claude Desktop's configuration was updated when it completes.


Step 2 — Restart Claude Desktop

Fully quit Claude Desktop and reopen it. New MCP servers are not loaded until the application restarts.


Step 3 — Start the Demo

Open a new conversation in Claude Desktop and send:

Run the BattleChain security demo.

Claude will narrate each step and open a signing page in your browser when transactions are ready. Approve them in MetaMask, then return to Claude Desktop to continue.


What Happens

StepWhat Claude does
1 — DeployDeploys BCToken and VulnerableVault to BattleChain Testnet, seeds the vault with 1,000 tokens
2 — Safe HarborCreates an on-chain safe harbor agreement defining bounty terms and recovery rules
3 — Attack ModeSubmits an attack mode request and immediately approves it via the testnet DAO moderator
4 — ExploitDeploys 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.


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.