feat(plugins): map portable Agent Plugins streamable-http entries into the native MCP runtime
Agent Plugins v1 packages with 'streamable-http' mcp.json entries now load through Hermes' existing URL-based MCP client instead of being reported and skipped. The stdio-only limitation was the agreed follow-up slice from PR #81196. Boundary rules from the v1 spec (§7.2.1) are enforced: - URL must be absolute http(s), no user information, no fragment; plain HTTP only for localhost/loopback hosts. - Configured package headers are never forwarded across a cross-origin redirect: translation marks entries strict_redirect_headers, and the redirect hook in the native runtime strips those headers (plus Authorization) whenever a redirect leaves the original origin. On mcp < 1.24.0, where the client cannot hook redirects, such servers fail closed with an actionable upgrade message. - Legacy 'sse' entries remain reported and skipped. The redirect hook is extracted into a testable module-level factory (_make_redirect_header_stripper); default behavior for native config servers is unchanged (Authorization-only stripping).
This commit is contained in:
@@ -85,10 +85,14 @@ profile-scoped writable directory managed by Hermes.
|
||||
Values declared in portable MCP `env` are visible package data, not a secret
|
||||
storage mechanism. Do not place credentials in `mcp.json`.
|
||||
|
||||
The current portable subset supports stdio MCP only. Portable Streamable HTTP
|
||||
and legacy SSE entries are reported and skipped because the native remote
|
||||
client does not yet prove the v1 configured-header redirect boundary end to
|
||||
end. Agent Plugins v1 does not define trust, permissions, provenance, or a
|
||||
The current portable subset supports stdio and Streamable HTTP MCP entries.
|
||||
Portable `streamable-http` entries are routed through Hermes' existing native
|
||||
remote MCP client (the same runtime that powers URL-based `mcp_servers`
|
||||
config), with the v1 boundary rules enforced: the URL must be absolute
|
||||
http(s) with no user information or fragment, plain HTTP is accepted only
|
||||
for `localhost`/loopback hosts, and configured headers are never forwarded
|
||||
across a cross-origin redirect. Legacy `sse` entries are reported and
|
||||
skipped. Agent Plugins v1 does not define trust, permissions, provenance, or a
|
||||
sandbox. Enabling a package grants its instructions and local executable the
|
||||
same full-trust posture as other installed Hermes plugins.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user