Commit Graph

3 Commits

Author SHA1 Message Date
Ra
4b7c4b6314 Save current state before fixing MCP tool registration and proxying 2025-09-03 03:01:58 -07:00
Ra
004ba6ab55 Fix VS Code MCP server initialization crash and multi-agent architecture
CRITICAL FIX:
- Removed auto-registration during initialization that was causing crashes
- Fixed pattern match error with Inbox.start_link (already_started case)
- Changed architecture to require explicit agent registration with unique IDs

MULTI-AGENT SUPPORT:
- Agents must now register themselves with unique identifiers (e.g., 'Green Platypus')
- register_agent tool now works without requiring prior agent_id
- All other tools require agent_id parameter to identify the calling agent
- Proper error handling for missing agent_id in tool calls

ARCHITECTURE CHANGE:
- One MCP server instance serves multiple agents (as per VS Code design)
- Removed auto-registration of 'GitHub Copilot' agent during initialization
- Each agent must explicitly call register_agent before using other tools

This fixes the VS Code connection error:
MatchError: no match of right hand side value: {:error, {:already_started, #PID<0.215.0>}}
2025-09-03 00:59:52 -07:00
Ra
ea3c390257 Successfully consolidated all MCP server functionality into unified MCPServer
- Combined external server management from MCPServerManager (stdio/http support)
- Integrated session tracking and heartbeat from EnhancedMCPServer
- Added auto-registration and unified interface from UnifiedMCPServer
- Fixed HTTP server support to prevent crashes on mcp_figma config
- All 15+ agent coordination tools now properly registered and working
- External servers (context7, filesystem, memory, sequentialthinking) starting correctly
- HTTP servers handled gracefully with proper fallback logging
- Application.ex updated to start only consolidated MCPServer
- Ready to remove duplicate files after verification
2025-09-03 00:19:39 -07:00