• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 18970043441
51%

Build:
DEFAULT BRANCH: main
Ran 31 Oct 2025 10:43AM UTC
Jobs 1
Files 328
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Oct 2025 10:38AM UTC coverage: 47.452% (+0.05%) from 47.403%
18970043441

push

github

web-flow
vMCP: Implement CLI serve command and session management (#2406)

* Implement CLI serve command and session management for Virtual MCP Server

This completes the MCP protocol server implementation by adding CLI
integration, session management, and health endpoints. The Virtual MCP
Server can now aggregate multiple backend MCP servers from a ToolHive
group and serve them through a unified MCP endpoint.

Changes:
- Implement 'vmcp serve' command with full component wiring
- Integrate MCP session management using ToolHive's session.Manager
- Add /health and /ping endpoints with minimal security-conscious responses
- Create session adapter exposing session.Manager via SDK interface
- Add comprehensive test coverage for session lifecycle and health endpoints
- Provide example configuration file with documentation

Session Management Architecture:
Sessions are ENTIRELY managed by ToolHive's session.Manager (the same
component used in pkg/transport/proxy/streamable for MCP sessions).
The mark3labs SDK does NOT manage sessions - it only calls our
sessionIDAdapter interface during MCP protocol flows:
  - Generate(): Called on MCP initialize to create session IDs
  - Validate(): Called on every request to check session validity
  - Terminate(): Called on HTTP DELETE to end sessions

All session storage, TTL-based cleanup, and lifecycle management is
handled by ToolHive infrastructure. The adapter is purely glue code
following DDD principles (infrastructure in server bounded context).

Security:
- Health endpoint intentionally minimal to prevent information disclosure
- No version, session counts, or capability metrics exposed
- Cryptographically secure session IDs per MCP specification
- Session termination properly handled with 404 semantics

Testing:
- Added 381 lines of test coverage for new functionality
- Session adapter: 9 test cases covering full lifecycle
- Health endpoints: 3 test cases including security validation

The Virtual MCP Server is now funct... (continued)

148 of 262 new or added lines in 3 files covered. (56.49%)

1 existing line in 1 file now uncovered.

20785 of 43802 relevant lines covered (47.45%)

22.14 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
65.94
8.4% pkg/vmcp/server/server.go
11
82.81
pkg/vmcp/server/session_adapter.go
97
0.0
0.0% cmd/vmcp/app/commands.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% cmd/vmcp/app/commands.go
Jobs
ID Job ID Ran Files Coverage
1 18970043441.1 31 Oct 2025 10:43AM UTC 328
47.45
GitHub Action Run
Source Files on build 18970043441
  • Tree
  • List 328
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18970043441
  • 4ef4a16f on github
  • Prev Build on main (#18969331103)
  • Next Build on main (#18972917503)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc