Setup & Installation
Install and configure the @embarkai/mcp server so your AI agent can interact with the blockchain.
Prerequisites
- Node.js 18+
- An EmbarkAI API key (get one at dashboard.embarkai.com )
- A wallet ID from your EmbarkAI dashboard
Installation
Option 1: Run directly with npx (recommended)
No installation needed. Most MCP clients support running the server via npx:
npx -y @embarkai/mcpOption 2: Install globally
npm install -g @embarkai/mcpThen run:
embarkai-mcpOption 3: Add as a project dependency
npm install @embarkai/mcpEnvironment variables
The MCP server reads its configuration from environment variables.
| Variable | Required | Default | Description |
|---|---|---|---|
EMBARK_API_KEY | Yes | — | Your EmbarkAI API key for authenticating with the TSS service |
EMBARK_WALLET_ID | Yes | — | The wallet identifier to operate on |
EMBARK_CHAIN_ID | No | 2030232745 | Initial chain ID (defaults to Lumia Beam testnet) |
EMBARK_KEYSHARE_DIR | No | ./data/keyshares | Directory for persistent keyshare storage on disk |
EMBARK_KEYSHARE_PASSWORD | No | — | Password to encrypt keyshares on disk. If omitted, keyshares are stored in memory only |
EMBARK_WALLET_BACKUP_PASSWORD | No | — | Password for restoring keyshares from the vault backup service |
EMBARK_DEBUG | No | false | Set to true to enable verbose debug logging |
Keyshare storage modes
- Memory-only (default): If
EMBARK_KEYSHARE_PASSWORDis not set, keyshares exist only in memory. They are regenerated on each server restart. - File-based: Set
EMBARK_KEYSHARE_PASSWORDto persist encrypted keyshares to the directory specified byEMBARK_KEYSHARE_DIR. This avoids repeated key generation and is recommended for production.
Quick start
Create a .env file:
EMBARK_API_KEY=your_api_key_here
EMBARK_WALLET_ID=your_wallet_id_here
EMBARK_CHAIN_ID=2030232745Run the server:
npx -y @embarkai/mcpThe server starts on stdio transport — it reads JSON-RPC messages from stdin and writes responses to stdout. MCP clients (Claude Desktop, Cursor, etc.) handle this automatically.
Verifying the connection
After configuring your MCP client, ask the AI agent:
“What is my wallet address?”
If the server is configured correctly, the agent will call get_wallet_info and return your smart wallet address, owner address, and active chain.
You can also test with:
“What chains are supported?”
This calls list_supported_chains and requires no wallet operations, making it a reliable connectivity check.
Next steps
- Claude Desktop — Configure the server in Claude Desktop
- Cursor — Configure the server in Cursor IDE
- Custom Agents — Use
@embarkai/mcpprogrammatically - Tools Reference — Full documentation for all 7 tools