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

  • Node.js 18+
  • An MCP-compatible client (Claude Desktop, Claude Code, or any MCP client)
  • An embarkAI API key from dashboard.embarkai.io 

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", "EMBARK_KEYSHARE_PASSWORD": "a-strong-password" } } } }

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

Claude Code (CLI)

claude mcp add embarkai --transport stdio \ -e EMBARK_API_KEY=lp_your_api_key \ -e EMBARK_WALLET_ID=my-agent-wallet \ -e EMBARK_CHAIN_ID=2030232745 \ -e EMBARK_KEYSHARE_PASSWORD=a-strong-password \ -- 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", "EMBARK_KEYSHARE_PASSWORD": "a-strong-password" } } } }

Configuration

All configuration is via environment variables:

VariableRequiredDefaultDescription
EMBARK_API_KEYYes—Project API key (lp_...) from the dashboard
EMBARK_WALLET_IDYes—Unique identifier for the server wallet
EMBARK_CHAIN_IDNo2030232745Default chain (Lumia Beam testnet)
EMBARK_KEYSHARE_PASSWORDYes—Encryption password for persisting keyshares to disk
EMBARK_KEYSHARE_DIRNo./data/keysharesDirectory for encrypted keyshare storage
EMBARK_WALLET_BACKUP_PASSWORDNo—Password for ShareVault backup/restore
EMBARK_DEBUGNofalseEnable debug logging to stderr

Important: Always set EMBARK_KEYSHARE_PASSWORD. Without it the keyshare lives only in memory and is lost when the MCP server restarts. The wallet still exists on the embarkAI side, so it is not re-created: it keeps reporting its address and balance but can no longer sign, and any funds on it become inaccessible. Back up the EMBARK_KEYSHARE_DIR folder together with the password.

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