-
Notifications
You must be signed in to change notification settings - Fork 145
add initial binary implementation for vmcp #2340
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2340 +/- ##
==========================================
- Coverage 54.27% 54.10% -0.18%
==========================================
Files 242 244 +2
Lines 23446 23513 +67
==========================================
- Hits 12725 12721 -4
- Misses 9506 9583 +77
+ Partials 1215 1209 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c71d250 to
49d7d5a
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.
Pull Request Overview
This PR introduces the foundational infrastructure for a new standalone binary called vmcp (Virtual MCP Server), which will serve as an aggregation proxy for multiple MCP (Model Context Protocol) servers. The implementation focuses on establishing the binary structure, CLI commands, and build/CI configuration without the full functional implementation.
Key Changes:
- Added new
vmcpbinary with CLI structure (serve, validate, version commands) - Integrated build tasks and container image builds for the new binary
- Extended CI/CD pipeline to build and publish vmcp container images
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/vmcp/main.go | Entry point for the vmcp binary with signal handling |
| cmd/vmcp/app/commands.go | CLI command structure with placeholder implementations |
| cmd/vmcp/README.md | Comprehensive documentation for vmcp usage and configuration |
| examples/vmcp-config.yaml | Example configuration file demonstrating vmcp settings |
| docs/vmcp-implementation-summary.md | Implementation status and architecture documentation |
| Taskfile.yml | Build tasks for vmcp binary and container image |
| .github/workflows/image-build-and-publish.yml | CI/CD pipeline job for building and publishing vmcp images |
| .github/ko-ci.yml | ko build configuration for vmcp |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This will be the entrypoint for the vmcp component See https://github.com/stacklok/stacklok-epics/issues/153
2a6bce6 to
99c3982
Compare
|
@claude please review this taking into account its relation to docs/proposals/THV-2106-virtual-mcp-server.md |
|
Claude finished @JAORMX's task —— View job Code Review: vmcp Binary ImplementationI've reviewed this PR in context of the proposal document SummaryThis PR successfully establishes the basic infrastructure for the Critical Issues1. Configuration Schema Mismatch (High Priority)Issue: The example configuration in Current Implementation (lines 1-105 in server:
address: "localhost:8080"
transport: "http"
middleware:
auth:
provider: "local"
authz:
enabled: true
backends:
- name: "filesystem-server"
type: "container"
tool_prefix: "fs_"Proposal Specification (lines 314-387 in proposal): # Virtual MCP metadata
name: "engineering-vmcp"
group: "engineering-team" # Reference to ToolHive group
# ===== INCOMING AUTHENTICATION =====
incoming_auth:
type: oidc
oidc:
issuer: "..."
client_id: "..."
audience: "vmcp"
# ===== OUTGOING AUTHENTICATION =====
outgoing_auth:
source: inline
default:
type: pass_through
backends:
github:
type: token_exchange
token_exchange:
token_url: "..."
audience: "github-api"
# ===== TOOL AGGREGATION =====
aggregation:
conflict_resolution: prefix
conflict_resolution_config:
prefix_format: "{workload}_"Why This Matters:
Recommendation:
Related Review Comment: JAORMX noted "This doesn't really match the configuration we've defined" on 2. Architecture Documentation MisalignmentIssue: The README.md describes an architecture that differs from the proposal. Current README ( Proposal Architecture (lines 27-57 in proposal): Key Differences:
Recommendation: Update the architecture diagram in README.md to match the proposal, or clearly mark it as "Phase 1 Architecture (Simplified)" if you're deferring token exchange to a later PR. 3. Documentation File Persistence QuestionIssue: The file Related Review Comment: JAORMX noted "there's probably no need to persist this just yet" on Recommendation:
Code Quality Issues4. Signal Handler Lacks Graceful Cleanup (Medium Priority)Issue: Signal handler in Current Code ( ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
defer cancel()Comparison to thv ( func setupSignalHandler() {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
go func() {
<-sigCh
logger.Debugf("Received signal, cleaning up lock files...")
lockfile.CleanupAllLocks()
os.Exit(0)
}()
}Why This Matters: When vmcp is actually implemented, it will need to:
Related Review Comment: Copilot reviewer noted "The signal handler logs a shutdown message but exits immediately without allowing cleanup" Recommendation:
5. Command Structure is SolidPositive Feedback: The command structure in
The version command pattern matches Build and CI/CD Review6. Build Infrastructure is Complete and CorrectPositive Feedback: The build and CI/CD changes are comprehensive and follow existing patterns: Taskfile.yml Changes (lines 173-203):
GitHub Workflow (
ko Configuration (
Minor Issue: Some whitespace-only changes in the workflow file (lines with trailing whitespace removed). This is fine but not strictly necessary. Test Coverage7. Zero Test Coverage is Expected for Initial PRObservation: Codecov reports 0% coverage for 67 new lines (all in Analysis: This is acceptable for an initial binary skeleton PR because:
Recommendation: Add a TODO comment in the PR description or a follow-up issue to track test coverage for the actual implementation. Alignment with Proposal8. Phase 1 Scope QuestionQuestion: What is the intended scope of this PR vs. the full Phase 1 MVP? Proposal Phase 1 Goals (lines 1066-1076):
This PR Delivers:
Recommendation:
Additional Observations9. Backend Type ConfusionIssue: The README describes three backend types (
But the proposal clearly states (lines 64-68):
This means: vmcp should NOT have a Recommendation: Align the README with the group-based architecture from the proposal. 10. Comparison Table is UsefulPositive Feedback: The comparison table in README.md (
However, the "Architecture" row should be updated to say "Multiple workloads from a group" to align with the proposal. Summary of RecommendationsMust Fix Before Merge
Should Fix Before Merge
Nice to Have
VerdictThis PR provides solid infrastructure for the vmcp binary (build tasks, CI/CD, command structure) but has critical documentation and configuration misalignments with the proposal. The code quality is good and follows ToolHive patterns, but the configuration schema and README need to be updated to match the group-based, dual-authentication architecture described in the proposal. Recommendation: Request changes to align configuration and documentation with proposal before merging. | |
effc6f8 to
79cb7bc
Compare
This will be the entrypoint for the vmcp component
See https://github.com/stacklok/stacklok-epics/issues/153