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_KEYYesYour EmbarkAI API key for authenticating with the TSS service
EMBARK_WALLET_IDYesThe 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_PASSWORDNoPassword to encrypt keyshares on disk. If omitted, keyshares are stored in memory only
EMBARK_WALLET_BACKUP_PASSWORDNoPassword for restoring keyshares from the vault backup service
EMBARK_DEBUGNofalseSet to true to enable verbose debug logging

Keyshare storage modes

  • Memory-only (default): If EMBARK_KEYSHARE_PASSWORD is not set, keyshares exist only in memory. They are regenerated on each server restart.
  • File-based: Set EMBARK_KEYSHARE_PASSWORD to persist encrypted keyshares to the directory specified by EMBARK_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=2030232745

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