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.lumiapassport.com
Installation
The fastest way to run the MCP server is with npx — no install required:
npx @embarkai/mcpOr install it as a dependency:
npm install @embarkai/mcp viem dkls23-wasmMinimal 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/mcpVerify registration:
claude mcp listProject 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:
| Variable | Required | Default | Description |
|---|---|---|---|
EMBARK_API_KEY | Yes | — | Project API key (lp_...) from the dashboard |
EMBARK_WALLET_ID | Yes | — | Unique identifier for the server wallet |
EMBARK_CHAIN_ID | No | 2030232745 | Default chain (Lumia Beam testnet) |
EMBARK_KEYSHARE_PASSWORD | No | — | Encryption password for persisting keyshares to disk |
EMBARK_KEYSHARE_DIR | No | ./data/keyshares | Directory for encrypted keyshare storage |
EMBARK_WALLET_BACKUP_PASSWORD | No | — | Password for ShareVault backup/restore |
EMBARK_DEBUG | No | false | Enable debug logging to stderr |
Tip: For production use, always set
EMBARK_KEYSHARE_PASSWORDto 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:
- MCP server started — The
@embarkai/mcppackage launched a stdio-based MCP server that speaks JSON-RPC. - 7 tools registered — The AI client discovered the available blockchain tools.
- 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.
- Blockchain operations ready — The agent can now check balances, transfer tokens, read contracts, and switch chains.
Available Tools
| Tool | Description |
|---|---|
get_wallet_info | Get wallet addresses and active chain info |
get_balance | Check native or ERC20 token balance |
transfer | Send native tokens or ERC20 tokens |
read_contract | Call any view/pure function on a smart contract |
get_transaction_status | Check status of a submitted UserOperation |
list_supported_chains | List all supported blockchain networks |
switch_chain | Switch the active chain for subsequent operations |
Supported Chains
| Chain | Chain ID | Type |
|---|---|---|
| Lumia Prism | 994873017 | Mainnet |
| Lumia Beam | 2030232745 | Testnet (default) |
| Ethereum Sepolia | 11155111 | Testnet |
| BSC Testnet | 97 | Testnet |
| Arbitrum Sepolia | 421614 | Testnet |
| Base Sepolia | 84532 | Testnet |
Next Steps
- AI Agents Setup — advanced configuration, programmatic usage, and debugging
- Tools Reference — detailed input/output schemas for all 7 tools
Last updated on