Image Relay
FreeNot checkedFetches images from allowed hosts (e.g., Hugging Face Spaces) and returns them as inline content to Claude, bypassing the sandbox's network restrictions.
About
Fetches images from allowed hosts (e.g., Hugging Face Spaces) and returns them as inline content to Claude, bypassing the sandbox's network restrictions.
README
A tiny MCP server with one job: fetch an image from an allowed host (Hugging Face Space outputs) server-side, and hand it back as inline image content — so Claude gets the bytes directly through the MCP connector, without going through its code-execution sandbox's domain-restricted network.
Tested locally with @modelcontextprotocol/sdk v1.29 and Node 18+.
Why this works
Claude's code-execution sandbox (the one used to build files) only has
outbound access to a small package-manager allowlist. Custom MCP
connectors are a separate path — they run on your own server, so they
have normal internet access. This tool exploits that: it does the
fetching on your infrastructure, then returns the result as an MCP
image content block, which Claude can read directly from the tool
result.
Files
server.js— the whole thing. One tool:fetch_image({ url }).test-client.mjs— local smoke test, talks tolocalhost:3000/mcp.package.json— two dependencies:@modelcontextprotocol/sdk,express.
Security notes (read before deploying)
- Host allowlist:
ALLOWED_HOST_SUFFIXESinserver.jsrestricts which domains this will fetch from. It ships set to.hf.spaceandhuggingface.co. Don't widen this to arbitrary URLs — an open fetch-any-URL relay is an SSRF vector. - Optional auth: set the
RELAY_AUTH_TOKENenv var on your host to require aAuthorization: Bearer <token>header. Recommended once this is public, since anyone with the URL could otherwise call it. - Size cap: hard-capped at 15MB per image (
MAX_BYTES) so nothing huge gets base64-encoded into a response. - Stateless by design (
sessionIdGenerator: undefined) — no server-side session state to leak or clean up.
Run locally
npm install
npm start
# listening on :3000, POST /mcp
node test-client.mjs # optional smoke test
Deploy (pick one — all have a free tier)
Any plain Node 18+ host works, since this only needs express + fetch.
Render (easiest, free web service):
- Push this folder to a GitHub repo.
- render.com → New → Web Service → connect the repo.
- Build command:
npm install. Start command:npm start. - Once live, your MCP endpoint is
https://<your-app>.onrender.com/mcp.
Railway / Fly.io: same idea — Node buildpack, expose $PORT, start
command npm start.
Your own VPS: npm install --production && RELAY_AUTH_TOKEN=xxx npm start
behind a reverse proxy (Caddy/nginx) for TLS.
Connect it to Claude
- claude.ai → Settings → Connectors → Add custom connector
- URL:
https://<your-deployed-host>/mcp - If you set
RELAY_AUTH_TOKEN, add it as a header/auth value when the connector setup prompts for one. - In a chat: "use my image-relay connector to fetch <hf.space url>" — or just paste the url once it's a named tool Claude can see.
Note: custom connectors require a paid Claude plan (Pro or above).
Installing Image Relay
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/tyleraldoushdgaming-sys/image-relay-mcpFAQ
Is Image Relay MCP free?
Yes, Image Relay MCP is free — one-click install via Unyly at no cost.
Does Image Relay need an API key?
No, Image Relay runs without API keys or environment variables.
Is Image Relay hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Image Relay in Claude Desktop, Claude Code or Cursor?
Open Image Relay on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
ARA
Generate images, video and audio from any AI agent — one connector.
by ARAOmni Video
An MCP server that transforms LLM-enabled IDEs into professional video editors by pre-processing footage into text proxies, generating motion graphics via HTML/
by buildwithtazaYouTube
Transcripts, channel stats, search
by YouTubeEverArt
AI image generation using various models.
by modelcontextprotocolgpu-bridge/mcp-server
GPU inference API for LLMs, image and video generation, TTS, Whisper, embeddings, reranking and OCR, paid per use via x402 or an API key.
by gpu-bridgemerterbak/Grok-MCP
Access xAI's Grok API with agentic tool calling, image generation, vision and file support.
by merterbakSureScaleAI/openai-gpt-image-mcp
Image generation and editing with OpenAI's GPT image models.
by SureScaleAIYangLiangwei/PersonalizationMCP
Aggregate personal data from Steam, YouTube, Bilibili, Spotify, Reddit and other gaming, music, video and social platforms, with OAuth2 and token management.
by YangLiangweiAceDataCloud/MCPFlux
Flux image generation and editing from Black Forest Labs via the Ace Data Cloud API.
by AceDataCloudAceDataCloud/MCPNanoBanana
Nano Banana image generation and editing, including virtual try-on and product placement in realistic scenes.
by AceDataCloudCompare Image Relay with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All media MCPs
