owl-wallet
The owl-wallet MCP server provides AI agents with direct access to the SmartWallet factory system. It enables agents to compute deterministic wallet addresses, generate deployment initCode, and query factory state — all without requiring direct smart contract interaction knowledge.
This server is designed for agents that need to:
Deploy new smart wallets deterministically via ERC-4337
Verify wallet addresses before deployment
Generate UserOperation initCode for bundler submission
Understand the wallet creation flow
Architecture Overview
The owl-wallet server acts as a read-only interface layer between AI agents and the deployed SmartWalletFactory contract. It translates high-level agent requests into web3 RPC calls, handles CREATE2 address computation, and formats responses in agent-friendly JSON.
Key capabilities:
Deterministic address computation — Agents can predict wallet addresses before deployment
initCode generation — Produces the exact calldata needed for ERC-4337 UserOperation deployment
Factory state queries — Checks EntryPoint configuration, implementation addresses, and pause status
Educational context — Provides human-readable explanations of the wallet creation process
Available Tools
get_factory_state
Returns factory configuration including EntryPoint address, wallet implementation, guardian contract, and pause status
get_wallet_address
Computes the deterministic CREATE2 address for a wallet given owner, guardian, and salt parameters
get_init_code
Generates the complete initCode bytes for UserOperation deployment (factory address + calldata)
explain_create_flow
Returns a detailed explanation of the wallet creation process, CREATE2 mechanics, and deployment requirements
Setup and Configuration
Requirements
Node.js 18+
RPC URL for the target network (e.g., Base Sepolia, Base mainnet)
Factory address — deployed SmartWalletFactory contract
Chain ID — expected network identifier for validation
Installation
Environment Variables
Running the Server
Standard mode (stdio):
SSE/HTTP mode (Express server):
Production build:
Development Commands
How AI Agents Use This Server
Typical Agent Workflow
Query factory state to verify the factory is operational and retrieve configuration
Compute wallet address using the agent's owner key, guardian address, and a unique salt
Check if wallet is deployed (via on-chain code check or balance query)
Generate initCode if wallet does not exist
Submit UserOperation with initCode to bundler for deployment
Example: Agent Deploying a New Wallet
Security Considerations
Factory pause status — Agents must check
pausedstate before attempting deploymentAddress verification — Always verify computed addresses match expected values
Salt uniqueness — Using the same owner + guardian + salt will produce the same address; increment salt for multiple wallets
initCode usage — initCode is only required for first-time deployment; omit for existing wallets
Tool Reference
get_factory_state
Returns the current configuration and operational status of the SmartWalletFactory.
Parameters: None
Returns:
Agent use case: Verify factory is operational before computing addresses or generating initCode.
get_wallet_address
Computes the deterministic CREATE2 address for a SmartWallet.
Parameters:
Returns:
Agent use case: Predict wallet address before deployment, verify address matches expected value, check if wallet already exists.
get_init_code
Generates the complete initCode for UserOperation deployment.
Parameters:
Returns:
Agent use case: Populate UserOperation.initCode field for first-time wallet deployment via ERC-4337 bundler.
Note: initCode should only be included in UserOperations when the wallet does not yet exist on-chain. For existing wallets, use empty bytes (0x).
explain_create_flow
Returns a human-readable explanation of the wallet creation process.
Parameters: None
Returns:
Agent use case: Understand the wallet creation process, troubleshoot deployment issues, generate educational content for users.
Network Configuration
Base Sepolia (Testnet)
Base Mainnet
Deployment Notes
Factory must be unpaused for wallet deployment to succeed
Wallet addresses are deterministic — same owner + guardian + salt = same address
initCode is deployment-only — only required for first UserOperation; omit for existing wallets
CREATE2 guarantees — addresses can be computed off-chain and verified on-chain before deployment
Related Documentation
SmartWalletFactory Contract — On-chain factory implementation
SmartWallet Contract — Core wallet contract
ERC-4337 Overview — Account abstraction standard
MCP Protocol — Model Context Protocol specification
Last updated