MCP server

Streamable HTTP, stateless JSON-RPC at POST https://api.spritefetch.dev/mcp (protocol 2025-06-18, also 2025-03-26 and 2024-11-05). No key needed; send Authorization: Bearer <API_KEY> in the config headers for higher limits. A stdio proxy ships in scripts/mcp-stdio.mjs.

{ "mcpServers": { "spritefetch": { "url": "https://api.spritefetch.dev/mcp" } } }

Tools

All three tools are read-only and idempotent. Each returns structuredContent plus a text copy.

ToolArgumentsReturns
searchquery, type, category, style, perspective, frame_width, frame_height, animated, animation, license_spdx, commercial_use, source, pack, mode, limit, cursorSame shape as GET /v1/search
get_assetid, version (optional = latest), metadata_revisionThe full asset record
downloadid, version, format ("png"), inline (bool)file_url, sha256, slicing, license fields, a verify command; with inline: true and files ≤ 1 MiB, base64 bytes checked against sha256 (inline_verified)

Errors

Tool failures come back as isError: true with structuredContent.error using the same codes as REST (Errors). Protocol errors: -32700 parse error, -32601 unknown method, -32602 unknown tool or bad arguments.

Try it with curl

curl -s https://api.spritefetch.dev/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search","arguments":{"query":"pixel-art bomb"}}}'