[FEATURE] Expose image path/data to MCP tools when backend model doesn't support images

Resolved 💬 3 comments Opened May 27, 2026 by yghjnj Closed May 31, 2026

Problem

When using Claude Code with a text-only backend model (e.g., DeepSeek), images uploaded via the VS Code extension's + button or pasted directly into chat are discarded and replaced with [Unsupported Image]. The image data never reaches:

  • Windows clipboard (so MCP clipboard readers can't access it)
  • Disk/temp files (no file is saved anywhere)
  • Windows Recent Items
  • Claude Code hooks (UserPromptSubmit hooks don't fire in VS Code context)

This means MCP tools (like vision/image recognition tools) cannot access the uploaded image in any way.

Current Workaround

A file picker dialog is popped up via MCP tool, forcing the user to re-select the same file they already uploaded. This works but requires a redundant step.

Proposed Solution

When Claude Code receives an image attachment and the backend model cannot process images, Claude Code should expose the image path (or data) to MCP tools before discarding it. Possible implementations:

  1. Environment variable: Set CLAUDE_ATTACHMENT_PATH or similar env var with the original file path
  2. Temp file: Save a copy to a known location (e.g., %TEMP%/claude/attachments/) before replacing with [Unsupported Image]
  3. MCP notification: Send a notification to registered MCP servers when an image attachment is processed
  4. System message: Include the original file path in the system message to the model

Use Case

Users with vision MCP tools (using DashScope/Qwen-VL, etc.) need to process uploaded images. Currently the only reliable method is Win+Shift+S screenshot (which goes to Windows clipboard), but direct upload via + button is the natural UX that users expect to work.

Environment

  • Claude Code VS Code extension
  • Backend model: DeepSeek (text-only)
  • OS: Windows 11

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗