disconnect
Terminate the active wallet connection within the MetaMask MCP server, ensuring secure disengagement from blockchain interactions while retaining private key security in your crypto wallet.
Instructions
Disconnect the wallet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/disconnect.ts:11-21 (handler)The execute function that performs the wallet disconnection using wagmi/core's disconnect and returns a structured success response.execute: async () => { await disconnect(wagmiConfig); return { content: [ { type: "text", text: "Disconnect successfully", }, ], }; },
- src/tools/disconnect.ts:10-10 (schema)Zod schema defining no input parameters for the disconnect tool.parameters: z.object({}),
- src/tools/disconnect.ts:6-23 (registration)Function that registers the disconnect tool with the FastMCP server.export function registerDisconnectTools(server: FastMCP, wagmiConfig: Config): void { server.addTool({ name: "disconnect", description: "Disconnect the wallet.", parameters: z.object({}), execute: async () => { await disconnect(wagmiConfig); return { content: [ { type: "text", text: "Disconnect successfully", }, ], }; }, }); };
- src/tools/register-tools.ts:37-37 (registration)Calls the disconnect tool registration function as part of registering all tools.registerDisconnectTools(server, wagmiConfig);