Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Oct 31, 2025

Summary

Fix vmcp to support MCP servers that implement only a subset of capabilities (tools, resources, prompts), per the MCP specification.

Previously, vmcp unconditionally queried all three capabilities from every backend, causing it to reject backends like oci-registry that only implement tools.

Changes

  • Query ServerCapabilities during MCP initialization handshake
  • Conditionally query only capabilities advertised by the backend
  • Return empty results for unsupported capabilities instead of errors
  • Add test coverage for backends with partial capability support

Impact

  • oci-registry (tools-only) now successfully aggregates: 105 tools (was 101)
  • All 3 backends in the demo group now connect successfully (was 2/3)
  • Complies with MCP spec that makes all capabilities optional

Test Results

✓ All tests pass (pkg/vmcp/client)
✓ Linting clean
✓ Verified with live oci-registry, fetch, and github backends

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 19.56522% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.53%. Comparing base (aa48db2) to head (3d3eff9).

Files with missing lines Patch % Lines
pkg/vmcp/client/client.go 19.56% 34 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2416      +/-   ##
==========================================
- Coverage   54.58%   54.53%   -0.05%     
==========================================
  Files         265      265              
  Lines       25599    25633      +34     
==========================================
+ Hits        13972    13979       +7     
- Misses      10306    10329      +23     
- Partials     1321     1325       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JAORMX
Copy link
Collaborator Author

JAORMX commented Oct 31, 2025

This is not particularly efficient. We'd need to implement #2417 first.

@JAORMX JAORMX force-pushed the vmcp-partial-capabilities branch from 2c737f5 to 4647532 Compare October 31, 2025 13:03
The vmcp was rejecting backends that don't implement all three MCP
capabilities (tools, resources, prompts). This violated the MCP
specification, which explicitly makes all capabilities optional.

The oci-registry MCP server only implements tools, causing vmcp to
fail during aggregation when it tried to unconditionally query
resources and prompts.

Changes:
- Query server capabilities during MCP initialization handshake
- Conditionally query only advertised capabilities
- Return empty results for unsupported capabilities
- Add tests for backends with partial capability support

This allows vmcp to successfully aggregate backends that implement
any subset of tools, resources, and prompts, as intended by the
MCP specification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@JAORMX JAORMX force-pushed the vmcp-partial-capabilities branch from 4647532 to 3d3eff9 Compare October 31, 2025 13:30
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.

2 participants