Skip to main content
Glama

verify-message

Verify digital signatures to confirm message authenticity and sender identity using address, message, and signature data.

Instructions

Verify that a message was signed by the provided address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
messageYes
signatureYes

Implementation Reference

  • The execute handler that performs the message verification using wagmi's verifyMessage function with the provided address, message, and signature.
    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 for the tool's input parameters: address (string), message (string), signature (string).
    parameters: z.object({
      address: z.string(),
      message: z.string(),
      signature: z.string(),
    }),
  • The server.addTool call that registers the "verify-message" tool including its name, description, parameters schema, and execute handler.
    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(),
            },
          ],
        }
      },
    });
  • Helper function to register the verify-message tool on the FastMCP server.
    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(),
              },
            ],
          }
        },
      });
    };
  • Top-level registration call in the main index.ts file that invokes the helper to add the tool to the MCP server.
    registerVerifyMessageTools(server);

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/mcpilot'

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