Fixes Claude Code image reading with non-Anthropic model servers (llama-server, vLLM, Ollama, etc.).
Claude Code's Read tool sends images inside tool_result content blocks. Non-Anthropic providers silently drop images from tool results — your model never sees screenshots, diagrams, or any image the agent reads from disk.
Clipboard paste works because it puts images in user message content. This proxy applies the same fix to tool results automatically.
npx anthropic-image-proxy --target http://localhost:8080Requires Node.js 18+.
# Start the proxy (in one terminal)
npx anthropic-image-proxy --target http://localhost:8080
# Point Claude Code at the proxy (in another terminal)
ANTHROPIC_BASE_URL=http://localhost:3456 claudeThat's it. Images from the Read tool, Bash tool, and notebooks now work.
| Flag | Default | Description |
|---|---|---|
--target <url> |
(required) | Your model server URL |
--port <number> |
3456 |
Port the proxy listens on |
--verbose |
false |
Log when images are promoted |
The proxy intercepts POST /v1/messages requests and moves image content blocks from inside tool_result blocks to user message level, where providers handle them correctly.
Before (model server drops the image):
tool_result.content → [{ type: "image", ... }]
After (model server sees the image):
message.content → [tool_result, { type: "image", ... }]
Everything else passes through untouched. Responses are never modified.
- llama-server (llama.cpp) with Anthropic-compatible endpoint
- Claude Code with
--api-url/ANTHROPIC_BASE_URL
See docs/integration.md for integration guides.
MIT