{
  "markdown": "# mcp-image-viewer\n\nClaude Code plugin that automatically displays images returned by MCP tools.\n\n## Problem\n\nWhen MCP tools return images (login QR codes, charts, screenshots, etc.), Claude Code CLI shows an `[Image]` placeholder instead of the actual image. This makes workflows like MCP-based login impossible without workarounds.\n\n## Solution\n\nA zero-config PostToolUse hook that:\n1. Intercepts all MCP tool responses\n2. Detects base64-encoded images (PNG/JPEG) in the response\n3. Saves to a temp file and opens with the system image viewer\n\nWorks with **any** MCP server — no configuration needed.\n\n## Install\n\n### From marketplace\n\n```shell\n/plugin install mcp-image-viewer@claude-plugins-official\n```\n\n### Local testing\n\n```bash\nclaude --plugin-dir /path/to/mcp-image-viewer\n```\n\n## Supported Image Sources\n\n| Source | Format | Example |\n|--------|--------|---------|\n| MCP content array | `{\"type\":\"image\",\"source\":{\"data\":\"...\"}}` | Login QR codes |\n| JSON fields | `qrcode_base64`, `image_base64`, etc. | API responses with embedded images |\n| Data URLs | `data:image/png;base64,...` | Inline image data |\n| Raw base64 in text | Long base64 string with PNG/JPEG header | Fallback detection |\n\n## How It Works\n\n```\nMCP tool executes (e.g., get_login_qrcode)\n    ↓\nPostToolUse hook fires (matcher: mcp__*)\n    ↓\nHook scans tool_response for base64 image data\n    ↓\nImage found → save to /tmp → open with system viewer\n    ↓\nNo image → exit silently (no performance impact)\n```\n\n## Platform Support\n\n| OS | Viewer | Command |\n|----|--------|---------|\n| macOS | Preview | `open` |\n| Linux | Default viewer | `xdg-open` |\n\n## Use Cases\n\n- **MCP login QR codes** — Xiaohongshu, WeChat, Slack, etc.\n- **MCP-generated charts** — Data visualization tools\n- **MCP screenshots** — Browser automation, monitoring tools\n- **Any MCP image** — Automatically detected and displayed\n\n## Requirements\n\n- Claude Code 1.0.33+\n- Python 3.10+ (no extra packages)\n\n## Testing\n\n```bash\n# Test with sample data\necho '{\"tool_name\":\"mcp__test__qr\",\"tool_input\":{},\"tool_response\":[{\"type\":\"image\",\"source\":{\"data\":\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"}}]}' | python3 hooks/display_qr.py\n# Should open a 1x1 pixel PNG in your system viewer\n```\n\n## License\n\nMIT\n",
  "bytes": 2305,
  "sha": "d745a91fb6f523088d423528375e0affe4d8f2067c137dccaaec2b997779fee1",
  "repo_slug": "androidzzt/mcp-image-viewer",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_androidzzt_mcp_image_viewer_mcp_image_vi_b6dfcb29/readme"
}