Connect an AI Assistant (MCP)
Connect Hermes, Claude, Cursor or LM Studio to a BVCC Agent Wallet over MCP. One command exposes 16 tools (send, swap, balances, limits) that the assistant calls on your behalf — every spend limit, allowed token and recipient is enforced on-chain, not by the MCP. The MCP adds no powers: the agent can only do what you authorized in the dashboard.
@bvcc/agent-sdk separately — the MCP (@bvcc/agent-mcp) bundles it. The SDK is only for building your own bot in code. See the SDK on npm.How it works
- ●Your assistant speaks MCP natively (Hermes, Claude Code, the Claude app, Cursor, LM Studio).
- ●
npx -y @bvcc/agent-mcpregisters the tools — no plugin to install, no adapter to write. - ●The agent is a normal EOA with its own keypair that signs
executeAsAgentand pays its own gas. - ●The contract is the source of truth: a blocked action reverts and the tool returns a
humanMessage+suggestedAction.
Before you connect (on-chain, once)
1. Create the Agent Wallet
Create it from the BVCC dashboard. Its WALLET_ADDRESS is the same on every chain (deterministic CREATE2).
2. Generate a dedicated agent EOA
The agent is its own keypair — never your wallet owner key. Keep the private key (for the MCP config) and the public address (you authorize it next).
3. ⚠️ Authorize the agent on-chain — with limits
In the dashboard, authorize the agent address on each chain you will use, and set: allowedTokens, allowedProtocols (for swaps, the router and Permit2), optional allowedRecipients, spend caps (per-tx / daily / period / total, native + per-token) and an optional expiry. Without this the contract reverts with NotAuthorizedAgent. Keep limits tight — a leaked agent key is only worth what you authorized. Full detail in Agent Integration.
4. ⚠️ Fund the agent EOA with gas
The agent pays its own gas to sign executeAsAgent. Send a small amount of the native token (ETH/BNB) to the agent EOA address on each chain. The funds it *operates* live in the wallet — the EOA only needs gas.
Configuration
Provide these as environment variables. Recommended: keep them in a dedicated file and point the server at it with BVCC_ENV_FILE, so the key stays out of the host config (which often gets shared or synced). chmod 600 it and keep it out of any cloud-synced folder.
| Variable | Required | What it is |
|---|---|---|
AGENT_PRIVATE_KEY | ✅ | The agent EOA private key from step 2 (0x + 64 hex). |
WALLET_ADDRESS | ✅ | The Agent Wallet from step 1. |
CHAIN_ID | ✅ | Default chain: 1 Ethereum · 56 BNB · 42161 Arbitrum One · 8453 Base · 421614 Arbitrum Sepolia. |
RPC_URL / RPC_URL_<id> | — | Your own RPC(s). Comma-separate several for failover. Else public defaults are used. |
BVCC_MCP_READONLY | — | true exposes only the 11 read/simulate tools (never moves funds). |
Example agent.env:
The server is multi-network: every tool takes an optional network (chain id or name), so you can say "swap on bsc" without restarting — provided the agent is authorized on that chain. The 4 mainnets ship with a backup public RPC, so basic failover works with zero config.
Register it in your assistant
Claude Code
Cursor · Claude app · LM Studio
Add the server to the client mcp.json (Cursor: Settings → MCP; LM Studio: Program → Edit mcp.json):
You can also put AGENT_PRIVATE_KEY / WALLET_ADDRESS / CHAIN_ID directly in the env block instead of BVCC_ENV_FILE, but a separate file is safer.
Hermes
Hermes speaks MCP natively, so it needs no custom plugin. In the MCP tab → New server, set a Name and paste into Server JSON — but here Hermes expects only the server object, *without* the { "mcpServers": { … } } wrapper:
{ "mcpServers": { … } } wrapper here gives MCP server has no 'command' in config. Paste only { command, args, env }. Then Save server → Reload MCP. The first launch is slow (npx downloads the package). The tools won't appear under "Skills & Tools" — that tab is for built-in tools — but the model has them (the log shows registered 16 tool(s)).Read-only mode
Set BVCC_MCP_READONLY=true to expose only the 11 read/simulate tools (status, balances, quotes, dry-runs) and hide the 5 that move funds. Good for a first connection, dashboards, or untrusted models. To let the model actually swap or send, use the full entry without that variable.
Verify
Restart the client and ask the model to check the agent status (getAgentStatus). You want isAuthorized: true, isPaused: false, and the expected allowedTokens / allowedProtocols. Then try a read, a plan (buildSwapPlan with quote: true), and finally a write. Good first prompt:
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
NotAuthorizedAgent | Agent not authorized on this chain | Authorize the agent address on that chain (step 3). |
| Tx fails / "out of funds for gas" | Agent EOA has no native balance | Send gas to the agent EOA (step 4). |
TokenNotAllowed / ProtocolNotAllowed | Token/router not whitelisted | Add it to allowedTokens / allowedProtocols. |
EnforcedPause | Agents paused on the wallet | Unpause from the dashboard. |
| Action on the wrong chain | network omitted / wrong | Pass network explicitly, or set CHAIN_ID. |
Hermes: no 'command' in config | Pasted the mcpServers wrapper | Paste only the server object { command, args, env }. |
Stale version via npx | npx cache | Pin @bvcc/agent-mcp@latest or run npx clear-npx-cache. |