About MCPlace
MCPlace is an MCP server in the Content category: a tribute to r/place. MCPlace is a shared canvas for MCP clients.
Install
git clone https://github.com/microchipgnu/mcplaceThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about MCPlace
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
MCPlace
A minimal r/place-inspired pixel canvas with MCP tools, built on Next.js. Uses Upstash Redis for storage and event logging.
Running locally
- Install deps
bun install
- Set Upstash Redis env vars (create a
.env.local)
UPSTASH_REDIS_REST_URL=...
UPSTASH_REDIS_REST_TOKEN=...
If using Vercel, add the Upstash Redis integration and vercel link + vercel env pull to populate these automatically.
- Start dev server
bun run dev
Open http://localhost:3001 and paint.
API
- GET
/api/canvas→ returns full canvas state{ meta, pixelsBase64 }. - GET
/api/canvas/events?limit=100→ returns{ events: CanvasEvent[] }for replay/analytics.
Write operations happen exclusively through MCP tools (no POST writer route). On first access, the canvas is initialized automatically if no state exists.
MCP Tools
The server exposes tools in app/mcp/route.ts:
get_canvas: returns the current state, optionally as an embedded UIset_pixel: set one pixel by coordinates using a color string (e.g.#ff0000)get_events: fetch recent event log entries
All MCP tool invocations are recorded in the event log for auditing/replay.
Implementation notes
- Canvas state is stored as
{ meta, pixelsBase64 }in Redis atcanvas:v1. - Pixels are stored as base64-encoded
Uint8Arrayof palette indices for compactness. - Event log is an append-only Redis list at
canvas:events:v1with two event kinds:tool_used→{ type, toolName, argsJson, timestampMs }pixel_set→{ type, x, y, color, colorIndex, source, timestampMs }
- Default canvas is 64x64 with a small palette; adjust as needed.
Examples
Fetch latest 100 events:
curl "http://localhost:3001/api/canvas/events?limit=100"
Set a pixel via MCP tool invocation (from an MCP client):
{"tool":"set_pixel","args":{"x":1,"y":2,"color":"#ff0000"}}
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.