Skip to Content
🤖 AI AgentsSetup & Installation

Setup & Installation

Install and configure the @embarkai/mcp server so your AI agent can interact with the blockchain.

Prerequisites

Installation

No installation needed. Most MCP clients support running the server via npx:

npx -y @embarkai/mcp

Option 2: Install globally

npm install -g @embarkai/mcp

Then run:

embarkai-mcp

Option 3: Add as a project dependency

npm install @embarkai/mcp

Environment variables

The MCP server reads its configuration from environment variables.

VariableRequiredDefaultDescription
EMBARK_API_KEYYes—Your embarkAI API key for authenticating with the TSS service
EMBARK_WALLET_IDYes—The wallet identifier to operate on
EMBARK_CHAIN_IDNo2030232745Initial chain ID (defaults to Lumia Beam testnet)
EMBARK_KEYSHARE_DIRNo./data/keysharesDirectory for persistent keyshare storage on disk
EMBARK_KEYSHARE_PASSWORDYes—Password to encrypt keyshares on disk
EMBARK_WALLET_BACKUP_PASSWORDNo—Password for restoring keyshares from the vault backup service
EMBARK_DEBUGNofalseSet to true to enable verbose debug logging

Keyshare storage modes

  • File-based: Set EMBARK_KEYSHARE_PASSWORD to persist encrypted keyshares to the directory specified by EMBARK_KEYSHARE_DIR. Back up that directory together with the password.
  • Memory-only: If EMBARK_KEYSHARE_PASSWORD is not set, the keyshare lives only in memory and is lost when the 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. Use this mode only for throwaway testing.

Quick start

Create a .env file:

EMBARK_API_KEY=your_api_key_here EMBARK_WALLET_ID=your_wallet_id_here EMBARK_CHAIN_ID=2030232745 EMBARK_KEYSHARE_PASSWORD=a_strong_password

Run the server:

npx -y @embarkai/mcp

The 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

Last updated on