Skip to content

feat: MCP server exposing AgentFactory fleet capabilities (SUP-1040)#19

Merged
MarkKropf merged 2 commits intomainfrom
SUP-1040
Mar 12, 2026
Merged

feat: MCP server exposing AgentFactory fleet capabilities (SUP-1040)#19
MarkKropf merged 2 commits intomainfrom
SUP-1040

Conversation

@MarkKropf
Copy link
Contributor

Summary

  • SUP-1050: MCP server setup with Streamable HTTP and STDIO transports, API key auth (reusing existing worker-auth.ts pattern), health check endpoint, graceful shutdown
  • SUP-1051: 6 fleet management tools — submit-task, get-task-status, list-fleet, get-cost-report, list-workers, stop-task — all backed by Redis session/worker storage
  • SUP-1052: 3 MCP resources — fleet://agents (full fleet state), fleet://issues/{id} (issue-level agent progress), fleet://logs/{id} (session logs with disk hints)

New packages/mcp-server package using @modelcontextprotocol/sdk for external MCP client consumption (Claude Desktop, Spring AI, IDE agents).

Test plan

  • pnpm --filter @supaku/agentfactory-mcp-server typecheck passes
  • Start server with node --import tsx packages/mcp-server/src/cli.ts and verify /health returns OK
  • Test STDIO mode with --stdio flag for Claude Desktop integration
  • Verify API key auth works with MCP_API_KEY or WORKER_API_KEY env vars
  • Test tools via MCP client (submit-task, list-fleet, get-cost-report, etc.)
  • Test resources via MCP client (fleet://agents, fleet://issues/{id})

🤖 Generated with Claude Code

MarkKropf and others added 2 commits March 12, 2026 07:53
Create packages/mcp-server with @modelcontextprotocol/sdk to expose fleet
management tools and resources to MCP-aware clients (Claude Desktop,
Spring AI, IDE agents).

- SUP-1050: Server setup with Streamable HTTP + STDIO transports, API key auth
- SUP-1051: 6 fleet tools (submit-task, get-task-status, list-fleet, get-cost-report, list-workers, stop-task)
- SUP-1052: 3 resources (fleet://agents, fleet://issues/{id}, fleet://logs/{id})

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace list-workers tool with forward-prompt per AC spec (SUP-1051)
- Rename stop-task to stop-agent to match AC spec (SUP-1051)
- Add 26 unit tests covering all 6 tool handlers (SUP-1051)
- Add resource subscription notifications via polling (SUP-1052)
- Fix graceful shutdown in both STDIO and HTTP modes (SUP-1050)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MarkKropf MarkKropf merged commit 3bd12d3 into main Mar 12, 2026
3 checks passed
@MarkKropf MarkKropf deleted the SUP-1040 branch March 12, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant