Getting Started
End-to-end, agent-first walkthrough for Namera CLI and MCP.
This guide is a complete, start-to-finish flow. You will install the CLI, create a keystore, create a smart account, create a session key with policies, verify onchain status, and run the MCP server for agent tooling.
Install the CLI
Install globally:
npm i -g @namera-ai/cliOr run without global install:
npx @namera-ai/cli --helpFor all install options, see Installation.
Verify installation
namera --helpCreate a keystore
Create your encrypted keystore (interactive prompts):
namera keystore createExpected output (pretty format):
Alias: my-owner
Address: 0x...
Path: /.../keystores/my-owner.jsonNon-interactive example:
namera keystore create --alias my-owner --password my-passwordCreate a smart account
Create a smart account owned by that keystore:
namera smart-account create --alias my-smart --owner-alias my-ownerExpected output:
Address: 0x...
KernelVersion: 0.3.2
Index: 0
Owner: my-ownerIf you skip --owner-password, the CLI prompts you for it.
Create a session key
Session keys are scoped permissions for agents. Create one for your smart account:
namera session-key create --alias my-session-key --smart-account my-smartDuring the interactive flow, you will:
- Select chains
- Set a session key password
- Enter the owner keystore password
- Configure policies (or choose
sudofor full access)
Policy types and examples
Policies define what the key can do. You can add multiple policies, or use sudo for full access.
Sudo policy:
{ "type": "sudo" }Timestamp policy:
{ "type": "timestamp", "validAfter": 1719916800, "validUntil": 1722604800 }Gas policy:
{ "type": "gas", "amount": "100000000000000000", "enforcePaymaster": false }Rate limit policy:
{ "type": "rate-limit", "interval": 3600, "count": 10, "startAt": 1720000000 }Signature caller policy:
{ "type": "signature-caller", "allowedCallers": ["0xabc...", "0xdef..."] }Call policy (manual permission):
{
"type": "call",
"policyVersion": "0.0.4",
"permissions": [
{
"target": "0x1111111111111111111111111111111111111111",
"valueLimit": "1000000000000000000"
}
]
}If you want to pass policies programmatically, use params mode:
namera session-key create --params '{"alias":"my-session-key","smartAccountAlias":"my-smart","chains":["eth-mainnet"],"sessionKeyPassword":"session-password","ownerKeystorePassword":"owner-password","policyParams":[{"type":"sudo"}]}'Check status
Check whether the smart account is deployed on a chain:
namera smart-account status --alias my-smart --chain eth-mainnetCheck whether the session key is installed on a chain:
namera session-key status --alias my-session-key --chain eth-mainnetStart the MCP server
Stdio transport (default)
namera mcp start --smart-account my-smart --session-key my-session-key=my-session-passwordThis runs as a local stdio server for tools that spawn MCP processes.
HTTP transport
namera mcp start --smart-account my-smart --session-key my-session-key=my-session-password --transport http --port 8080The server is available at:
http://localhost:8080/mcpConnect MCP to your agent
Use the local URL (http://localhost:8080/mcp) or the stdio command depending on your client.
Environment Variables
You can pass chain specific environment variables while starting the MCP server. For example:
# Ethereum Mainnet
export ETH_MAINNET_RPC_URL="https://mainnet.infura.io/v3/YOUR-PROJECT-ID"
export ETH_MAINNET_BUNDLER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/1"
export ETH_MAINNET_PAYMASTER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/1"
# Polygon Mainnet
export POLYGON_MAINNET_RPC_URL="https://polygon-rpc.com"
export POLYGON_MAINNET_BUNDLER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/137"
export POLYGON_MAINNET_PAYMASTER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/137"
# ... and moreFor list of supported chains and their chain IDs, see Supported Chains.
By default, the MCP server will use the default public RPC URL and Pimlico DefaultBundler URL. https://public.pimlico.io/v2/{chain_id}/rpc
Available Tools
| Tool | Description |
|---|---|
get_wallet_address | Return the smart account address |
get_balance | Get native balance for a chain and address |
read_contract | Read a contract method |
native_transfer | Transfer native tokens |
execute_transaction | Execute a batch transaction |
Example prompts for agents
Use prompts like these in your agent client:
1️⃣ Basic Address Lookup
> Get my wallet address.
2️⃣ Basic Balance Check
> Check my ETH balance on mainnet.
3️⃣ Contract Read
> Read USDC totalSupply on Ethereum using the USDC ABI.
4️⃣ Send Tokens
> Send 0.01 ETH to 0xabc... on mainnet.
5️⃣ Execute Transaction Batch
> send 0.001 eth to 0xabc... and 10 usdc to 0xdef... on mainnet.For advanced use, tighten policies when creating session keys so the agent can only do what you intend.