MCP server for uploading local images to Sanity CMS
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server for uploading local images to Sanity CMS.
Lets AI assistants upload files from your filesystem directly into Sanity as image assets.
Either set the SANITY_TOKEN env var, or just log in with the Sanity CLI:
The server reads the token from the Sanity CLI config automatically (~/.config/sanity/config.json on all platforms).
That's it. Restart Claude Code and the tools are available. Every session runs the latest version automatically.
Also works with
bunx mcp-sanity-images@latestif you have Bun.
Download a pre-built binary from Releases:
| Platform | File |
|---|---|
| macOS (Apple Silicon) | mcp-sanity-images-darwin-arm64 |
| macOS (Intel) | mcp-sanity-images-darwin-x64 |
| Linux | mcp-sanity-images-linux-x64 |
| Windows | mcp-sanity-images-windows-x64.exe |
macOS / Linux:
Windows (PowerShell):
Add to your claude_desktop_config.json:
| Tool | Description |
|---|---|
upload_image | Upload a single local image to Sanity as an asset |
upload_and_set | Upload an image and patch it onto a document field |
batch_upload | Upload all images from a folder as assets |
list_images | List image files in a directory |
groq_query | Run a GROQ query (find documents before attaching) |
Supported formats: PNG, JPG/JPEG, WebP, GIF, SVG.
| Env var | Required | Default | Description |
|---|---|---|---|
SANITY_PROJECT_ID | Yes | β | Your Sanity project ID |
SANITY_DATASET | No | production | Dataset name |
SANITY_TOKEN | No* | β | API token (*falls back to CLI auth) |
All tools also accept projectId and dataset as parameters, overriding the env vars per-call.
Upload a single file and get back the asset reference.
Returns { assetId, url, alt, reference } β the reference is ready to patch onto any Sanity image field.
Upload + patch in one call.
Upload all images from a directory.
List image files without uploading β useful for the AI to see what's available.
Run any GROQ query. Useful to find document IDs before using upload_and_set.
Using npx @latest (recommended): You always get the latest version β no manual updates needed.
Using a binary: The server checks for new releases on startup and logs to stderr if outdated:
Check your installed version:
To update, download the new binary and replace the old one.
Requires Bun.
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-sanity-images)<a href="https://allmcps.com/mcp/mcp-sanity-images"><img src="https://allmcps.com/api/badge/mcp-sanity-images?style=directory" alt="MCP Sanity Images on AllMCPs" /></a>