Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Remove completed MCP modularization backlog task

nirholase3823d0187fa
diff --git a/tasks/task-06-mcp-modularization.md b/tasks/task-06-mcp-modularization.md
deleted file mode 100644
index 14c1cb851..000000000
--- a/tasks/task-06-mcp-modularization.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Task: Modularize the MCP Server
-
-## Context
-
-This is the `three.ws` 3D agent platform. The MCP server (`api/mcp.js`) is a single 1,201-line file implementing the Model Context Protocol with 14 tools. All tool logic, auth gating, payment handling, and JSON-RPC dispatch are co-located. This makes it hard to add tools, test individual tools, or reason about the codebase.
-
-## Goal
-
-Split `api/mcp.js` into focused modules **without changing any behavior**. The public interface (`POST /api/mcp`, tool names, response shapes, auth behavior) must remain identical.
-
-## Proposed Structure
-
-```
-api/
- mcp.js ← entry point, stays as the Vercel handler (~50 lines)
- _mcp/
- dispatch.js ← JSON-RPC router: initialize, tools/list, tools/call
- auth.js ← bearer/x402 auth gating for tool calls
- tools/
- avatars.js ← list_my_avatars, get_avatar, search_public_avatars, render_avatar, delete_avatar
- models.js ← validate_model, inspect_model, optimize_model
- solana.js ← solana_agent_reputation, solana_agent_attestations, solana_agent_passport
- pumpfun.js ← pumpfun_recent_claims, pumpfun_token_intel, pumpfun_creator_intel, pumpfun_recent_graduations
- catalog.js ← TOOL_CATALOG array assembled from all tool modules
- payments.js ← x402 payment verification + settlement logic
-```
-
-## Instructions
-
-1. Read `api/mcp.js` carefully before touching anything.
-2. Create the `api/_mcp/` directory and the files above.
-3. Move code in small, verifiable steps — one module at a time.
-4. After each module extraction, confirm `api/mcp.js` still works by tracing imports.
-5. Keep `api/mcp.js` as the Vercel-exported `default` handler; it should just import from `_mcp/` and call `dispatch()`.
-6. Do not change any function signatures, tool names, response shapes, or error codes.
-7. Do not add new functionality.
-
-## What NOT to Do
-
-- Do not rename tools, change tool descriptions, or alter input/output schemas
-- Do not add a new abstraction layer (e.g., a "tool base class") — just move code
-- Do not change auth behavior or payment flow
-- Do not convert to TypeScript
-
-## Success Criteria
-
-- `api/mcp.js` is ≤ 60 lines after refactor
-- Each file in `api/_mcp/` is ≤ 250 lines
-- `npm test tests/api/mcp.test.js` passes (if tests exist — run `npm test` to check)
-- Manual smoke test: `curl -X POST /api/mcp -d '{"jsonrpc":"2.0","method":"initialize","id":1}'` returns the same response as before
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:
-
-```bash
-git rm "tasks/task-06-mcp-modularization.md"
-```
-
-Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.