-
Couldn't load subscription status.
- Fork 134
Add Virtual MCP Server proposal #2106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a2a5279 to
9312f00
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2106 +/- ##
==========================================
- Coverage 54.28% 54.27% -0.01%
==========================================
Files 242 242
Lines 23446 23446
==========================================
- Hits 12727 12725 -2
- Misses 9505 9506 +1
- Partials 1214 1215 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@claude please review this |
|
Claude finished @JAORMX's task —— View job Code Review: Virtual MCP Server ProposalI've reviewed the Virtual MCP Server proposal. This is a well-thought-out design that appropriately leverages existing ToolHive constructs. Here's my detailed feedback: Strengths1. Excellent reuse of existing patterns ✓
2. Clear phased implementation ✓
3. Good alignment with MCP specification ✓
Issues & Recommendations1. Authentication design needs clarification
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a technical proposal for a Virtual MCP Server feature that consolidates multiple MCP servers from a ToolHive group into a single unified interface. The proposal aims to simplify client integration and centralize authentication complexity while maintaining backward compatibility.
- Adds comprehensive design documentation for the Virtual MCP Server (
thv virtualcommand) - Defines group-based architecture leveraging existing ToolHive constructs
- Outlines phased implementation approach from basic aggregation to enterprise features
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@JAORMX This part of Claudes review is what I was getting at in the vMCP GDoc. I'll explain more here just so it's visible to others. If the benefit of vMCP itself is that it can aggregate 10 backing MCP servers, that's great, but let's think of the security implications / risks of this. In this case, a single vMCP server will have access to different 10 MCP servers. In the event that vMCP is ever exploited, would it be able to make calls to the backing MCP servers directly? Or will they themselves be protected by authn/z? If so, then this isn't as much of a concern from me. |
I see. So... we should clarify the architecture and deployment recommendations then. backed MCP servers should still not be deployed as they are without appropriate protections. That is, they should still enforce authentication and perhaps even authorization. If the vMCP is ever exploited, the backed MCP servers will still authenticate and authorize the request. I'm more keen on a zero-trust policy in general. |
@JAORMX Yep, that would be my understanding (and hope) too! I had a feeling you thought the same way but I just wanted to triple check 😄 |
|
@ChrisJBurns picture me with a tinfoil hat on at any given moment 😄 |
Hmm, but the vMCP server would be an OAuth app so the user would connect with a token that says That would work if we can use token exchange all the way through, but not if we need to drive a consent and do the full flow (we would want to drive the consent chain to the consent on the vMCP server correct)? So in that case we'd have to send the back end server through a back channel? |
13e4f9d to
6fc029f
Compare
This proposal introduces MCPGroup support to the Kubernetes operator, enabling the Virtual MCP Server feature and logical grouping of MCPServer resources. Key design decisions: - Explicit group field on MCPServer spec (matches CLI behavior) - Simple MCPGroup CRD with description field - Status tracks server list and count - Namespace-scoped groups only - Enables field selector queries for group membership Related: #2106
a983db5 to
f1f918c
Compare
|
@claude could you do another review? |
|
Claude finished @JAORMX's task —— View job Code Review: Virtual MCP Server ProposalI've completed a thorough review of the Virtual MCP Server proposal. The document has been significantly enhanced since the last review, with excellent additions around elicitation support and composite tools. Here's my detailed feedback: Summary of Changes Since Last ReviewThe most recent commit (f1f918c) added:
These additions substantially improve the proposal's completeness and practicality. Strengths1. Excellent architectural reuse ✅
2. Clear phased implementation ✅
3. Elicitation integration is well-designed ✅
4. Practical examples ✅
Critical Issues1. Token Exchange Integration Needs Clarification
|
f1f918c to
ac1d31f
Compare
|
@claude please do another review |
|
Claude finished @JAORMX's task —— View job Code Review: Virtual MCP Server ProposalI've completed a comprehensive review of the Virtual MCP Server proposal. This is a substantial and well-structured document that has clearly evolved based on previous feedback. Here's my detailed assessment: Overall AssessmentVerdict: ✅ Strong proposal with excellent improvements This proposal demonstrates thoughtful design and has addressed many concerns from the previous review. The document is now significantly more comprehensive, particularly with:
Key Strengths1. Excellent Security Architecture ✅ (lines 128-248)The proposal now includes a thorough security section addressing the zero-trust concerns raised by @ChrisJBurns and @JAORMX:
This directly addresses the PR discussion about whether backends should enforce their own auth even when accessed via Virtual MCP. The answer is clearly "yes" (line 179: "Each backend MCP server MUST enforce its own authentication"). 2. Token Exchange Integration Well-Documented ✅ (lines 950-963)The proposal now properly references THV-2063 and explains:
This resolves the previous review's Issue #1 about token exchange clarity. 3. Conflict Resolution Fully Specified ✅ (lines 700-778)All three strategies are now well-documented with examples:
This resolves the previous review's Issue #3. 4. Comprehensive Error Handling ✅ (lines 781-853)The proposal now covers:
This addresses the previous review's Issue #4 about failure modes. 5. Practical Examples ✅The incident investigation example (lines 427-463) effectively demonstrates tool reuse with multiple calls to the same backend tool with different URLs. This is a compelling use case. Issues and RecommendationsCritical Issue #1: Token Exchange Flow Security Gap
|
ac1d31f to
53f8c5a
Compare
Implement foundational domain interfaces for Virtual MCP Server (vMCP) following Domain-Driven Design principles. This enables parallel implementation of vMCP features across multiple teams. Package structure: - pkg/vmcp/types.go: Shared domain types (BackendTarget, Tool, etc.) - pkg/vmcp/errors.go: Common domain errors - pkg/vmcp/router/: Request routing interfaces - pkg/vmcp/aggregator/: Capability aggregation interfaces - pkg/vmcp/auth/: Authentication interfaces (incoming & outgoing) - pkg/vmcp/composer/: Workflow engine interfaces - pkg/vmcp/config/: Platform-agnostic configuration model - pkg/vmcp/cache/: Token caching interfaces Key design decisions: - Shared types in root package avoid circular dependencies - Extensible authentication via Strategy interface - BackendDiscoverer abstraction enables CLI and K8s implementations - RoutingTable maps capabilities to backends (composite tools excluded) - Configuration model matches proposal YAML structure Related: #2106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implement foundational domain interfaces for Virtual MCP Server (vMCP) following Domain-Driven Design principles. This enables parallel implementation of vMCP features across multiple teams. Package structure: - pkg/vmcp/types.go: Shared domain types (BackendTarget, Tool, etc.) - pkg/vmcp/errors.go: Common domain errors - pkg/vmcp/router/: Request routing interfaces - pkg/vmcp/aggregator/: Capability aggregation interfaces - pkg/vmcp/auth/: Authentication interfaces (incoming & outgoing) - pkg/vmcp/composer/: Workflow engine interfaces - pkg/vmcp/config/: Platform-agnostic configuration model - pkg/vmcp/cache/: Token caching interfaces Key design decisions: - Shared types in root package avoid circular dependencies - Extensible authentication via Strategy interface - BackendDiscoverer abstraction enables CLI and K8s implementations - RoutingTable maps capabilities to backends (composite tools excluded) - Configuration model matches proposal YAML structure Related: #2106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
53f8c5a to
51b0cd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asked some questions...
Also i think that we miss some section about testing.
Implement foundational domain interfaces for Virtual MCP Server (vMCP) following Domain-Driven Design principles. This enables parallel implementation of vMCP features across multiple teams. Package structure: - pkg/vmcp/types.go: Shared domain types (BackendTarget, Tool, etc.) - pkg/vmcp/errors.go: Common domain errors - pkg/vmcp/router/: Request routing interfaces - pkg/vmcp/aggregator/: Capability aggregation interfaces - pkg/vmcp/auth/: Authentication interfaces (incoming & outgoing) - pkg/vmcp/composer/: Workflow engine interfaces - pkg/vmcp/config/: Platform-agnostic configuration model - pkg/vmcp/cache/: Token caching interfaces Key design decisions: - Shared types in root package avoid circular dependencies - Extensible authentication via Strategy interface - BackendDiscoverer abstraction enables CLI and K8s implementations - RoutingTable maps capabilities to backends (composite tools excluded) - Configuration model matches proposal YAML structure Related: #2106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
* Add Virtual MCP Server routing interfaces and domain model Implement foundational domain interfaces for Virtual MCP Server (vMCP) following Domain-Driven Design principles. This enables parallel implementation of vMCP features across multiple teams. Package structure: - pkg/vmcp/types.go: Shared domain types (BackendTarget, Tool, etc.) - pkg/vmcp/errors.go: Common domain errors - pkg/vmcp/router/: Request routing interfaces - pkg/vmcp/aggregator/: Capability aggregation interfaces - pkg/vmcp/auth/: Authentication interfaces (incoming & outgoing) - pkg/vmcp/composer/: Workflow engine interfaces - pkg/vmcp/config/: Platform-agnostic configuration model - pkg/vmcp/cache/: Token caching interfaces Key design decisions: - Shared types in root package avoid circular dependencies - Extensible authentication via Strategy interface - BackendDiscoverer abstraction enables CLI and K8s implementations - RoutingTable maps capabilities to backends (composite tools excluded) - Configuration model matches proposal YAML structure Related: #2106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Address PR feedback on vMCP routing interfaces Changes: - Use ConflictResolutionStrategy enum instead of string in ResolvedTool - Remove specific auth strategy examples from OutgoingAuthenticator docs until design decisions are finalized Addresses feedback from: - yrobla: Use typed enum for conflict resolution strategy - jhrozek: Defer auth strategy details until design is complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This proposal introduces a Virtual MCP Server that aggregates multiple MCP servers from a ToolHive group into a single unified interface. Key features: - Leverages existing ToolHive groups for backend management - Uses existing ToolsFilter and ToolOverride constructs - Supports per-backend authentication strategies - Enables composite tools for cross-service workflows - Maintains full MCP protocol compatibility The Virtual MCP Server will simplify client integration by providing a single connection point while handling the complexity of multiple backend authentication requirements and tool namespace management. Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
This commit addresses feedback about the two authentication boundaries in the Virtual MCP proposal and clarifies that exchanged tokens are meant for backend APIs, not for authenticating to backend MCP servers. Key changes: - Updated "Two Authentication Boundaries" section to explicitly state that outgoing authentication is for "Backend APIs" with tokens that backend MCP servers use directly to call upstream APIs - Enhanced architecture diagram to show the complete token flow: Client → Virtual MCP → Backend MCP Server → External API, making it clear that APIs validate tokens, not MCP servers - Revised security model to emphasize API-level authentication and added property explaining MCP server simplicity (focus on business logic, not auth) - Updated sequence diagram to include External API as separate participant with explicit note that backend MCP does NOT validate tokens - Added concrete Google Docs MCP server example demonstrating the full authentication flow with tokens scoped for Google Workspace API - Updated configuration comments to clarify that token audiences are for backend APIs (e.g., "github-api" for GitHub's REST API) This design follows the ToolHive pattern where MCP servers focus on business logic while security relies on network isolation and properly scoped API tokens validated by the external APIs themselves. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
7ce6513 to
316fe7f
Compare
Summary
This PR introduces a proposal for the Virtual MCP Server, a new ToolHive feature that aggregates multiple MCP servers from a group into a single unified interface.
What does this PR do?
Adds a technical proposal document that outlines the design and implementation approach for the Virtual MCP Server (
thv virtualcommand).Key Design Decisions
ToolsFilterfor including specific tools andToolOverridefor renaming/redescribing toolsBenefits
Testing
This is a proposal document - implementation and testing will follow in subsequent PRs.
Related Issues
This proposal addresses the need for consolidating multiple MCP servers as discussed in the Virtual MCP design document.