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

stacklok / toolhive / 30272583615
70%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 02:02PM UTC
Jobs 1
Files 841
Run time 2min
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

27 Jul 2026 01:55PM UTC coverage: 69.66% (+0.06%) from 69.601%
30272583615

push

github

web-flow
Reject backend tools with invalid x-mcp-header (#6013)

* Reject backend tools with invalid x-mcp-header

SEP-2243 lets an MCP server designate individual tool parameters for
mirroring into HTTP request headers, via an x-mcp-header annotation in
the tool's inputSchema. The extension constrains the annotation's value,
and requires a Streamable HTTP client to reject any tool definition that
violates those constraints. vMCP is its backends' client and had no such
validation: nothing in the repo matched x-mcp-header at all.

Left unchecked, an invalid annotation is not contained to the tool that
carries it. vMCP republishes aggregated backend schemas to its own
downstream clients, so a conformant downstream client would reject the
entire aggregated tools/list, taking every other backend's tools down
with it. A CRLF in an annotation is worse than cosmetic once mirroring
lands, since the value becomes an outgoing header name.

Validate at newCapabilityListFromMCP -- the single ingestion seam the
Legacy and Modern paths share -- and drop only the offending tool, which
is the narrower failure. The annotation's vocabulary and constraint
checks live in one place, pkg/mcp, so the ingestion check and the
call-time header derivation that follows cannot drift in their reading of
the spec.

The traversal is depth-capped: annotations are legal at any nesting depth
and a backend can advertise any tool list it likes, so an unbounded
recursive walk would be a stack-exhaustion vector.

Refs #6002

* Mirror x-mcp-header params on the Modern egress (#6014)

SEP-2243 lets a server designate tool parameters, via x-mcp-header in its
inputSchema, whose values it also requires as Mcp-Param-{name} HTTP
headers -- and a server that designated a parameter and does not receive
its header rejects the call with -32020. vMCP never sent them, so any
Modern backend annotating a tool parameter was uncallable through vMCP,
surfacing only as a generic backend failure.

Deriving the headers... (continued)

279 of 301 new or added lines in 8 files covered. (92.69%)

8 existing lines in 2 files now uncovered.

80564 of 115653 relevant lines covered (69.66%)

84.17 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
92.38
pkg/mcp/xmcpheader.go
4
82.27
-0.02% pkg/vmcp/composer/workflow_engine.go
1
88.31
0.9% pkg/vmcp/core/core_calls.go

Coverage Regressions

Lines Coverage ∆ File
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
2
96.05
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 30272583615.1 27 Jul 2026 02:02PM UTC 841
69.66
GitHub Action Run
Source Files on build 30272583615
  • Tree
  • List 841
  • Changed 12
  • Source Changed 8
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30272583615
  • 83394ee5 on github
  • Prev Build on main (#30271716798)
  • Next Build on main (#30272603807)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc