{"openapi":"3.1.0","info":{"title":"QR Code Magic — MCP server","version":"0.1.0","description":"Public Model Context Protocol server for the QR code generator. Streamable-HTTP endpoint at /mcp, plus a health endpoint and a public QR image endpoint. No authentication required; rate limits apply.","contact":{"name":"Aytekin Armutcu","url":"https://aytekin-armutcu.de"}},"servers":[{"url":"https://qr.aytekin-armutcu.de"}],"tags":[{"name":"MCP tools","description":"Tools callable through JSON-RPC `tools/call` on /mcp."},{"name":"Operations","description":"Health and machine-readable documentation."},{"name":"Images","description":"Public QR image rendering over plain HTTP."}],"paths":{"/mcp":{"post":{"tags":["MCP tools"],"operationId":"mcpJsonRpc","summary":"MCP JSON-RPC endpoint (streamable HTTP)","description":"Standard MCP endpoint. Send `Accept: application/json, text/event-stream`. Supported methods include `initialize`, `tools/list` and `tools/call`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC response or SSE stream."}}}},"/mcp/health":{"get":{"tags":["Operations"],"operationId":"mcpHealth","summary":"Health check and current limit configuration","responses":{"200":{"description":"Server status, tool inventory and rate limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/mcp/openapi.json":{"get":{"tags":["Operations"],"operationId":"mcpOpenApi","summary":"This OpenAPI 3.1 document","responses":{"200":{"description":"OpenAPI document."}}}},"/mcp/schema.json":{"get":{"tags":["Operations"],"operationId":"mcpSchemas","summary":"JSON Schema for every MCP tool input","responses":{"200":{"description":"JSON Schema bundle."}}}},"/api/public/qr":{"get":{"tags":["Images"],"operationId":"renderQrImage","summary":"Render a QR image as PNG or vector SVG","description":"Rate limit: 30 requests per minute per IP.","parameters":[{"name":"data","in":"query","required":true,"schema":{"type":"string","maxLength":2000},"description":"The payload text to encode."},{"name":"format","in":"query","schema":{"type":"string","enum":["png","svg"],"default":"png"}},{"name":"size","in":"query","schema":{"type":"integer","minimum":64,"maximum":2048,"default":512}},{"name":"margin","in":"query","schema":{"type":"integer","minimum":0,"maximum":16}},{"name":"dark","in":"query","schema":{"type":"string"},"description":"Hex color."},{"name":"light","in":"query","schema":{"type":"string"},"description":"Hex color."},{"name":"ecc","in":"query","schema":{"type":"string","enum":["L","M","Q","H"],"default":"M"}},{"name":"download","in":"query","schema":{"type":"string","enum":["1"]},"description":"Send a Content-Disposition attachment header."}],"responses":{"200":{"description":"The rendered image.","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or missing parameters."},"429":{"description":"Rate limit exceeded."}}}},"/mcp#list_qr_types":{"post":{"tags":["MCP tools"],"operationId":"tool_list_qr_types","summary":"List QR code types","description":"List all supported QR code types with their required fields, plus the supported social media platforms.\n\nJSON-RPC call to POST /mcp with method `tools/call` and `params.name = \"list_qr_types\"`. Limit: 60 calls/minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"list_qr_types"},"arguments":{"type":"object","properties":{},"additionalProperties":false}}}}}}}},"responses":{"200":{"description":"JSON-RPC result with MCP content blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}},"text/event-stream":{"schema":{"type":"string"}}}}}}},"/mcp#build_qr_payload":{"post":{"tags":["MCP tools"],"operationId":"tool_build_qr_payload","summary":"Build QR code payload","description":"Build the encoded text for a QR code from a type and its fields (e.g. url, wifi, vcard, sepa, whatsapp, social) and validate the input. Returns the payload string plus any errors or warnings.\n\nJSON-RPC call to POST /mcp with method `tools/call` and `params.name = \"build_qr_payload\"`. Limit: 60 calls/minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"build_qr_payload"},"arguments":{"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["url","whatsapp","social","text","wifi","vcard","email","phone","sms","sepa","event","geo"],"description":"QR code type, e.g. 'url', 'wifi', 'whatsapp', 'social'."},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Field values for the type, e.g. { url: 'https://example.com' } or { platform: 'instagram', handle: 'name' }. Use list_qr_types for required fields."}},"required":["type","fields"]}}}}}}}},"responses":{"200":{"description":"JSON-RPC result with MCP content blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}},"text/event-stream":{"schema":{"type":"string"}}}}}}},"/mcp#whatsapp_link":{"post":{"tags":["MCP tools"],"operationId":"tool_whatsapp_link","summary":"Build WhatsApp chat link","description":"Turn a phone number (international format, e.g. +49170...) and an optional first message into a wa.me chat link ready to encode as a QR code.\n\nJSON-RPC call to POST /mcp with method `tools/call` and `params.name = \"whatsapp_link\"`. Limit: 60 calls/minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"whatsapp_link"},"arguments":{"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"number":{"type":"string","minLength":1,"description":"Phone number in international format, e.g. +4917012345678."},"message":{"description":"Optional prefilled chat message.","type":"string"}},"required":["number"]}}}}}}}},"responses":{"200":{"description":"JSON-RPC result with MCP content blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}},"text/event-stream":{"schema":{"type":"string"}}}}}}},"/mcp#social_profile_url":{"post":{"tags":["MCP tools"],"operationId":"tool_social_profile_url","summary":"Build social profile URL","description":"Build the public profile URL for a social platform from a username or a pasted profile link, ready to encode as a QR code.\n\nJSON-RPC call to POST /mcp with method `tools/call` and `params.name = \"social_profile_url\"`. Limit: 60 calls/minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"social_profile_url"},"arguments":{"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"platform":{"type":"string","enum":["instagram","facebook","tiktok","x","linkedin","youtube","snapchat","pinterest","threads","telegram"],"description":"Platform id, e.g. 'instagram', 'tiktok', 'linkedin'."},"handle":{"type":"string","minLength":1,"description":"Username or a full profile link; @ and URLs are cleaned up."}},"required":["platform","handle"]}}}}}}}},"responses":{"200":{"description":"JSON-RPC result with MCP content blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}},"text/event-stream":{"schema":{"type":"string"}}}}}}},"/mcp#render_qr_image":{"post":{"tags":["MCP tools"],"operationId":"tool_render_qr_image","summary":"Render QR code image","description":"Render a QR code as a PNG (base64 image) or a real vector SVG. Pass either `payload` (ready-made text) or `type` + `fields` (built and validated like build_qr_payload). Also returns a direct download URL.\n\nJSON-RPC call to POST /mcp with method `tools/call` and `params.name = \"render_qr_image\"`. Limit: 20 calls/minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"render_qr_image"},"arguments":{"additionalProperties":false,"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payload":{"description":"Ready-made QR content. Alternative to type + fields.","type":"string","maxLength":2000},"type":{"description":"QR type when the payload should be built.","type":"string","enum":["url","whatsapp","social","text","wifi","vcard","email","phone","sms","sepa","event","geo"]},"fields":{"description":"Field values for the given type, e.g. { url: 'https://example.com' }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"format":{"default":"png","description":"Output format.","type":"string","enum":["png","svg"]},"size":{"default":512,"description":"Edge length in pixels (PNG) or nominal size (SVG).","type":"integer","minimum":64,"maximum":2048},"margin":{"default":2,"description":"Quiet zone in modules.","type":"integer","minimum":0,"maximum":16},"dark":{"description":"Foreground color, e.g. #0b1220.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"light":{"description":"Background color, e.g. #ffffff.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"ecc":{"default":"M","description":"Error correction level.","type":"string","enum":["L","M","Q","H"]}}}}}}}}}},"responses":{"200":{"description":"JSON-RPC result with MCP content blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}},"text/event-stream":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"ToolResult":{"type":"object","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image"]},"text":{"type":"string"},"data":{"type":"string","contentEncoding":"base64"},"mimeType":{"type":"string"}}}},"structuredContent":{"type":"object"},"isError":{"type":"boolean"}}}}},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"server":{"type":"object"},"endpoints":{"type":"object"},"tools":{"type":"array","items":{"type":"object"}},"limits":{"type":"object"},"timestamp":{"type":"string","format":"date-time"}}}}}}