Aseprite_MCP: Instructions file for Codex

AGENTS.md

Aseprite_MCP AGENTS.md is an instructions file for Codex, OpenCode from ZhangDongyang800/Aseprite_MCP. It costs 2,731 tokens per session, scanned A, original, MIT.

Project instructions for an MCP server that lets an AI create pixel art in Aseprite, a pixel-art editor. The server exposes Python tools that run Lua operations in Aseprite either headlessly or through a live window.

In plain words
What is it for?
Use it to install dependencies, run the server, execute its tests, locate Aseprite, and add or maintain drawing operations.
Why use it?
It gives contributors the project's commands, architecture, test boundaries, and important setup details before they change the server.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is ZhangDongyang800/Aseprite_MCP's own configuration. It tells Codex and OpenCode how to work on Aseprite_MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Aseprite_MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ZhangDongyang800/Aseprite_MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ZhangDongyang800/Aseprite_MCP/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ZhangDongyang800/Aseprite_MCP

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Aseprite_MCP AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhangdongyang800/aseprite_mcp/agents-md/github.svg)](https://agentmods.dev/instructions/zhangdongyang800/aseprite_mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zhangdongyang800/aseprite_mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/zhangdongyang800/aseprite_mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Aseprite_MCP AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zhangdongyang800/aseprite_mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/zhangdongyang800/aseprite_mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,731 This file is loaded in full into every session.
When invoked 2,731 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02731 $0.02731
Opus 5.5 $0.01092 $0.01092
Sonnet 5.5 $0.00546 $0.00546
Haiku 4.5 $0.00273 $0.00273

Measured 4d ago against content hash f21b23efc4b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Aseprite_MCP AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

MCP server that lets an AI draw pixel art in Aseprite. Python (FastMCP) exposes a three-tool surface backed by an op registry; each op is implemented in .lua and run inside Aseprite, either as a headless CLI subprocess or over a WebSocket bridge to a live Aseprite window.

Commands

pip install -e ".[dev]"      # runtime deps + pytest
python server.py             # start MCP server over stdio
pytest                       # all tests; fast, no Aseprite needed
pytest -m "not e2e"          # skip tests that need real Aseprite
pytest -m e2e                # real Aseprite; auto-skips if not found
pytest tests/v2/test_apply_tool.py::test_apply_operations_happy_path -v

# on-machine harnesses (tests/live/, NOT collected by pytest - real Aseprite, real exit code)
python tests/live/probe_server_version.py      # is this build behaving as specified?
python tests/live/live_smoke.py --all          # 8 regression scenarios incl. big-canvas timing
python tests/live/ws_probe.py                  # websocket bridge: protocol, simulated ext, fallback

No linter, formatter, or typechecker is configured — do not invent one.

tests/ is local-only: it is gitignored and never published to the repository. In a fresh clone these commands have nothing to run.

ASEPRITE_PATH overrides Aseprite auto-detection (src/aseprite_locate.py: env var → PATH → common install locations, see src/config.py). Set it to run e2e, the tests/live/ harnesses, or the server for real.

Architecture

server.py            create_server(): builds Config/runner/SessionManager, registers the v2
                     three-tool surface + resources + prompts; starts session cleanup thread
src/config.py        env vars -> Config; scripts_dir is fixed at <root>/scripts (not env-configurable);
                     work_dir defaults to <root>/work and is resolved to an absolute path
src/session.py       SessionManager: <work>/sessions/<uuid>/canvas.ase; expiry sweeps the
                     filesystem, not the in-memory registry
src/runner.py        AsepriteRunner (CLI subprocess) and WebSocketRunner (bridge); identical run_script()
src/bridge.py        WebSocket server in a background thread; tab-delimited text protocol
src/v2/registry.py   REGISTRY (OpRegistry): single source of truth — OpSpec = name / category /
                     Pydantic params / lua function / mutating+destructive flags; validate() + catalog()
src/v2/compile.py    ops[] -> one generated Lua program; prints one JSON line after __MCP_JSON__
src/v2/executor.py   Engine: per-session lock, CLI file backup, atomic apply, dry_run, undo/redo
src/v2/result.py     Envelope / OpResult / stable ErrorCode — returned by apply_operations and
                     run_lua; inspect instead returns a fastmcp ToolResult
src/v2/inspect.py    metrics computed from the scale-1 exported PNG (palette, bbox, coverage, ...)
src/v2/tools.py      register_v2_tools(): apply_operations, inspect, run_lua
src/v2/ops/          built-in op definitions: draw_ops.py, session_ops.py (imported by __init__.py)
scripts/mcp_common.lua  shared Lua helpers (sprite I/O, draw primitives, selection masks)
scripts/ops_*.lua    op implementations grouped by category, named _mcp_op_<name>
scripts/inspect.lua  read-only perception export (works on a temp copy; never modifies the document)
scripts/mcp_run_lua.lua / scripts/undo.lua / scripts/redo.lua  run_lua entry + ws-mode native history
extension/main.lua   Aseprite extension; connects as WebSocket client, dofiles scripts, captures print()
tests/v2/            pytest suite (local-only, gitignored; mocked runner, Lua is never executed)
tests/live/          on-machine harnesses (local-only, gitignored), run by hand against real Aseprite

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +2 lines · +37 tokens per session f21b23efc4b8
  2. 15d ago Changed · +1 lines · +134 tokens per session 6bef02bfbbf9
  3. 17d ago Changed · +7 lines · +128 tokens per session ceffae882707
  4. 21d ago Changed · +4 lines · +368 tokens per session ecd1de6e5798
  5. 1mo ago Changed · +5 lines · +388 tokens per session 5ae93580166d
  6. 1mo ago Changed · +13 tokens per session f8dc6152c677
  7. 1mo ago First seen · 73 lines · 1,663 tokens per session scan A 1bdc53ed313c

Subscribe to this mod's changes

Aseprite_MCP AGENTS.md is an instructions file published in the GitHub repository ZhangDongyang800/Aseprite_MCP (17 stars, last pushed 4d ago), licensed MIT. It adds 2,731 tokens to every session, about $0.0109 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-20.

Related

Aseprite_MCP AGENTS.md compared with instructions from other repositories

Aseprite_MCP AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Aseprite_MCP AGENTS.mdZhangDongyang800/Aseprite_MCPInstructions file174d agoMITA2,731Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode