Repository avatar
Other Tools
v0.1.0
active

spatial-mcp-worker

io.github.raydeoliveira/spatial-mcp-worker

Cloudflare Workers Streamable HTTP MCP for CVT-RB2 budgets, EDID patching, and lenticular optics.

Documentation

spatial-mcp-worker

Live endpoint: https://spatial-mcp-worker.raymond-deoliveira.workers.dev/mcp (Discovery card: /.well-known/mcp/server-card.json)

Zero-dependency Cloudflare Workers Streamable HTTP MCP oracle (2025-03-26) exposing the pure-compute Spatial / 3D Display math from edidsmith and glassweave for any remote AI agent with per-call monetization (HTTP 402 x402 / Stripe MPP, Polar.sh Pro keys, or Bearer API keys).

Architecture

Strict Ports & Adapters (src/index.ts & src/adapters/ -> src/core/ -> src/ports/ -> src/domain/), zero runtime npm dependencies, zero module-level mutable state, 256 KB bounded request reader, structured JSON observability logs, and ctx.waitUntil() KV metering.

Local Verification

npm test

Production Deploy Checklist (Cloudflare Workers)

wrangler kv namespace create METER_KV
# Add the returned KV id to wrangler.jsonc under kv_namespaces
wrangler secret put API_KEYS_CSV
wrangler secret put X402_PAY_TO_ADDRESS
wrangler secret put X402_FACILITATOR_URL
wrangler secret put X402_FACILITATOR_TOKEN
wrangler deploy

What It Does / Does Not Do

  • Does: Pure-compute CVT-RB2 link-budgeting, EDID 1.4/CTA-861 binary inspection, VESA-conformant Full-SBS/RGB 4:4:4 EDID patching + macOS plist synthesis, quirk lookups, and slanted-lenticular shader calibration math over Streamable HTTP MCP.
  • Does Not: Touch local USB-HID glasses, DDC/CI displays, Metal/Vulkan GPUs, or CoreML ANE — install the local edidsmith, xrctl, depthpipe, and glassweave binaries for hardware execution.