PX-Art

GUIDE

What is an MCP server for game assets?

MCP is a protocol that lets an AI client call tools and read resources hosted somewhere else. A game-asset MCP server applies that to art: instead of describing your sprites in chat, the client queries them. PX-Art runs one named perfectpixel-scene — read-only, JSON-RPC over HTTP, twelve tools, and scene and asset URIs the client can read directly.

The protocol in one paragraph

The Model Context Protocol standardises how an AI client talks to an external capability provider. The client performs a handshake, discovers what the server offers, then either calls a tool (a named function with typed arguments, invoked with tools/call) or reads a resource (an addressable document identified by a URI, fetched with resources/read). Servers may also publish resource templates — URI shapes with placeholders — so a client can construct addresses it was never explicitly handed. Everything travels as JSON-RPC.

The practical consequence: capability is discovered at runtime, not compiled in. A client that has never heard of pixel art can still ask a game-asset server what it can do and get a machine-readable answer.

What makes an asset server different from a documentation server

Most early MCP servers return text. Art does not fit that shape, and a server that pretends otherwise is useless to a game build. Four differences matter:

  • Binary payloads do not belong in a model's context. Full-resolution PNGs must be delivered out-of-band, by link, not pasted into a conversation. Only small preview images are worth returning inline.
  • Identity and versioning are load-bearing. "The player idle sprite" is not a stable reference. An asset needs an ID, and a scene needs a revision number so the same query twice returns the same bytes.
  • Frames are not always animation. A four-frame strip may be an animation, a set of button states, or a glyph row. Playing the wrong one at 8 fps is a visible bug.
  • Coordinates need a declared convention. Origin corner, axis directions, unit, transform model and draw ordering must be stated by the server, because an agent guessing at them produces a scene that is subtly wrong everywhere.

The PX-Art server: identity and shape

Server nameperfectpixel-scene
TransportStreamable HTTP (not stdio)
EndpointPOST https://px-art.com/api/mcp
AuthAuthorization: Bearer pxr_...
Protocol version2025-11-25, with 2025-06-18 also accepted; capabilities are identical
Write accessNone — no generate, write or delete tool exists

The twelve tools

All read-only, all free to call. Tool names are exact:

ToolArgumentsReturns
list_gamesYour games: notebook ID, name, design language, existing asset-kind counts
list_game_structurenotebookIdModule/page and tag ID-to-name mapping
list_charactersnotebookId, pageId?Logical characters, descriptions, tags and related assets
list_asset_familiesnotebookIdFamilies: family ID, count, role distribution, generation description, family style
search_assetsnotebookId, query?, kind?, familyId?, role?, limit?Assets plus a truncated flag; each asset carries a readable asset:// URI
preview_assetsassetIds[], up to 8One description line and one 220px-longest-side thumbnail per asset
get_asset_downloadsassetIds[], up to 50Short-lived download URLs for the original files
get_scene_bundlesceneIdA writable scene package: scene JSON, Tiled map, dependent asset paths, sizes, hashes, links
get_scene_metadatasceneIdType, revision, layers, node count, bounding box
get_nodessceneId, nodeIds[]Nodes in the requested order; missing IDs are skipped
get_scene_regionsceneId, x, y, width, height, limit?Rect, nodes in draw order, total, truncated flag, tiles when present
analyze_layoutsceneIdNode count, visible count, bounds, layers, overlapping pairs

analyze_layout is deliberately factual: overlap pairs, bounding boxes and counts, with no aesthetic judgement. Whether an overlap is a bug or an intentional composition is the agent's call, not the server's.

The resource URIs

URIContents
scene://{sceneId}/bundleFull package: file list, dependent assets, short-lived links, content hashes
scene://{sceneId}/compositionThe main course: nodes, tile layers, asset catalogue, coordinate convention, revision
scene://{sceneId}/metadataOverview: type, revision, layers, node count, bounds
scene://{sceneId}/tiledTiled map JSON — square and isometric scenes only
asset://{id}Asset identity and dimensions
asset://{id}/imageThumbnail PNG, 220px longest side

The composition is where the two halves join: every asset entry inside it carries a resourceRef.uri such as asset://12@1784099933, and that URI can be passed straight to resources/read. Assets are not enumerated in resources/list — there are too many — so you either search for them or follow the URIs the composition already gives you.

Connecting to one, step by step

  1. Get a tokenIssued per user from the MCP panel in the app. The plaintext is shown once. Any subscription payment or top-up purchase unlocks read-only MCP permanently.
  2. Add the server to your clientAnything speaking Streamable HTTP works. For Claude Code: claude mcp add --transport http px-art https://px-art.com/api/mcp --header "Authorization: Bearer pxr_YOUR_TOKEN"
  3. Verify the handshakeA single tools/list POST tells you whether auth, transport and protocol version all agree. If you send an MCP-Protocol-Version header it must match the negotiated version, or you get a 400; omitting the header is fine.
  4. Discover the URI shapesresources/templates/list returns the scene and asset templates; resources/list pages through your actual scenes with an opaque cursor — echo nextCursor back verbatim, do not parse it as a page number.
  5. Read the composition before reading imagesIt contains the coordinate convention, the revision and the asset catalogue, which is everything needed to decide what to fetch.

Reading errors correctly

The server separates protocol failures from tool failures, and the distinction matters when you are debugging an agent:

-32700  parse error          -32601  no such method
-32600  invalid request      -32602  bad call (unknown tool, bad URI or cursor)
-32002  resource missing or not permitted (resources/read; data.uri names it)
-32603  internal server error

A tool failure is not a protocol error. It comes back as a normal result with {"isError":true} and a sentence explaining what went wrong — wrong argument type, missing required field, over a limit, or a scene that does not exist. That text is written to be read by the agent, so a failing tool call usually already contains its own fix. Missing and forbidden return the same message on purpose, so the server never confirms that someone else's scene ID exists.

Limits and caveats

  • Read-only, permanently. No writes, no generation, no undo, no editor state, and no way to spend credits.
  • No whole-scene rendering. Per-asset thumbnails are available; a picture of the assembled scene is not.
  • Scoped to one account. A token covers all of that user's games and nothing else. It is not a web login credential, and paid status is verified on every call.
  • Thumbnails are for choosing, not shipping. They are capped at 220px on the longest side. Final exports happen in the app or through the download tools.
  • The Tiled resource exists only for square and isometric scenes. UI scenes have no tiled representation, and reading scene://{id}/tiled alone gives you JSON without image bytes — you still need get_asset_downloads, or use get_scene_bundle which resolves paths for you.
  • Treat the token as a password. It ends up in third-party client config files by design. Never commit it. Regenerating invalidates the old one immediately.

The product view of this surface is on MCP game assets and Agent / MCP. What the assets themselves look like is covered on tileset generator.

FAQ

What is the difference between an MCP tool and an MCP resource?

A tool is a named function the client invokes with arguments through tools/call — for example search_assets with a notebookId and a role filter. A resource is an addressable document the client fetches by URI through resources/read — for example scene://42/composition. Tools answer questions; resources return documents.

What is the PX-Art MCP server called and what protocol version does it speak?

The server is named perfectpixel-scene. It speaks JSON-RPC over Streamable HTTP at https://px-art.com/api/mcp, negotiating protocol version 2025-11-25, with 2025-06-18 also accepted. Both versions expose identical capabilities.

Can an MCP server for game assets modify my project?

This one cannot. All twelve tools are read-only, and there is no write, generate or delete tool anywhere in the surface. Calls do not consume credits and cannot alter a scene. Every call is written to a read audit visible only to the account owner through the web login.

Why are assets not listed in resources/list?

There are simply too many of them for enumeration to be useful. Scenes are paged through resources/list with an opaque cursor; assets are found through search_assets, or by following the asset:// URIs that a scene composition already carries in each asset entry.

How does a client tell an animation strip from a button state strip?

By reading stripKind on the asset. A value of animation means play it at the given fps; states means take the frame matching the interaction, never play it; glyphs means index by character. The fps field is only present when stripKind is animation, precisely so that playing a state strip is not an easy mistake.

What happens if a tool call has bad arguments?

It does not surface as a JSON-RPC error. The call returns a normal result with isError set to true and a message describing the problem — wrong type, missing required field, over a limit, or a nonexistent scene. Agents are expected to read that message and correct the call themselves.

Related

Connect a read-only asset server to your client

Twelve tools, scene and asset URIs, Streamable HTTP, scoped to your own games and audited per request.

Create a free accountSee pricing

New accounts start with 20 credits. Formal checkout is still under review and not open yet.