Skip to content

feat: viz mcp aggregator#21

Merged
snehshah22 merged 3 commits into
mainfrom
feat/viz-mcp-aggregator
Apr 13, 2026
Merged

feat: viz mcp aggregator#21
snehshah22 merged 3 commits into
mainfrom
feat/viz-mcp-aggregator

Conversation

@snehshah22
Copy link
Copy Markdown
Collaborator

Description

This PR refactors the MCP server to support dual proxy aggregation, connecting to both Notebook and Visualization MCP sockets simultaneously. It transitions the server from a single-proxy pass-through model to a master-aggregator architecture.

Key Changes

Directory Structure

  • Renamed notebook_mcp/ to mcp/ to reflect its expanded role as a multi-domain aggregator.
  • Updated root package.json and release-please-config.json to point to the new mcp/ directory.

MCP Server (mcp/server.ts)

  • Refactored server.ts to act as a master MCP server.
  • Added logic to spawn and connect to both notebooks-[ide_name] and visualization-[ide_name] proxies using StdioClientTransport.
  • Implemented tool list aggregation: ListToolsRequestSchema handler merges tools from both proxies.
  • Implemented request routing: CallToolRequestSchema routes tool calls to the correct underlying proxy based on a tool ownership map.
  • Implemented resilient fallback logic:
    • If both proxies fail, it falls back to standalone mode serving local tools.
    • If one proxy fails, it still provides tools from the successful proxy and falls back to local tools for the failed domain if applicable.
  • Fixed a bug where failed client connections were not reset to null, preventing correct fallback behavior.

Build and Dependencies

  • Updated mcp/build.js to treat cross-spawn and Node.js built-ins as external modules to avoid dynamic require errors in ESM output.
  • Added cross-spawn as an explicit dependency in the root package.json to ensure it is available when running via npx from the git repository.

@snehshah22 snehshah22 requested review from a team as code owners April 11, 2026 02:33
@github-actions github-actions Bot requested a review from chriskinzel April 11, 2026 02:33
@snehshah22 snehshah22 changed the title Feat/viz mcp aggregator feat: viz mcp aggregator Apr 11, 2026
@snehshah22 snehshah22 force-pushed the feat/viz-mcp-aggregator branch from 8ec895a to b5a3715 Compare April 11, 2026 02:50
@snehshah22 snehshah22 requested review from belluru and girish April 11, 2026 02:53
@snehshah22 snehshah22 merged commit 400b33b into main Apr 13, 2026
9 checks passed
@snehshah22 snehshah22 deleted the feat/viz-mcp-aggregator branch April 13, 2026 16:00
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.

3 participants