Heads-up
The hosted endpoint is the fastest path — no install, just a URL. The npx package is better when you want a local stdio server or to pin a version. Either way, set a swiftimg API key so uploads attribute to your account instead of the anonymous daily cap.
Step by step
1. Option A — connect by URL (zero install)
swiftimg exposes its tools over Streamable HTTP, so any MCP client that accepts a server URL can connect with no install. Point it at the hosted endpoint.
MCP endpoint (Streamable HTTP) https://swiftimg.com/mcp2. Option B — run it locally via npx
For a local stdio server, add @swiftimg/mcp-server to your client config. It launches on demand with npx — no global install. The SWIFTIMG_API_KEY is optional but recommended.
claude_desktop_config.json / .cursor/mcp.json { "mcpServers": { "swiftimg": { "command": "npx", "args": ["-y", "@swiftimg/mcp-server"], "env": { "SWIFTIMG_API_KEY": "your-key-here" } } } }3. Use it in a conversation
Once connected, the agent has tools to upload_image (a local file or a remote URL to re-host), search_gifs, trending_gifs, and get_image_info. Ask it to host a screenshot and it returns the direct URL, the viewer page, and the id.
4. Attribute uploads to your account
Without a key, uploads count against the anonymous free-tier daily cap. Add an API key (from your account page) so uploads use your plan's caps and show up in your library.
AI agents (MCP) — FAQ
What is MCP?
The Model Context Protocol is an open standard for connecting AI assistants to external tools and data. An MCP server exposes tools (like 'upload an image') that the model can call during a conversation.
Which clients work?
Any MCP-aware client — Claude Desktop, Cursor, Continue.dev, and others. The hosted URL works with clients that accept a Streamable HTTP server; the npx package works with stdio clients.
Do the hosted endpoint and the npx package differ?
They expose the same tools. The hosted endpoint needs no install (connect by URL); the npx package runs locally over stdio and lets you pin a version or point at a white-label API base.
Will the uploaded URLs expire?
No — images an agent uploads stay live indefinitely, so a URL pasted into a doc or README keeps working.
Ready to host your AI agents (MCP) images?
Start free, then unlock the full API, transforms, signed URLs, and a custom domain on the Developer plan.