Skip to main content
Glama
verify-message.ts1.02 kB
import type { Config } from "@wagmi/core"; import type { FastMCP } from "fastmcp"; import { verifyMessage } from "@wagmi/core"; import { Address } from "abitype/zod"; import { z } from "zod"; import { Signature } from "../utils/evm-schema"; export function registerVerifyMessageTools(server: FastMCP, wagmiConfig: Config): void { server.addTool({ name: "verify-message", description: "Verify that a message was signed by the provided address.", parameters: z.object({ address: Address.describe("The Ethereum address that signed the original message."), message: z.string().describe("The message to be verified."), signature: Signature.describe("The signature that was generated by signing the message with the address's signer."), }), execute: async (args) => { const result = await verifyMessage(wagmiConfig, args); return { content: [ { type: "text", text: result.toString(), }, ], }; }, }); };

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xiawpohr/metamask-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server