Get Started
Install the MCP Toolkit and run your first AI-powered wallet server
Building a LangChain agent? The serve command provides zero-config MCP server startup -- no server script needed. See LangChain Integration.
Source Setup
The toolkit is currently available from source, not as a working npm release. Check out the revision described by these pages:
git clone https://github.com/tetherto/wdk-mcp-toolkit.git
cd wdk-mcp-toolkit
git checkout 0640ef219d8a6242d90b0e80b6733548a0bc3eb5
npm ciStart the stdio server with:
node bin/index.js serveWithout a seed source, serve exposes pricing tools only. To enable wallet tools, configure a trusted secret-manager command and install the wallet modules you need:
WDK_SEED_COMMAND="/absolute/path/to/trusted-seed-loader" node bin/index.js serveReplace the placeholder with your own trusted executable that reads the mnemonic from a secret manager. WDK does not provide this executable. Authenticate the secret manager before starting the MCP client; the command must run without interactive input and print only the mnemonic to stdout. See seed sources and precedence for WDK_SEED_COMMAND, WDK_SEED_FILE, and WDK_SEED.
For client setup, use node with the absolute path to bin/index.js followed by serve; see the LangChain examples.
Security - A seed in an environment variable or gitignored client configuration is still accessible to code that can read that environment or file. Use a dedicated development wallet with limited funds. Review confirmation and agent access before exposing write tools.
Manual Setup
If you prefer to set things up yourself or want to integrate the toolkit into an existing project:
Install the toolkit
Install the MCP Toolkit and the wallet modules you need:
npm install github:tetherto/wdk-mcp-toolkit#0640ef219d8a6242d90b0e80b6733548a0bc3eb5 @modelcontextprotocol/sdk
# Wallet modules (add any combination)
npm install @tetherto/wdk-wallet-evm # Ethereum, Polygon, Arbitrum, etc.
npm install @tetherto/wdk-wallet-btc # BitcoinCreate your MCP server
Create index.js with a basic multi-chain server. Set "type": "module" in your app's package.json to use these imports.
The loadSeed() function below is application code that explicitly reads WDK_SEED_COMMAND. The useWdk() API does not resolve command or file sources itself. This example requires a trusted, noninteractive secret-manager command, rejects empty output, and sets a 30-second timeout. The built-in serve command has no configured command timeout.
import { WdkMcpServer, WALLET_TOOLS, PRICING_TOOLS } from '@tetherto/wdk-mcp-toolkit'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { execSync } from 'node:child_process'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
function loadSeed () {
const command = process.env.WDK_SEED_COMMAND
if (!command?.trim()) {
throw new Error('Set WDK_SEED_COMMAND to a trusted secret-manager command.')
}
try {
const seed = execSync(command, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
timeout: 30000,
killSignal: 'SIGKILL'
}).trim()
if (!seed) throw new Error('Empty seed')
return seed
} catch {
throw new Error('Seed loading failed. Check your secret manager and command configuration.')
}
}
const server = new WdkMcpServer('my-wallet-server', '1.0.0')
// 1. Load the seed without printing it or child-process errors
server.useWdk({ seed: loadSeed() })
// 2. Register wallet modules
server.registerWallet('ethereum', WalletManagerEvm, {
provider: 'https://eth.drpc.org'
})
server.registerWallet('bitcoin', WalletManagerBtc, {
network: 'bitcoin',
host: 'electrum.blockstream.info',
port: 50001
})
// 3. Enable pricing
server.usePricing()
// 4. Register tools and start
server.registerTools([...WALLET_TOOLS, ...PRICING_TOOLS])
await server.connect(new StdioServerTransport())Connect your AI client
Add the custom index.js server to your AI tool's configuration. In the JSON and YAML examples, replace /absolute/path/to/index.js with the full path to your custom server so startup does not depend on the client's working directory.
In every example below, replace /absolute/path/to/trusted-seed-loader with your secret-manager executable. Authenticate it first and ensure it can run without interactive input in the MCP server's environment. Keep the command under your control; it is executed through a shell.
Config path: .vscode/mcp.json (project-level)
{
"servers": {
"wdk": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/index.js"],
"env": {
"WDK_SEED_COMMAND": "/absolute/path/to/trusted-seed-loader"
}
}
}
}Then in VS Code:
- Open
.vscode/mcp.jsonand click Start above the server config - Open GitHub Copilot Chat and select Agent mode
- Click Tools to verify the MCP tools are available
Try it out
Ask your AI assistant:
What's my ethereum address?Check my BTC balanceWhat's the current price of ETH in USD?Send 10 USDt to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7 on ethereumWith elicitation enabled and a compatible MCP client, sending, swapping, bridging, signing, and lending tools request approval before continuing. Disabling elicitation automatically accepts those requests. See confirmation settings and limits.
Optional Capabilities
Add more capabilities by installing additional packages and enabling them on the server:
Do not enable Velora beta.8 and beta.9, USD₮0 bridge beta.10, or Aave beta.7 with EVM wallet beta.19. These adapters reject the provider on manager-derived accounts when the protocol is constructed, so the example below omits them. Check the installed wallet and adapter versions before registering them; see EVM provider compatibility. A separate direct account does not inherit the server's registered account controls.
import { INDEXER_TOOLS, FIAT_TOOLS } from '@tetherto/wdk-mcp-toolkit'
import MoonPayProtocol from '@tetherto/wdk-protocol-fiat-moonpay'
// Indexer - transaction history
server.useIndexer({ apiKey: process.env.WDK_INDEXER_API_KEY })
// Fiat protocol
server.registerProtocol('ethereum', 'moonpay', MoonPayProtocol, {
apiKey: process.env.MOONPAY_API_KEY
})
// Register the corresponding tools
server.registerTools([
...INDEXER_TOOLS,
...FIAT_TOOLS
])Environment Variables
For built-in serve, each seed variable is optional; wallet tools require a nonempty resolved seed. See source precedence. The custom index.js example above requires WDK_SEED_COMMAND and does not implement the other two sources.
| Variable | Required | Description |
|---|---|---|
WDK_SEED | No | Direct mnemonic; takes precedence over the command and file sources in serve |
WDK_SEED_COMMAND | No | Trusted command whose stdout contains the mnemonic; preferred over storing the mnemonic in client configuration |
WDK_SEED_FILE | No | UTF-8 file containing the mnemonic; used by serve when both preceding variables are unset or empty |
WDK_INDEXER_API_KEY | No | Enables INDEXER_TOOLS - get a key |
MOONPAY_API_KEY | No | Enables FIAT_TOOLS - MoonPay Dashboard |
Next Steps
- Configuration - Wallets, tokens, protocols, custom tools, and security
- API Reference - All 35 built-in MCP tools with parameters and schemas