Agent API
Your agent can paint Pixel Land.
Pixel Land runs a native MCP server. Once you are signed in, copy one command, paste it into Claude Code, Codex, Cursor or any MCP client, and your agent can act as you: read the board, quote a stroke, paint, draw text, see your automatic daily top-up and edit your private land.
What your agent can do
- Look before it draws. Read a region or the whole shared board as pixels and a PNG image.
- Price every stroke. Quote the exact pixel cost, takeovers and protected cells before committing.
- Paint as you. One batch can place up to 1,024 pixels, using your real daily allowance.
- Draw text. The server renders the site's 5×7 font, so letters line up pixel-perfectly.
- Undo mistakes. Revert a recent stroke inside the same 60-second window as the website.
- See the daily top-up. The 500 base plus 0–100 random (rare 2,500) is applied automatically, exactly like the site.
- Edit private land. Paint or fill a parcel you own or rent, without spending daily pixels.
The key is scoped to painting. It cannot buy land, start a subscription, change your email or password, use a payment method, or reach the operator console.
Quick start
- Sign in and open Agents & MCP.
- Copy the command for your client. The command contains your personal key.
- Paste it into the terminal and restart the client if it was already running.
- Ask your agent: “Call pixel_status, then read the board and draw a red heart near the centre.”
Endpoint and authentication
| Item | Value |
|---|---|
| Endpoint | https://pixel.kituwa.com/mcp |
| Transport | Streamable HTTP, stateless JSON-RPC 2.0 |
| Authentication | Authorization: Bearer pxl_… |
| Methods | POST only |
| Protocol versions | 2025-06-18, 2025-03-26, 2024-11-05 |
| Capabilities | tools |
The key is generated from your account and can be copied again at any time. Rotating it invalidates every old copy immediately. Never commit the key or paste it into a public issue.
Connect a client
Claude Code
claude mcp add --transport http --scope user pixel-land https://pixel.kituwa.com/mcp \ --header "Authorization: Bearer pxl_your_key"
Use --scope project instead of --scope user if you only want the server in the current repository.
Codex
Put the key in the environment Codex runs in, then add this to ~/.codex/config.toml:
export PIXEL_LAND_MCP_TOKEN='pxl_your_key' [mcp_servers.pixel-land] url = "https://pixel.kituwa.com/mcp" bearer_token_env_var = "PIXEL_LAND_MCP_TOKEN"
Cursor
Merge this into ~/.cursor/mcp.json and restart Cursor:
{
"mcpServers": {
"pixel-land": {
"url": "https://pixel.kituwa.com/mcp",
"headers": {
"Authorization": "Bearer pxl_your_key"
}
}
}
}
Any other MCP client
{
"mcpServers": {
"pixel-land": {
"type": "http",
"url": "https://pixel.kituwa.com/mcp",
"headers": {
"Authorization": "Bearer pxl_your_key"
}
}
}
}
Raw HTTP check
If this prints a tool list, the endpoint and key are working.
curl -s https://pixel.kituwa.com/mcp \
-H "Authorization: Bearer $PIXEL_LAND_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Tools
| Tool | Purpose | Spends pixels? |
|---|---|---|
pixel_status | Board, palette, quota, account, parcels and undo state | No |
pixel_read | Read a region as a PNG plus non-blank cells | No |
pixel_quote | Exact cost of a stroke before painting | No |
pixel_paint | Paint 1–1,024 cells on the shared board | Yes |
pixel_draw_text | Draw text with the 5×7 site font | Yes |
pixel_undo | Undo a stroke from the last 60 seconds | Refunds |
pixel_claim | Return today's automatic top-up amount | No change |
pixel_land_paint | Paint cells on a parcel you own or rent | No |
pixel_land_fill | Fill or clear a whole owned/rented parcel | No |
pixel_status
No arguments. Returns the canvas size and sequence, the 32-colour palette, your remaining daily pixels, allowance, used, base and bonus, today's draw and whether the top-up is granted, your level, XP, streak, owned parcels, active rentals and any undo that is still valid. Call it first.
pixel_read
| Argument | Type | Default | Meaning |
|---|---|---|---|
x, y | integer | 0 | Top-left cell of the region. |
width, height | integer | whole board | Region size; clamped to the 900×600 canvas. |
include_image | boolean | true | Include a PNG render of the region. |
limit | integer | 4,000 | Maximum painted cells to list (max 8,000). |
Returns painted, listed, truncated, and pixels as [x, y, color] rows ordered top-to-bottom, left-to-right.
pixel_quote
Arguments: pixels, an array of [x, y, color] cells. Returns cost, takeover, blocked, remaining and affordable. A quote never changes the board.
pixel_paint
| Argument | Type | Meaning |
|---|---|---|
pixels | array | 1–1,024 cells as [x, y, color]. |
op_id | string, optional | Unique stroke id. Reuse it on a retry; the second call returns the first result instead of painting twice. |
Blank cells and cells you already own cost 1 pixel. Taking over another painter's cell costs 3 pixels. Locks and shields are refused. The result includes cost, remaining, painted, undo_id and undo_seconds.
pixel_draw_text
| Argument | Type | Default | Meaning |
|---|---|---|---|
text | string | required | A–Z, 0–9 and basic punctuation; uppercased, max 32 characters. |
x, y | integer | required | Top-left of the text block. |
color | integer | 1 | Palette index 1–31. |
scale | integer | 1 | Pixel scale 1–4. |
background | integer, optional | none | Fill the text rectangle with this palette index; 0 clears it. |
op_id | string, optional | none | Idempotency key. |
The server checks the block fits on the board before painting, so a bad position costs nothing.
pixel_undo
Arguments: undo_ids, an array of ids from pixel_paint or pixel_draw_text. Works only within 60 seconds and only if nobody changed those cells first. Refunds the stroke's pixels.
pixel_claim
No arguments. Returns today's automatic top-up: 500 base plus the 0–100 random (rare 2,500). The top-up is granted when the account first opens the board; this tool never rerolls it. It remains for compatibility with older clients.
pixel_land_paint
Arguments: parcel_id and cells (1–512 rows of [x, y, color] in world coordinates). The parcel must be yours or rented by you, and every cell must be inside it. Private land never uses the daily quota.
pixel_land_fill
Arguments: parcel_id and color (0 clears to paper). Fills the whole parcel. Same ownership and rental checks as pixel_land_paint.
Worked examples
Read before drawing
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pixel_status",
"arguments": {}
}
}
Price a stroke
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "pixel_quote",
"arguments": {
"pixels": [[148, 99, 2], [149, 99, 2], [150, 99, 2]]
}
}
}
Draw a red heart
This 5×5 heart sits in the lower-right open area. Every cell is on blank paper, so the cost is 17 pixels.
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "pixel_paint",
"arguments": {
"op_id": "heart-2026-11-23",
"pixels": [
[699, 448, 2], [701, 448, 2],
[698, 449, 2], [699, 449, 2], [700, 449, 2], [701, 449, 2], [702, 449, 2],
[698, 450, 2], [699, 450, 2], [700, 450, 2], [701, 450, 2], [702, 450, 2],
[699, 451, 2], [700, 451, 2], [701, 451, 2],
[700, 452, 2]
]
}
}
}
Draw text
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "pixel_draw_text",
"arguments": {
"text": "HELLO",
"x": 10,
"y": 10,
"color": 2,
"scale": 2,
"background": 0,
"op_id": "hello-1"
}
}
}
Fill private land
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "pixel_land_fill",
"arguments": {"parcel_id": 42, "color": 6}
}
}
Rules and limits
- Your real quota. Agent paint uses the same daily allowance as the website. It never gets a bonus or a bypass.
- Takeovers cost 3. Blank or your own cells cost 1. Locked, shielded or otherwise protected cells are refused with a
protectedcode. - Daily reset. The game day rolls over at midnight Eastern.
pixel_statusreturns the exact next reset. - Undo window. 60 seconds, the same as the website. A stroke is not reversible after that or after another painter changes a cell.
- Batch sizes. 1,024 shared cells per stroke; 512 land cells per stroke.
pixel_readlists at most 8,000 painted cells. - Rate limits. 600 MCP requests per minute per account, with a tighter 60-per-minute limit on paint and land writes.
- Suspension applies. A suspended account cannot paint, receive a top-up or edit land through MCP.
- Idempotency. Send a unique
op_idwith every mutation. Retrying with the same id returns the first result; retrying without one can paint twice. - No payments. The key cannot buy land, subscriptions or decorations, and cannot top up a balance.
Security and privacy
- The key is a bearer credential. It is sent only in the
Authorizationheader over HTTPS; it is never accepted in a URL or cookie. - The server derives the key from your account with a domain-separated HMAC. Rotating your key changes the derivation immediately, so every old copy stops working.
- Tool output exposes your public handle, level, XP and parcels — never your email, password, passkeys, payment details or operator status.
- The server records the key's last-used time, not the pixels you draw. Tool arguments are not written to logs.
- MCP is stateless: no server session, no cross-account cache. Each request is authenticated and scoped to its account.
- The endpoint has no CORS headers and accepts no browser session as authentication, so a malicious page cannot reuse your login.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| HTTP 401 | Missing, malformed or rotated key. Copy a fresh command from Agents & MCP. |
| HTTP 405 | The endpoint accepts POST only. Use an MCP client or the curl example above. |
| HTTP 415 | Send Content-Type: application/json. |
| HTTP 429 | Rate limit. Wait a minute; do not retry a batch in a loop. |
isError with code: "quota" | Not enough pixels left today. Wait for the next top-up at midnight Eastern. |
isError with code: "protected" | A lock or shield covers a cell. Read the region and choose another. |
isError with code: "undo" | The 60-second window expired or somebody changed the cells. |
| No tools in the client | Restart the client, confirm the URL ends in /mcp, and confirm the header is Authorization: Bearer …. |
-32601 | The client called a method the server does not implement. Pixel Land exposes tools only. |
Protocol details
The endpoint implements the MCP Streamable HTTP transport in stateless mode:
POSTa JSON-RPC 2.0 object tohttps://pixel.kituwa.com/mcp.initializereturns the negotiated protocol version and thetoolscapability.notifications/initializedand other notifications receive202 Acceptedwith no body.tools/listreturns every tool with an input schema and annotations.tools/callreturns text and, forpixel_read, an image content block.- Tool failures return HTTP 200 with
isError: trueand a structured error, so the agent can explain the rule instead of treating it as a transport failure.
Building an integration? The repository notes live in docs/MCP.md.