SnapiX supports the Model Context Protocol (MCP) - an open standard that lets AI assistants like Claude, VS Code Copilot, and other LLM tools interact with external services through a structured API.
Our MCP server enables AI agents to upload, convert, generate, and manage images and galleries programmatically - all through natural language.
The SnapiX MCP server wraps the REST API and exposes it as MCP tools and resources. It is built on the SnapiX SDK - the official typed TypeScript client for the REST API. It can be used in two ways:
https://www.snapix.space/api/mcpBoth methods require a SnapiX API key. Get yours from the API Keys page. It requires free registration, but you can get a key without entering any payment details.
We recommend using the local (stdio) transport for the best experience. Here's why:
imageFilePath parameter on the snapix_upload_image and snapix_generate_image tools. The MCP server runs on your machine, reads the file directly from disk, and sends the binary to the SnapiX API - no encoding overhead, no size limitations from the protocol.imageBase64 for local images, which requires the AI client to pass the entire image as a base64 string through the JSON-RPC protocol. For large images (multi-megabyte), this can cause performance issues or crash some MCP clients (e.g. VS Code).imageUrl requires public access: Both transports support imageUrl, but the SnapiX API server fetches the image from the provided URL. This means localhost or local network URLs won't work - only publicly accessible URLs are supported.| Scenario | stdio | HTTP |
|---|---|---|
| Upload a local file from disk | imageFilePath ✅ |
Not available |
| Upload from a public URL | imageUrl ✅ |
imageUrl ✅ |
| Upload local image without a URL | imageFilePath ✅ |
imageBase64 ⚠️ (risk of crashes with large images) |
| No local process required | ❌ | ✅ |
Add to your AI client configuration:
Add to your .vscode/mcp.json:
{
"inputs": [
{
"id": "SNAPIX_API_KEY",
"type": "promptString",
"description": "SnapiX API key",
"password": true
},
{
"id": "SNAPIX_BUCKET_KEY",
"type": "promptString",
"description": "Custom bucket key, if you've setup one (optional)",
"password": false
}
],
"servers": {
"metalevel/snapix-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@metalevel/snapix-mcp-server"],
"env": {
"SNAPIX_API_KEY": "${input:SNAPIX_API_KEY}",
"SNAPIX_BUCKET_KEY": "${input:SNAPIX_BUCKET_KEY}" // optional
}
}
}
}
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"metalevel/snapix-mcp": {
"command": "npx",
"args": ["-y", "@metalevel/snapix-mcp-server"],
"env": {
"SNAPIX_API_KEY": "your-api-key-here",
"SNAPIX_BUCKET_KEY": "your-optional-custom-bucket-key"
}
}
}
}
For clients that support Streamable HTTP transport, point to our hosted endpoint:
https://www.snapix.space/api/mcp
Pass your API key via the Authorization header:
Authorization: Bearer <your-api-key>
The remote endpoint operates in stateless mode - no session persistence between requests.
Add to your .vscode/mcp.json:
{
"inputs": [
{
"id": "SNAPIX_API_KEY",
"type": "promptString",
"description": "SnapiX API key",
"password": true
},
{
"id": "SNAPIX_BUCKET_KEY",
"type": "promptString",
"description": "Custom bucket key, if you've setup one (optional)",
"password": false
}
],
"servers": {
"metalevel/snapix-mcp": {
"type": "http",
"url": "https://www.snapix.space/api/mcp",
"headers": {
"Authorization": "Bearer ${input:SNAPIX_API_KEY}",
"X-Snapix-Bucket-Key": "${input:SNAPIX_BUCKET_KEY}" // optional
}
}
}
}
| Variable | Required | Default | Description |
|---|---|---|---|
SNAPIX_API_KEY |
Yes | - | Your SnapiX API key from the API Keys page |
SNAPIX_BUCKET_KEY |
No | primary bucket | Default storage bucket for uploads, generates, and gallery creation |
SNAPIX_LOG_LEVEL |
No | warn |
SDK log verbosity: debug | info | warn | error | silent |
| Tool | Description | Credits | Key Permission |
|---|---|---|---|
snapix_get_docs |
Fetch SDK, API, MCP, or About documentation | Free | None (public) |
snapix_convert_image |
Guidance tool - explains how to convert images using the upload tool | Free | None |
snapix_upload_image |
Upload an image from URL or local file, optionally convert format and resize | 1+ | images-create |
snapix_generate_image |
Generate an image from a text prompt, optionally guided by a template image (Gemini AI)* | 40+ | images-generate |
snapix_list_images |
List images with pagination and filtering | Free | images-read |
snapix_get_image |
Get full details for a single image | Free | images-read |
snapix_update_image |
Update image metadata, gallery assignments, or replace/re-convert the image | Free† | images-update |
snapix_delete_image |
Permanently delete an image | Free | images-delete |
snapix_create_gallery |
Create a new gallery, optionally with existing images | Free | galleries-create |
snapix_list_galleries |
List all galleries | Free | galleries-read |
snapix_get_gallery |
Get gallery details with all images | Free | galleries-read |
snapix_get_ungrouped_images |
Get all images not assigned to any gallery | Free | galleries-read |
snapix_update_gallery |
Update gallery name or visibility | Free | galleries-update |
snapix_delete_gallery |
Delete a gallery, optionally with all its images | Free | galleries-delete / galleries-delete-with-images |
snapix_generate_image requires a paid subscription. It accepts a text prompt plus an optional template image (URL, local file path, or base64) and generates an image using Gemini AI.snapix_update_image is free for metadata-only updates (name, description, galleries). Costs 1+ App credits when formatOptions, resizeOptions, or a replacement image source is provided.Permissions are enforced by the SnapiX API based on your API key configuration - not at the tool level. See API Key Permissions for the full list of available permissions.
MCP Resources provide passive context that AI clients can pre-load without making explicit tool calls.
| URI | Description |
|---|---|
snapix://galleries |
All galleries (name, id, visibility, image count) |
snapix://galleries/{galleryId} |
Gallery details with all images and CDN URLs |
snapix://images/ungrouped |
All images not assigned to any gallery |
snapix://images |
Recent images (first page) with metadata and CDN URLs |
snapix://images/{imageId} |
Full image metadata, variants, dimensions, and CDN URLs |
MCP Prompts are interactive workflow templates that AI clients can invoke on demand. Clients that support the MCP prompts capability (VS Code Copilot, Claude, and others) expose them as slash commands or selectable actions in the chat interface.
| Prompt | Description |
|---|---|
snapix_setup_sdk_core |
Guided setup of @metalevel/snapix-sdk-core: reads live docs, installs the package with the detected package manager, and appends SNAPIX_* environment variables to the correct .env file |
In VS Code, type / in the Copilot chat panel and select snapix_setup_sdk_core to run the workflow in any project.
The MCP server respects the same rate limits as the REST API. When a rate limit is hit (HTTP 429), the server returns an MCP error with a retryable flag, signaling to the AI client that it should wait and retry the request.
createSnapixMcpServer creates and returns a configured McpServer instance. Use it to embed the MCP server in your own transport layer:
import { createSnapixMcpServer } from "@metalevel/snapix-mcp-server";
const server = createSnapixMcpServer({
apiKey: process.env.SNAPIX_API_KEY!,
baseUrl: "https://www.snapix.space", // optional, defaults to https://www.snapix.space
bucketKey: process.env.SNAPIX_BUCKET_KEY, // optional
logLevel: "warn", // optional: debug | info | warn | error | silent
transport: "stdio", // optional: "stdio" (default) | "http"
});
handleStatelessRequest is used internally by SnapiX to power the hosted /api/mcp HTTP endpoint. It creates a fresh server instance per request and is not intended as a general-purpose public API:
import { handleStatelessRequest } from "@metalevel/snapix-mcp-server";
// Internal usage - powers https://www.snapix.space/api/mcp
export async function POST(request: Request): Promise<Response> {
return handleStatelessRequest(request, {
apiKey: request.headers.get("Authorization")?.replace("Bearer ", "") ?? "",
bucketKey: request.headers.get("X-Snapix-Bucket-Key") ?? undefined,
});
}