MCP
A read-only MCP server for game art and scenes
PX-Art runs an MCP server called perfectpixel-scene that lets Cursor, Claude Code, Codex and other MCP-capable clients read your game projects, characters, asset families and scene layouts over JSON-RPC. It exposes twelve tools and no write path: agents can discover, preview and take delivery of assets, but they cannot generate, edit or delete anything.
What MCP is, in one paragraph
The Model Context Protocol is a JSON-RPC convention for connecting an AI client to an external system. The server advertises tools (callable functions with JSON schemas) and resources (addressable documents identified by URI). The client calls initialize, then tools/list or resources/list, then tools/call. That is the whole surface. PX-Art implements the resource and tool capabilities only — no prompts, no subscriptions, no writes.
Protocol version: 2025-11-25. Version 2025-06-18 is also accepted. If a client asks for a version the server supports, that version is echoed back; otherwise the server answers with its own latest and lets the client decide whether to continue.
Why a game-asset MCP is a different problem
Most MCP servers hand back text. Game art is binary, hierarchical and expensive to look at. Three constraints shaped this server:
Discovery must come first
An external agent knows nothing at session start. Without a game-listing entry point, every per-game tool is uncallable because there is no game id to pass. list_games is the mandatory first step.
Images must be opt-in
Attaching thumbnails to every search result blows out the context window. Search returns text; images come only from preview_assets, capped at 8 per call.
Truncation must be visible
Search results carry a truncated flag. Without it, an agent treats the first page as the complete set and then reasons from a false premise.
The twelve tools
| Tool | Takes | Gives back |
|---|---|---|
list_games | nothing | Your games with their design language (style key, tags, standard cell size) and asset-kind counts. Source of every game id. |
list_game_structure | game id | Modules/pages and tag-name mapping, so numeric page and tag ids become meaningful. |
list_characters | game id, optional page | Logical characters and their related assets, with each asset's character role — front/side/back view, avatar, portrait, action. |
list_asset_families | game id | Asset families: everything produced in one generation run, with functional-role counts, the original description and the style key actually used. |
search_assets | game id, query, kind, family, role, limit | Matching assets plus a truncation flag. |
preview_assets | up to 8 asset ids | Thumbnail PNGs interleaved with text, so the agent can reject candidates that read wrong visually. |
get_asset_downloads | up to 50 asset ids | Short-lived download URLs for the original files. Every issue is written to the audit log. |
get_scene_bundle | scene id | A landable file list: scene JSON, the Tiled map for map scenes, in-bundle paths for every dependency, SHA-256 per file, short-lived URLs. |
get_scene_metadata | scene id | Scene type, revision, layers, node counts and world bounding box. |
get_nodes | scene id, node ids | Those nodes, in the order asked. Unknown ids are skipped rather than failing the call. |
get_scene_region | scene id, x, y, width, height | Nodes inside a world-space rectangle, in draw order. |
analyze_layout | scene id | Deterministic layout diagnostics: overlaps, out-of-bounds nodes, lock conflicts. No subjective judgement. |
Resource URIs
Finished artefacts are read as resources rather than tool calls:
| URI | Contents |
|---|---|
scene://SCENE_ID/bundle | The landable file list for a scene |
scene://SCENE_ID/composition | The composition, including the coordinate space definition |
scene://SCENE_ID/metadata | Scene overview |
scene://SCENE_ID/tiled | The scene as Tiled JSON |
asset://ASSET_ID | An asset record |
asset://ASSET_ID/image | That asset's image |
Calling it
The recommended path is list_games → list_game_structure or list_characters → list_asset_families → search_assets → preview_assets → get_asset_downloads. For a whole scene, skip the per-asset steps and call get_scene_bundle.
A tools/call request
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "search_assets",
"arguments": {
"notebookId": 12,
"query": "slime",
"kind": "character",
"limit": 5
}
}
}
The result
Tool results arrive as MCP content items. The text item holds JSON; the shape below is abridged to the fields an agent usually acts on.
{
"assets": [
{
"assetId": 184,
"notebookId": 12,
"pageId": 31,
"uri": "asset://184",
"name": "slime-walk-south",
"kind": "action",
"file": "slime-walk-south.png",
"frames": 6,
"w": 768,
"h": 128,
"sampling": "nearest"
}
],
"truncated": false
}
The sampling hint matters: set your engine's texture filter from it, or pixel art arrives blurred. Taking delivery then looks like this:
{
"assets": [
{
"assetId": 184,
"file": "slime-walk-south.png",
"mimeType": "image/png",
"w": 768, "h": 128, "frames": 6,
"downloadUrl": "https://img.px-art.com/...",
"expiresAt": 1753240000
}
]
}
Download URLs are short-lived and signed. Fetch them promptly, or re-issue the call — do not cache the URL itself in your repository. For whole scenes, get_scene_bundle is cheaper and safer than fifty individual download calls, because it also carries the SHA-256 of each file so your agent can verify what it wrote.
Permissions, scoping and audit
- Read-only by constructionThere is no write, generate or delete tool in the server. This is not a permission setting an agent can escalate past — the capability does not exist.
- Tokens are per userA token is issued to one account and scoped to that account's own games. It cannot reach another user's projects.
- Paid status is checked per callEvery call re-validates entitlement server-side rather than trusting a flag captured at token-issue time.
- Calls are auditedMCP reads are written to an audit trail, including each issue of asset download links.
- Batch caps are hardEight assets per preview call, fifty per download call. Oversized requests are rejected with a message telling the agent to narrow or split, which it can act on without human help.
- Editor state stays outScreenshots of the editor and live editor state are not exposed. Agents read data, not your screen.
Read-only MCP is unlocked permanently by any subscription payment or top-up credit purchase. See pricing for what credits cost and what generation spends; formal checkout is still under review and not open yet.
Limits and things to check
- Nothing here generates art. If your agent needs a sprite that does not exist yet, a human generates it in the workspace first — see the sprite sheet generator and the tileset generator.
- Assets are probabilistic output. An agent reading correct metadata about a mediocre sprite still gets a mediocre sprite. Review before shipping.
- Truncation is real. Honour the
truncatedflag; raise the limit or tighten filters instead of assuming you saw everything. - Names are not looks. Matching name, role and size do not mean the asset reads correctly in context. When in doubt, call
preview_assets. - Rights still apply. Commercial use is allowed for legally generated assets, but third-party rights, local law and AI-provider restrictions remain your responsibility, and AI output is neither guaranteed exclusive nor guaranteed registrable.
- Prompts are not exposed. The final assembled prompt is internal and is never returned through MCP or any other client-facing surface.
FAQ
What is the MCP server's name and protocol version?
The server is named perfectpixel-scene. It speaks JSON-RPC with protocol version 2025-11-25 and also accepts 2025-06-18. It declares only the resources and tools capabilities — no prompts, no subscriptions, no write path.
Can an agent delete or overwrite my assets through MCP?
No. There are no write, generate or delete tools. The twelve exposed tools are all reads: list_games, list_game_structure, list_characters, list_asset_families, search_assets, preview_assets, get_asset_downloads, get_scene_bundle, get_scene_metadata, get_nodes, get_scene_region and analyze_layout.
Can another user's agent reach my games?
No. Tokens are issued per user and scoped to that user's own games. Paid status is re-checked server-side on every call, and calls are written to an audit trail.
How does an agent get an image without flooding its context?
By searching first and looking second. search_assets returns text metadata only. preview_assets returns thumbnails and accepts at most 8 asset ids per call, so previewing is a deliberate step on a short list.
What is the fastest way to land a whole scene in a repo?
Call get_scene_bundle. It returns scene.json, the Tiled map for map scenes, in-bundle paths for every dependency, a SHA-256 for each file and short-lived download URLs — enough for an agent to write the files and verify them without per-asset calls.
Do download URLs expire?
Yes. They are short-lived signed URLs and carry an expiry. Fetch them right away or re-issue the call; never commit the URL itself into a repository.
Which clients can connect?
Any MCP-capable coding agent, including Cursor, Claude Code and Codex. The server entry is a URL plus a bearer token in the Authorization header.
Related
Connect your agent to your own game project
Generate a character and a scene, issue a token, and let Cursor, Claude Code or Codex read the structure over read-only MCP.
Create a free accountSee pricingNew accounts start with 20 credits. Formal checkout is still under review and not open yet.