Desktop Pricing Docs Blog About GitHub Get started
← Back to blog

MCP image hosting

Your agent can generate a chart, take a screenshot, or fetch an image — and then it's stuck holding bytes with nowhere to put them. PixelVault runs a remote MCP server, so any Model Context Protocol client can host an image as a native tool call and get a permanent CDN URL back. No custom glue code per project.

The Model Context Protocol gives agents a standard way to call tools. But most useful actions still need you to build the tool — wire an endpoint, handle auth, wrap it in a schema. Image hosting is a perfect example: an agent produces an image constantly (a generated asset, a rendered chart, a failing-test screenshot) and just as constantly has nowhere durable to put it.

PixelVault closes that gap by running the tool for you. It's a remote MCP server on Cloudflare's edge — nothing to install, nothing to host — that exposes image hosting as four tools any MCP-capable agent can call.

Connect it in one command

For Claude Code, add the server with its hosted URL and your API key as a Bearer token:

# Add PixelVault's MCP server to Claude Code:
claude mcp add --transport http pixelvault \
  https://mcp.pixelvault.dev/mcp \
  --header "Authorization: Bearer pv_live_xxx"

# That's it. The upload_image, list_images, get_image, and
# delete_image tools are now available to the agent.

The endpoint is https://mcp.pixelvault.dev/mcp over the streamable-http transport, so the same config works in Cursor or any client that speaks it. Get an API key by registering with a single API call — no browser signup required.

The four tools

Once connected, the agent sees these tools and can call them on its own:

  • upload_image — upload from a public source_url or raw base64 data, and get an instant CDN URL.
  • list_images — list your images, paginated.
  • get_image — fetch metadata and the CDN URL for one image.
  • delete_image — delete one image.

What an upload looks like

You don't write any of this by hand — the agent picks the tool and fills the arguments. When you say "host this screenshot" or a step in a chain produces an image, it calls upload_image and gets a durable URL it can paste into a PR, a doc, or the next tool's input:

// The agent invokes the upload_image tool — from a public URL...
{ "tool": "upload_image",
  "arguments": { "source_url": "https://oaidalleapi.../gen.png" } }

// ...or from raw base64 it already has in context:
{ "tool": "upload_image",
  "arguments": { "data": "iVBORw0KGgoAAAANS...", "filename": "chart.png" } }

// → a permanent CDN URL comes back:
{ "url": "https://img.pixelvault.dev/proj_abc/img_xyz.png",
  "id": "img_xyz", "mime_type": "image/png", "size": 20481 }

Because upload_image accepts a source_url, an agent can re-host a temporary link — like a DALL·E or GPT Image URL that expires in an hour — without downloading the bytes itself. Hand it the URL, get a permanent one back.

Why MCP instead of a raw API call

You could always POST to the REST API directly, and for scripts that's often the right move. The MCP server earns its place when an agent is the one deciding to host an image:

  • No per-project glue. The tool schema is discovered at connect time — you don't hand-write an upload function and describe it to the model in every repo.
  • Portable across clients. The same server works in Claude, Cursor, and anything else that speaks MCP. Switch clients, keep the tool.
  • Autonomous by design. Paired with PixelVault's llms.txt and OpenAPI spec, an agent can discover the service, register, and start hosting images with no human wiring anything up.

No MCP client? Plain HTTP still works

MCP is the ergonomic path for agents, not a requirement. Every tool maps to a plain endpoint — upload_image is a POST /v1/images (a multipart file upload, so you fetch or decode the bytes yourself), and the rest follow. If you're scripting outside an agent, the HTTP API is right there.

Free to start

The free tier includes 200 MB storage, 500 uploads/month, and 1 GB bandwidth — no credit card, no trial expiry. Connect the MCP server, register for a key, and your agent can host images in the next turn — the first few uploads work straight away, and a one-time email verification lifts the cap for the rest of the free tier. Paid plans start at $9/month.

Read the MCP docs →