verify-message
Confirm message authenticity by verifying if it was signed by a specific address using provided signature, ensuring secure blockchain interactions without exposing private keys.
Instructions
Verify that a message was signed by the provided address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | ||
| message | Yes | ||
| signature | Yes |
Implementation Reference
- The handler function that performs the message verification using wagmi's verifyMessage function with the provided address, message, and signature, returning a text content result.execute: async (args) => { const address = args.address as Address const message = args.message const signature = args.signature as `0x${string}` const result = await verifyMessage(wagmiConfig, { address, message, signature, }) return { content: [ { type: "text", text: result.toString(), }, ], } },
- Zod schema defining the input parameters for the verify-message tool: address (string), message (string), signature (string).parameters: z.object({ address: z.string(), message: z.string(), signature: z.string(), }),
- packages/metamask-mcp/src/tools/verify-message.ts:7-35 (registration)The registration function that adds the verify-message tool to the FastMCP server, including name, description, schema, and handler.export function registerVerifyMessageTools(server: FastMCP): void { server.addTool({ name: "verify-message", description: "Verify that a message was signed by the provided address", parameters: z.object({ address: z.string(), message: z.string(), signature: z.string(), }), execute: async (args) => { const address = args.address as Address const message = args.message const signature = args.signature as `0x${string}` const result = await verifyMessage(wagmiConfig, { address, message, signature, }) return { content: [ { type: "text", text: result.toString(), }, ], } }, }); };
- packages/metamask-mcp/src/index.ts:58-58 (registration)Top-level call to register the verify-message tool on the main FastMCP server instance.registerVerifyMessageTools(server);