Skip to main content
Glama

show-connect-qrcode

Generate a QR code from a connect URI to securely link MetaMask with blockchain operations, ensuring private keys remain protected in your wallet.

Instructions

Show the connect QR code for a given connect URI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYesConnect URI

Implementation Reference

  • Handler function that takes a connect URI, generates a QR code data URL using QRCode.toDataURL, and returns it wrapped in imageContent.
    execute: async (args) => { const uri = args.uri; const qrCode = await QRCode.toDataURL(uri, { width: 200, }); return imageContent({ url: qrCode, }); },
  • Zod input schema requiring a 'uri' string parameter.
    parameters: z.object({ uri: z.string().describe("Connect URI"), }),
  • Tool registration via server.addTool, defining name, description, input schema, and execute handler.
    server.addTool({ name: "show-connect-qrcode", description: "Show the connect QR code for a given connect URI.", parameters: z.object({ uri: z.string().describe("Connect URI"), }), execute: async (args) => { const uri = args.uri; const qrCode = await QRCode.toDataURL(uri, { width: 200, }); return imageContent({ url: qrCode, }); }, });

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