wc_connect
Generate WalletConnect URI to pair external wallets like D'CENT, MetaMask, or Phantom with AI agents for multi-chain crypto operations.
Instructions
Start WalletConnect pairing. Returns a WC URI that the wallet owner can use to connect their external wallet (D'CENT, MetaMask, Phantom, etc). Share the URI with the user -- they can paste it into their wallet app.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet. |
Implementation Reference
- The handler function that executes the wc_connect tool by calling the /v1/wallet/wc/pair endpoint via the apiClient.
async (args) => { const body: Record<string, unknown> = {}; if (args.wallet_id) body.walletId = args.wallet_id; const result = await apiClient.post('/v1/wallet/wc/pair', body); return toToolResult(result); }, - packages/mcp/src/tools/wc-connect.ts:13-34 (registration)The registration function for the wc_connect tool in the MCP server.
export function registerWcConnect( server: McpServer, apiClient: ApiClient, walletContext?: WalletContext, ): void { server.tool( 'wc_connect', withWalletPrefix( "Start WalletConnect pairing. Returns a WC URI that the wallet owner can use to connect their external wallet (D'CENT, MetaMask, Phantom, etc). Share the URI with the user -- they can paste it into their wallet app.", walletContext?.walletName, ), { wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'), }, async (args) => { const body: Record<string, unknown> = {}; if (args.wallet_id) body.walletId = args.wallet_id; const result = await apiClient.post('/v1/wallet/wc/pair', body); return toToolResult(result); }, ); }