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

stacklok / toolhive / 18947711942
51%

Build:
DEFAULT BRANCH: main
Ran 30 Oct 2025 04:33PM UTC
Jobs 1
Files 325
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

30 Oct 2025 04:24PM UTC coverage: 47.733% (+0.02%) from 47.712%
18947711942

push

github

web-flow
vMCP: Implement capability merging and routing integration (#2376)

* Implement Virtual MCP Server with capability merging and routing

This completes issue #154 by implementing the final stage of the
capability aggregation pipeline: exposing aggregated capabilities
via MCP protocol and routing requests to backends.

Components added:
- Router (pkg/vmcp/router/default_router.go): Thread-safe routing
  using RWMutex for capability name → backend target mapping.
  Supports dynamic routing table updates for future backend discovery.

- Virtual MCP Server (pkg/vmcp/server/server.go): Aggregates multiple
  backend MCP servers into unified interface. Uses mark3labs/mcp-go
  to expose tools/list, resources/list, prompts/list automatically.
  Routes incoming requests (tools/call, resources/read, prompts/get)
  to appropriate backends via Router.

Features:
- Automatic MCP protocol endpoint exposure
- Tool/resource/prompt routing with conflict-resolved names
- Request forwarding to backends via BackendClient
- Streamable HTTP transport support
- Graceful startup/shutdown

Testing:
- Router: 100% test coverage including concurrency tests
- Server: Unit tests for configuration, registration, error handling
- Integration tests: Full pipeline (Aggregator→Router→Server)
- All tests passing, linting clean

Architecture:
Client → Virtual MCP Server → Router → BackendClient → Backend MCPs
         (MCP protocol)        (routing) (HTTP)        (MCP servers)

Resolves: #154
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>

* Address review feedback: timeouts and MIME type handling

Fix points 4 and 5 from review:

4. Extract magic number timeouts to constants:
   - Add defaultReadHeaderTimeout (10s) for HTTP server security
   - Add defaultShutdownTimeout (10s) for graceful shutdown
   - Replace hardcoded values with named constants

5. Fix hardcoded MIME type in resource handler:
   - Remove hardcoded "text/plain" MIME type
   - Look up actual MIME type from aggre... (continued)

231 of 461 new or added lines in 3 files covered. (50.11%)

14 existing lines in 1 file now uncovered.

20406 of 42750 relevant lines covered (47.73%)

22.44 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
109
0.0
pkg/vmcp/router/mocks/mock_router.go
121
57.54
pkg/vmcp/server/server.go

Uncovered Existing Lines

Lines Coverage ∆ File
14
54.74
-10.53% pkg/secrets/keyring/keyctl_linux.go
Jobs
ID Job ID Ran Files Coverage
1 18947711942.1 30 Oct 2025 04:33PM UTC 325
47.73
GitHub Action Run
Source Files on build 18947711942
  • Tree
  • List 325
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18947711942
  • 40505317 on github
  • Prev Build on main (#18947697376)
  • Next Build on main (#18949962841)
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