Drive this wallet from any AI agent
The same @tetherto/wdk integration that powers the wallet UI is exposed as a Model Context Protocol server at /api/mcp. Read balances, resolve names, list transactions, and inspect token metadata across all ten chains — zero glue code, zero seed exposure.
The tools the agent gets
Every tool below is read-only: the wallet's seed phrase never leaves the user's device, so the MCP server cannot sign or send. The write path lives in the TypeScript example below.
list_supported_chains
Returns every chain id this template supports with its native asset symbol and decimals.
validate_address
Syntactically validates an address for a chain. Use to fail fast before more expensive RPC calls.
resolve_name
Resolves `.eth` (EVM) and `.sol` (Solana mainnet) names to their concrete addresses.
get_balance
Returns native + USDT + XAUt balances for an address on a chain, via the configured public RPC.
get_token_metadata
ERC-20 metadata read (symbol / decimals / name) for any EVM token contract.
get_recent_transactions
Recent transactions for an address. Solana via JSON-RPC, EVM family via Etherscan-compatible APIs.
1. TypeScript — direct WDK from your agent
The cleanest integration goes through lib/wdk-client.ts — the same module the wallet UI uses. This is the only path that can also sign and send, since it owns the seed locally. Wire it into your agent runtime when you need state-changing actions.
import { openWallet, sendToken } from "@/lib/wdk-client";
import { networkSpec } from "@/lib/chains";
// Same module the wallet UI uses — no glue code.
const wdk = await openWallet(seed, "mainnet");
const usdt = networkSpec("polygon", "mainnet")
.tetherTokens.find(t => t.symbol === "USDT")!;
await sendToken(wdk, "polygon", usdt.address, recipient, 100_000_000n);See examples/agent-send-usdt.ts in the repo for a runnable 130-line script that loads a seed from SEED_PHRASE, quotes a USDT transfer, sends, and prints the explorer link.
2. HTTP — probe and call from anywhere
The MCP endpoint speaks JSON-RPC 2.0 over HTTP. A plain GET returns a manifest with the protocol version and registered tool names — useful for health-checks. POSTs follow the MCP spec for the message shapes.
# Manifest
curl https://<your-deployment>/api/mcp
# Call a tool
curl -X POST https://<your-deployment>/api/mcp \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "resolve_name",
"arguments": { "chain": "evm", "name": "vitalik.eth" }
}
}'3. Desktop MCP clients — paste a snippet into their config
Every major desktop MCP client (Claude Desktop, Cursor, Continue, Cline, Windsurf) reads a JSON config file with this same shape. The snippet below uses Claude Desktop's claude_desktop_config.json as the host, but the inner mcpServers block transposes to the other clients verbatim. Replace <your-deployment> with the public URL of your fork.
{
"mcpServers": {
"wdk-wallet": {
"transport": {
"type": "http",
"url": "https://<your-deployment>/api/mcp"
}
}
}
}Restart the client. The wallet's tools then appear under the wdk-wallet server in any conversation. Rename that key in the snippet if you prefer a different label.