create_wifi_qr
Generate QR codes for WiFi networks to allow phones to connect automatically when scanned. Encodes network credentials directly in the image for offline access.
Instructions
Create a QR code that encodes WiFi credentials. When scanned by a phone camera, it offers to auto-join the WiFi network. No internet connection needed to join — the credentials are encoded directly in the QR image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ssid | Yes | WiFi network name (SSID). | |
| password | No | WiFi password. Omit for open networks (use encryption='nopass'). | |
| encryption | No | Encryption type. Default: WPA. | WPA |
| hidden | No | Whether the network is hidden. Default: false. | |
| label | No | Label for this QR code. | |
| format | No | Image format. | svg |
| foreground_color | No | Hex color for dots. | |
| background_color | No | Hex color for background. | |
| dot_style | No | Dot shape. | |
| corner_style | No | Corner shape. | |
| logo_url | No | Logo URL or data URI. | |
| frame_style | No | Frame style around QR. | |
| frame_text | No | CTA text on frame (max 30 chars). | |
| frame_color | No | Frame background color. | |
| frame_text_color | No | Frame text color. |
Implementation Reference
- packages/mcp/src/tools.ts:334-344 (handler)Handler function for the create_wifi_qr tool that calls the API.
handler: async (input: Record<string, unknown>) => { const { ssid, password, encryption, hidden, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "wifi", wifi_data: { ssid, password, encryption, hidden }, ...rest, }, }); }, - packages/mcp/src/tools.ts:317-333 (schema)Input schema definition for the create_wifi_qr tool.
inputSchema: z.object({ ssid: z.string().describe("WiFi network name (SSID)."), password: z.string().optional().describe("WiFi password. Omit for open networks (use encryption='nopass')."), encryption: z.enum(["WPA", "WEP", "nopass"]).default("WPA").describe("Encryption type. Default: WPA."), hidden: z.boolean().optional().describe("Whether the network is hidden. Default: false."), label: z.string().optional().describe("Label for this QR code."), format: z.enum(["svg", "png"]).default("svg").describe("Image format."), foreground_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Hex color for dots."), background_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Hex color for background."), dot_style: z.enum(["square", "rounded", "dots", "classy-rounded"]).optional().describe("Dot shape."), corner_style: z.enum(["square", "extra-rounded", "dot"]).optional().describe("Corner shape."), logo_url: z.string().optional().describe("Logo URL or data URI."), frame_style: z.enum(["none", "banner_bottom", "banner_top", "rounded"]).optional().describe("Frame style around QR."), frame_text: z.string().max(30).optional().describe("CTA text on frame (max 30 chars)."), frame_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Frame background color."), frame_text_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Frame text color."), }),