Skip to content

feat: Consolidate 8 scattered MCP repos into unified MCPC orchestrator#93

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/merge-mcp-repositories
Closed

feat: Consolidate 8 scattered MCP repos into unified MCPC orchestrator#93
Copilot wants to merge 2 commits intomainfrom
copilot/merge-mcp-repositories

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

EventRelay had MCP functionality fragmented across 8 separate repos with no single canonical server. This adds mcp-servers/mcpc/ as the unified TypeScript MCP orchestrator and wires it into EventRelay's Python backend via a subprocess adapter.

New: mcp-servers/mcpc/ — canonical MCPC server

TypeScript package (JSON-RPC 2.0/stdio, MCP 2024-11-05) consolidating:

Origin Tool(s)
MCP_ROUND_TABLE round_table — multi-agent consensus
mcp-tools-extension list_tools, execute_tool_chain (variable binding, zero-glue chaining)
shared-state state_set, state_get, state_list, state_delete
Mcpcserver (JS) merged into server infrastructure

New: src/mcp/mcpc_adapter.py

Async Python adapter that spawns the MCPC Node process over stdio and exposes a typed call_tool API to the EventRelay backend:

async with MCPCAdapter() as adapter:
    result = await adapter.call_tool("round_table", {
        "topic": "How should we process this video?",
        "agents": ["gemini", "claude"],
    })
    # result → {"consensus": "...", "agreement_score": 0.87, ...}

Registry + docs

  • src/mcp/mcp_registry.jsonmcpc registered as canonical_orchestrator
  • mcp-servers/README.md — consolidation table added; MCP-management, MESH, mcp-tools-extension marked archived
Original prompt

This section details on the original issue you should resolve

<issue_title>🔴 MCP Consolidation — merge 8 scattered MCP repos into unified orchestrator</issue_title>
<issue_description>## Problem
8 separate MCP-related repos exist under @groupthinking:

  • MCPC (5.6MB, TypeScript) — keep as canonical
  • MCP_ROUND_TABLE (2.1MB, TypeScript)
  • Mcpcserver (2.9MB, JavaScript)
  • MCP_IOS (6.2MB, Python)
  • MCP-CORE (121KB, HTML)
  • MCP-management (39KB, stale since June 2025)
  • MESH (243KB, stale since June 2025)
  • mcp-tools-extension (967KB, stale since July 2025)

Architecture Reference

Foundation: 'Protocol-First Composability with MCP — Enables agents to reason about and chain tools with zero manual glue code.'
This requires ONE canonical MCP implementation, not 8 fragmented ones.

Proposed Consolidation

  1. Keep MCPC as the canonical MCP server
  2. Port relevant features from MCP_ROUND_TABLE and Mcpcserver into MCPC
  3. Archive MCP-management, MESH, mcp-tools-extension
  4. Move MCP_IOS mobile code into MCPC /platforms/ios directory
  5. Wire consolidated MCPC into EventRelay as the MCP layer

Strategic Execution Path

Phase 1 (2-3 days): MCP Consolidation — Internal value and unified reasoning via central orchestrator

Acceptance Criteria

  • Single MCPC repo contains all MCP functionality
  • EventRelay imports MCP tools from MCPC
  • 5 stale MCP repos archived</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: Mastering-Any-Task AI
A hybrid agentic framework for research-led planning and execution.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Contributor

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-uvai Ready Ready Preview, Comment, Open in v0 Mar 20, 2026 10:48am

…elay

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] Consolidate 8 MCP repositories into unified orchestrator feat: Consolidate 8 scattered MCP repos into unified MCPC orchestrator Mar 20, 2026
Copilot AI requested a review from groupthinking March 20, 2026 10:49
const results: ToolChainResult['steps'] = [];
const variables: Record<string, unknown> = {};

let lastOutput: unknown = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unresolved variable references in tool chain arguments silently pass through as literal strings instead of throwing an error

Fix on Vercel

// ── Tool manager ───────────────────────────────────────────────────────
case 'list_tools': {
result = listTools(args['tag'] as string | undefined);
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing depth tracking in execute_tool_chain allows unbounded recursion and stack overflow

Fix on Vercel

# MCP tools/call returns {content: [{type, text}], isError?}
content = result.get("content", [])
if result.get("isError"):
text = content[0]["text"] if content else "Unknown error"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text = content[0]["text"] if content else "Unknown error"
text = content[0].get("text", "") if content else "Unknown error"

KeyError raised when MCPC server returns error response with malformed content structure missing "text" key

Fix on Vercel

self._process.stdin.write((message + "\n").encode())
await self._process.stdin.drain()

async def _read_loop(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responses received for unknown request IDs are silently ignored, masking potential synchronization issues or server bugs

Fix on Vercel


case 'state_delete': {
const deleted = deleteState(args['key'] as string);
result = { key: args['key'], deleted };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tool execution errors are returned as successful JSON-RPC responses instead of proper error responses

Fix on Vercel


const id = request['id'] ?? null;
const method = request['method'] as string | undefined;
const params = (request['params'] ?? {}) as Record<string, unknown>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing MCP-level parameter validation for tool arguments causes protocol-level errors to be returned as tool execution errors instead of invalid parameter errors

Fix on Vercel

@groupthinking
Copy link
Owner

Closing: duplicate of #91 which provides the most complete MCP orchestration layer (orchestrator + registry + types + service container integration). Keeping #91 as the candidate.

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.

🔴 MCP Consolidation — merge 8 scattered MCP repos into unified orchestrator

2 participants