Skip to Content
Getting StartedQuick Start: AI Agents

Quick Start: AI Agents

Give your AI agent blockchain superpowers in under 5 minutes using the @embarkai/mcp package.

Prerequisites

Installation

The fastest way to run the MCP server is with npx — no install required:

npx @embarkai/mcp

Or install it as a dependency:

npm install @embarkai/mcp viem dkls23-wasm

Minimal Working Example

Claude Desktop

Add the following to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "embarkai": { "command": "npx", "args": ["@embarkai/mcp"], "env": { "EMBARK_API_KEY": "lp_your_api_key", "EMBARK_WALLET_ID": "my-agent-wallet", "EMBARK_CHAIN_ID": "2030232745" } } } }

Restart Claude Desktop, then try asking: “What is my wallet address?” or “Send 0.1 LUMIA to 0x…”

Claude Code (CLI)

claude mcp add --transport stdio \ -e EMBARK_API_KEY=lp_your_api_key \ -e EMBARK_WALLET_ID=my-agent-wallet \ -e EMBARK_CHAIN_ID=2030232745 \ embarkai -- npx @embarkai/mcp

Verify registration:

claude mcp list

Project Config (.mcp.json)

Add to your project root .mcp.json:

{ "mcpServers": { "embarkai": { "command": "npx", "args": ["@embarkai/mcp"], "env": { "EMBARK_API_KEY": "lp_your_api_key", "EMBARK_WALLET_ID": "my-agent-wallet", "EMBARK_CHAIN_ID": "2030232745" } } } }

Configuration

All configuration is via environment variables:

VariableRequiredDefaultDescription
EMBARK_API_KEYYesProject API key (lp_...) from the dashboard
EMBARK_WALLET_IDYesUnique identifier for the server wallet
EMBARK_CHAIN_IDNo2030232745Default chain (Lumia Beam testnet)
EMBARK_KEYSHARE_PASSWORDNoEncryption password for persisting keyshares to disk
EMBARK_KEYSHARE_DIRNo./data/keysharesDirectory for encrypted keyshare storage
EMBARK_WALLET_BACKUP_PASSWORDNoPassword for ShareVault backup/restore
EMBARK_DEBUGNofalseEnable debug logging to stderr

Tip: For production use, always set EMBARK_KEYSHARE_PASSWORD to persist keyshares. Without it, the wallet re-runs the DKG protocol on every restart.

What Just Happened?

When you connected the MCP server to your AI client:

  1. MCP server started — The @embarkai/mcp package launched a stdio-based MCP server that speaks JSON-RPC.
  2. 7 tools registered — The AI client discovered the available blockchain tools.
  3. Wallet created on demand — On first use, the server runs the DKLS23 TSS protocol with EmbarkAI’s infrastructure to generate a smart wallet. Your keyshare stays local; no single party ever holds the full private key.
  4. Blockchain operations ready — The agent can now check balances, transfer tokens, read contracts, and switch chains.

Available Tools

ToolDescription
get_wallet_infoGet wallet addresses and active chain info
get_balanceCheck native or ERC20 token balance
transferSend native tokens or ERC20 tokens
read_contractCall any view/pure function on a smart contract
get_transaction_statusCheck status of a submitted UserOperation
list_supported_chainsList all supported blockchain networks
switch_chainSwitch the active chain for subsequent operations

Supported Chains

ChainChain IDType
Lumia Prism994873017Mainnet
Lumia Beam2030232745Testnet (default)
Ethereum Sepolia11155111Testnet
BSC Testnet97Testnet
Arbitrum Sepolia421614Testnet
Base Sepolia84532Testnet

Next Steps

Last updated on