Skip to main content
Glama

show-connect-qrcode

Generate a QR code from a connection URI to enable secure blockchain interactions through MetaMask without exposing private keys.

Instructions

Show the connect QR code for a given connect URI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYesConnect URI

Implementation Reference

  • The execute handler for the 'show-connect-qrcode' tool. Generates a QR code Data URL from the input URI using the QRCode library and returns it as an image content response.
    execute: async (args) => { const uri = args.uri; const qrCode = await QRCode.toDataURL(uri, { width: 200, }); return imageContent({ url: qrCode, }); },
  • Zod input schema defining the 'uri' parameter as a required string.
    parameters: z.object({ uri: z.string().describe("Connect URI"), }),
  • The server.addTool call that registers the 'show-connect-qrcode' tool with FastMCP, including name, description, schema, and 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