metalevel/snapix-mcp-server

metalevel/snapix-mcp-server

MCP server for image optimization, conversion, AI generation, and gallery management via SnapiX API.

Category
访问服务器

README

@metalevel/snapix-mcp-server

MCP server for SnapiX - image optimization, conversion, AI generation, and gallery management via the Model Context Protocol. Get a free API key and start using it with your AI clients today, no credits required!

Built on @metalevel/snapix-sdk-core - the official typed TypeScript SDK for the SnapiX REST API.

Quick Start - Local (stdio)

Add to your AI client configuration:

VS Code (Copilot)

Add to .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": {
      "command": "npx",
      "args": ["-y", "@metalevel/snapix-mcp-server"],
      "env": {
        "SNAPIX_API_KEY": "${input:SNAPIX_API_KEY}",
        "SNAPIX_BUCKET_KEY": "${input:SNAPIX_BUCKET_KEY}" // optional
      }
    }
  }
}

Claude Desktop

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"
      }
    }
  }
}

Quick Start - Remote (HTTP)

For clients that support Streamable HTTP transport, point to the hosted endpoint:

https://www.snapix.space/api/mcp

Pass your API key via the Authorization header:

Authorization: Bearer <your-api-key>

The remote endpoint is stateless - no session persistence between requests. It does not support imageFilePath; use imageBase64 for local images (with caution for large files) or imageUrl for publicly accessible URLs. See the full MCP docs for VS Code and Claude Desktop config examples.

Environment Variables

Variable Required Default Description
SNAPIX_API_KEY Yes - Your SnapiX API key
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

Available Tools

Each tool carries MCP tool annotations that well-behaved clients (VS Code Copilot, Claude Desktop, etc.) use to show appropriate confirmation prompts. Because SnapiX retains no history and no soft-delete, every update or delete is irreversible — destructiveHint is set to true on all mutating tools accordingly.

Tool Description Credits Read-only Destructive Idempotent Open-world
snapix_get_docs Fetch SDK, API, MCP, or About documentation Free n/a
snapix_convert_image Guidance tool - explains how to convert images using the upload tool Free n/a
snapix_upload_image Upload an image from URL or local file, optionally convert format and resize 1+
snapix_generate_image Generate an image from a text prompt, optionally guided by a template image (Gemini AI)* 40+
snapix_list_images List images with pagination and filtering Free n/a
snapix_get_image Get full details for a single image Free n/a
snapix_update_image Update image metadata, gallery assignments, or replace/re-convert the image Free†
snapix_delete_image Permanently delete an image Free
snapix_create_gallery Create a new gallery, optionally with existing images Free
snapix_list_galleries List all galleries Free n/a
snapix_get_gallery Get gallery details with all images Free n/a
snapix_get_ungrouped_images Get all images not assigned to any gallery Free n/a
snapix_update_gallery Update gallery name or visibility Free
snapix_delete_gallery Delete a gallery, optionally with all its images Free
  • snapix_generate_image requires a paid subscription. 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. Costs 1+ App credits when formatOptions, resizeOptions, or a replacement image source is provided.

Resources

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

Prompts

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

Rate Limiting

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.

Credits & Quotas

  • Free operations: listing, getting, updating metadata, and deleting images/galleries
  • Credit-consuming operations: uploading images (1+ credits), generating images (40+ credits)
  • Credit costs follow the same rules as the REST API
  • When credits are exhausted, the server returns a clear error message

Programmatic Usage

createSnapixMcpServer creates and returns a configured McpServer instance:

import { createSnapixMcpServer } from "@metalevel/snapix-mcp-server";

const server = createSnapixMcpServer({
  apiKey: process.env.SNAPIX_API_KEY!,
  baseUrl: "https://www.snapix.space",        // optional
  bucketKey: process.env.SNAPIX_BUCKET_KEY,   // optional
  logLevel: "warn",                           // optional: debug | info | warn | error | silent
  transport: "stdio",                         // optional: "stdio" (default) | "http"
});

handleStatelessRequest powers the hosted /api/mcp HTTP endpoint - it is designed for internal server-side usage and is not intended as a general-purpose public API:

import { handleStatelessRequest } from "@metalevel/snapix-mcp-server";

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,
  });
}

Documentation

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选