feat: replace SpawnDetector with MCP server for spawn1337 protocol

Instead of parsing terminal output for <spawn1337> tags, spawn capabilities
are now exposed as native MCP tools that Claude Code can call directly.
The MCP server (stdio transport) proxies requests to the existing REST API.

- Add src/mcp-server.ts with 6 tools: spawn_agent, list_agents,
  get_agent_status, get_agent_result, send_agent_message, cancel_agent
- Remove src/spawn-detector.ts and all references in session.ts/server.ts
- Add CLAUDEMAN_API_URL env var propagation to sessions and screens
- Write .mcp.json to case directories during creation
- Remove spawn1337 tag documentation from case-template.md
- Add claudeman-mcp bin entry to package.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-23 23:16:21 +01:00
co-authored by Claude Opus 4.5
parent 7c72802886
commit 99919d6dfb
11 changed files with 1549 additions and 710 deletions
+6 -3
View File
@@ -5,10 +5,11 @@
"type": "module",
"main": "dist/index.js",
"bin": {
"claudeman": "./dist/index.js"
"claudeman": "./dist/index.js",
"claudeman-mcp": "./dist/mcp-server.js"
},
"scripts": {
"build": "tsc && chmod +x dist/index.js && mkdir -p dist/web dist/templates && cp -r src/web/public dist/web/ && cp src/templates/case-template.md dist/templates/",
"build": "tsc && chmod +x dist/index.js dist/mcp-server.js && mkdir -p dist/web dist/templates && cp -r src/web/public dist/web/ && cp src/templates/case-template.md dist/templates/",
"start": "node dist/index.js",
"dev": "tsx src/index.ts",
"web": "node dist/index.js web",
@@ -36,6 +37,7 @@
"license": "MIT",
"dependencies": {
"@fastify/static": "^8.0.0",
"@modelcontextprotocol/sdk": "^1.25.3",
"chalk": "^5.3.0",
"commander": "^12.1.0",
"fastify": "^5.1.0",
@@ -44,7 +46,8 @@
"ink-text-input": "^6.0.0",
"node-pty": "^1.1.0",
"react": "^19.2.3",
"uuid": "^10.0.0"
"uuid": "^10.0.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^20.14.0",