Skip to main content

What you will learn

  • How the MCP adapter exposes ISCL crypto operations to AI assistants
  • How to configure Claude Desktop and Cursor for Clavion
  • How to invoke tools like transfers, swaps, and balance checks
  • Full parameter reference for all six MCP tools

Overview

The MCP (Model Context Protocol) adapter exposes ISCL’s crypto operations as MCP tools that AI assistants can invoke. When Claude Desktop or Cursor calls a tool like clavion_transfer, the adapter constructs a TxIntent, sends it through the full ISCL pipeline (policy, preflight, approval, signing, broadcast), and returns the result.

Available tools

Tool NameActionDescription
clavion_transfertransferTransfer ERC-20 tokens
clavion_transfer_nativetransfer_nativeTransfer native ETH
clavion_approveapproveApprove ERC-20 spending allowance
clavion_swapswap_exact_inSwap tokens via DEX
clavion_balance(read-only)Check token balance
clavion_tx_status(read-only)Look up transaction receipt

Prerequisites

Before setting up the MCP adapter, ensure you have:
  • ISCL Core running on localhost:3100
  • A wallet address imported into the ISCL keystore
  • RPC configured for your target chain(s)
  • Node.js 20+
  • An MCP client (Claude Desktop, Cursor, or compatible IDE)

Setup

1
Build the MCP adapter
2
cd /path/to/clavion
npm install
npm run build
3
The MCP adapter is built as part of the monorepo. The entry point is at packages/adapter-mcp/dist/index.js.
4
Configure your MCP client
5
Claude Desktop
Add the Clavion MCP server to your Claude Desktop configuration file.
// File: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "clavion": {
      "command": "node",
      "args": ["/path/to/clavion/packages/adapter-mcp/dist/index.js"],
      "env": {
        "ISCL_API_URL": "http://127.0.0.1:3100",
        "ISCL_WALLET_ADDRESS": "0xYourWalletAddress"
      }
    }
  }
}
Replace /path/to/clavion with the absolute path to your Clavion repository, and 0xYourWalletAddress with the wallet address imported into your keystore.
You must restart Claude Desktop after modifying the config file for changes to take effect.
Cursor
For Cursor IDE, add the MCP server via Cursor’s settings:
  1. Open Cursor Settings (Cmd+, on macOS)
  2. Search for “MCP” or navigate to the MCP configuration section
  3. Add a new MCP server with the following configuration:
{
  "name": "clavion",
  "command": "node",
  "args": ["/path/to/clavion/packages/adapter-mcp/dist/index.js"],
  "env": {
    "ISCL_API_URL": "http://127.0.0.1:3100",
    "ISCL_WALLET_ADDRESS": "0xYourWalletAddress"
  }
}
Replace /path/to/clavion with the absolute path to your Clavion repository, and 0xYourWalletAddress with the wallet address imported into your keystore.
6
Start ISCL Core
7
The MCP adapter connects to a running ISCL Core instance. Start it in a terminal:
8
# Minimal (Base chain)
ISCL_RPC_URL_8453=https://mainnet.base.org npm run dev

# With web approval (recommended for interactive use)
ISCL_APPROVAL_MODE=web ISCL_RPC_URL_8453=https://mainnet.base.org npm run dev
9
Verify it’s running:
10
curl http://localhost:3100/v1/health
11
Use ISCL_APPROVAL_MODE=web and keep the approval dashboard open in a browser tab. When Claude or Cursor requests a transaction, you will see it appear in the dashboard for approval.
12
Use the tools
13
Once configured, your AI assistant can invoke Clavion tools directly.
14
Example: Transfer tokens
15
Ask Claude: “Send 100 USDC to 0xRecipientAddress on Base”
16
Claude will call clavion_transfer with:
17
{
  "wallet": "0xYourWalletAddress",
  "asset": {
    "kind": "erc20",
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "symbol": "USDC",
    "decimals": 6
  },
  "to": "0xRecipientAddress",
  "amount": "100000000",
  "chainId": 8453
}
18
Example: Check balance
19
Ask Claude: “What’s my USDC balance?”
20
Claude will call clavion_balance with the wallet and token addresses.
21
Example: Swap tokens
22
Ask Claude: “Swap 0.1 WETH for USDC on Base”
23
Claude will call clavion_swap with the appropriate parameters.

Tool parameters

Full parameter reference for each MCP tool.

clavion_transfer

ParameterTypeRequiredDescription
walletstringYesSender address (0x + 40 hex)
asset.kindstringYesAlways "erc20"
asset.addressstringYesToken contract address
asset.symbolstringNoToken symbol (e.g., “USDC”)
asset.decimalsnumberNoToken decimals
tostringYesRecipient address
amountstringYesAmount in base units (wei)
chainIdnumberNoChain ID (default: 8453)
maxGasWeistringNoMax gas limit in wei

clavion_transfer_native

ParameterTypeRequiredDescription
walletstringYesSender address
tostringYesRecipient address
amountstringYesAmount in wei
chainIdnumberNoChain ID (default: 8453)
maxGasWeistringNoMax gas limit in wei

clavion_swap

ParameterTypeRequiredDescription
walletstringYesWallet performing the swap
routerstringYesDEX router address
assetInobjectYesInput token (selling)
assetOutobjectYesOutput token (buying)
amountInstringYesExact input amount in base units
minAmountOutstringYesMinimum output (slippage floor)
slippageBpsnumberNoSlippage in basis points (default: 100 = 1%)
providerstringNo"uniswap_v3" or "1inch"
chainIdnumberNoChain ID (default: 8453)

clavion_balance

ParameterTypeRequiredDescription
walletstringYesWallet address to check
tokenstringYesERC-20 token contract address
chainIdnumberNoChain ID (default: 8453)

clavion_tx_status

ParameterTypeRequiredDescription
txHashstringYesTransaction hash (0x + 64 hex)

clavion_approve

ParameterTypeRequiredDescription
walletstringYesOwner address (0x + 40 hex)
asset.kindstringYesAlways "erc20"
asset.addressstringYesToken contract address
asset.symbolstringNoToken symbol
asset.decimalsnumberNoToken decimals
spenderstringYesSpender address to approve
amountstringYesAllowance amount in base units
chainIdnumberNoChain ID (default: 8453)
maxGasWeistringNoMax gas limit in wei

Approval modes

How the user approves transactions depends on the ISCL Core approval mode:
ModeBehaviorBest For
cliReadline prompt in the ISCL Core terminalDevelopment, single-user
webPending in web dashboard at /approval-uiInteractive use, multi-tool
autoAuto-approved (no human confirmation)Testing only
Recommended for MCP: Use ISCL_APPROVAL_MODE=web and keep the approval dashboard open in a browser tab. When Claude requests a transaction, you will see it appear in the dashboard for approval.

Multi-chain configuration

The chainId parameter on each tool defaults to 8453 (Base). To use other chains, ensure ISCL Core has the corresponding RPC URL configured:
ISCL_RPC_URL_1=https://eth-mainnet.alchemy.com/v2/KEY \
ISCL_RPC_URL_8453=https://base-mainnet.alchemy.com/v2/KEY \
npm run dev
Then ask Claude to specify the chain: “Send 1 ETH to 0xAlice on Ethereum mainnet”
Supported chains: Ethereum (1), Optimism (10), Arbitrum (42161), Base (8453). Each chain requires its own ISCL_RPC_URL_<chainId> environment variable.

Troubleshooting

Tools don’t appear in Claude Desktop

  1. Verify the config file path is correct for your OS
  2. Check that the command path points to the built JS file
  3. Restart Claude Desktop after config changes
  4. Check Claude Desktop logs for MCP server startup errors

”ISCL Core not reachable”

The MCP adapter checks ISCL Core health on startup. Ensure Core is running:
curl http://localhost:3100/v1/health

Approval hangs

If using cli mode, check the ISCL Core terminal for the readline prompt. If using web mode, open http://localhost:3100/approval-ui and approve the pending request.

Schema validation errors

The MCP adapter validates parameters using Zod schemas. Ensure:
  • Addresses are checksummed 0x-prefixed (40 hex chars)
  • Amounts are string integers (no decimals, no “0x” prefix)
  • Chain IDs are positive integers

Security notes

The MCP adapter runs in Domain A (untrusted). It cannot access private keys directly.
  • All transactions go through the full ISCL pipeline: policy, preflight, approval, signing.
  • The adapter communicates with ISCL Core over localhost HTTP only.
  • Tool descriptions inform the AI about security properties (policy enforcement, human approval).
  • No signing material is ever exposed to the MCP transport layer.

References