Consolidate scattered MCP implementations into unified orchestrator#91
Draft
Consolidate scattered MCP implementations into unified orchestrator#91
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Consolidate scattered MCP functionality into unified system - Create MCPOrchestrator for centralized task coordination - Create MCPServerRegistry for server management - Add comprehensive type definitions in types.py - Wire MCP orchestrator into service container - Create dependency injection helpers - Add comprehensive documentation Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
- Create implementation summary with metrics and testing results - Add step-by-step migration guide for external repositories - Document API usage examples and integration points - Include troubleshooting guide and next steps Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
| self.orchestration_active = False | ||
| if self.orchestration_task: | ||
| self.orchestration_task.cancel() | ||
| try: |
Contributor
|
|
||
| except Exception as e: | ||
| logger.error(f"Task {task_id} failed with error: {e}") | ||
|
|
Contributor
| headers["Authorization"] = f"Bearer {config.auth_token}" | ||
|
|
||
| async with session.get( | ||
| url, headers=headers, timeout=config.timeout |
Contributor
There was a problem hiding this comment.
| state.uptime_seconds += 10 # Monitoring interval | ||
|
|
||
| except Exception as e: | ||
| logger.error(f"Monitoring loop error: {e}") |
Contributor
| created_at: datetime = Field( | ||
| default_factory=datetime.utcnow, description="Creation timestamp" | ||
| ) | ||
| started_at: Optional[datetime] = Field( |
Contributor
This was referenced Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
MCP functionality was fragmented across 8 external repositories and 3 internal implementations within EventRelay, totaling 2,273 lines of duplicated coordination logic. This violated the "Protocol-First Composability" principle requiring ONE canonical MCP implementation.
Solution
Created unified MCP orchestrator at
src/youtube_extension/services/mcp/consolidating internal implementations (51% code reduction). External repositories require manual migration by owners.Architecture
New unified layer:
orchestrator.py- Task coordination, dependency management, load balancingregistry.py- Server discovery, health monitoring, capability-based routingtypes.py- 15 capabilities, 6 task states, 5 server statesConsolidated from:
Usage
Server registration:
External Repositories (Out of Scope)
Cannot access external repos from this codebase. Migration guide provided in
docs/MCP_CONSOLIDATION_GUIDE.mdfor:Key Features
Files Changed
Created (8):
Modified (1):
Original prompt