Skip to content

fix(remotecontrol): register HTTP transport for the DevServer Host's MCP server (backport #24196) - #25758

Merged
agneszitte merged 1 commit into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-24196
Oct 27, 2026
Merged

agneszitte merged 1 commit into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-24196

Conversation

@mergify

@mergify mergify Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #24195.

The DevServer host's /mcp HTTP endpoint (added in afa3154) never actually works: HostHealthTool.Configure() calls AddMcpServer() and registers tools/resources, but never calls .WithHttpTransport(). Startup.cs unconditionally calls endpoints.MapMcp("/mcp"), which throws InvalidOperationException on every request since no HTTP transport was registered — caught and only logged as a warning, so the host keeps running with /mcp silently 404ing.

This one-line fix adds .WithHttpTransport() to the AddMcpServer() chain.

Test plan

  • Built Uno.UI.RemoteControl.Host from this branch (net10.0 slice) and ran it standalone.
  • curl http://localhost:<port>/mcp with a proper initialize request now returns 200 with a valid MCP handshake response, instead of 404.
  • The host no longer logs the Unable to find the MCP Tooling in the environment warning on startup.
  • Verified end-to-end against a real MCP client (Claude Code's Uno App MCP bridge): uno_health now reports status: Healthy, toolCount: 12 (once the Uno.UI.App.Mcp.Server add-in is also passed), issues: [], versus toolCount: 0 / HostMcpEndpointNotAvailable before the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_013hhqdwAeyzFqWJcy44Lyad


This is an automatic backport of pull request #24196 done by Mergify.

…MCP server

HostHealthTool.Configure() calls AddMcpServer() and registers tools/resources,
but never calls WithHttpTransport(). Startup.cs then unconditionally maps
/mcp via endpoints.MapMcp("/mcp"), which throws InvalidOperationException at
every request since no HTTP transport was ever registered for the MCP
server. The exception is caught and only logged as a warning ("Unable to
find the MCP Tooling in the environment, the MCP feature is disabled."), so
the host keeps running but the /mcp endpoint 404s on every request.

This breaks any MCP client that talks to the DevServer host over HTTP,
including IDE/tooling integrations that rely on uno_health and friends.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013hhqdwAeyzFqWJcy44Lyad
(cherry picked from commit 555d6c6)
@agneszitte
agneszitte merged commit 2af1a86 into release/stable/6.7 Oct 27, 2026
12 of 17 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.7/pr-24196 branch October 27, 2026 22:37
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