Skip to content

Add MCP Apps UI support to Repl.Mcp#20

Merged
carldebilly merged 5 commits intomainfrom
dev/cdb/mcp-apps
Apr 7, 2026
Merged

Add MCP Apps UI support to Repl.Mcp#20
carldebilly merged 5 commits intomainfrom
dev/cdb/mcp-apps

Conversation

@carldebilly
Copy link
Copy Markdown
Member

@carldebilly carldebilly commented Apr 7, 2026

Summary

This PR adds MCP Apps support to Repl.Mcp, allowing a Repl command to open a host-rendered HTML UI from the same MCP server that already exposes tools, resources, and prompts.

This makes it possible for an MCP client that supports MCP Apps to show a small dashboard, viewer, form, or app surface directly from a Repl command, while clients without MCP Apps support still receive a normal text fallback instead of raw HTML.

What this enables

  • A command can act as both the MCP Apps launcher and the UI resource.
  • The UI can be generated by a normal Repl handler with .AsMcpAppResource().
  • The UI handler can use dependency injection and the regular Repl pipeline.
  • Generated UI resources can receive route parameters, including parameters from nested contexts.
  • Tool calls return launcher text, while resource reads return the generated HTML.
  • Hosts that support display modes can receive a display preference, while hosts that only support inline rendering still work.

The sample MCP server now includes a minimal contacts dashboard to demonstrate the intended pattern without introducing a large frontend app yet.

Documentation

The documentation has been updated to make MCP Apps a featured capability:

  • root README
  • Repl.Mcp README
  • MCP server guide
  • MCP advanced guide
  • best practices
  • comparison matrix
  • architecture notes
  • glossary
  • sample documentation

The docs also call out that MCP Apps support is experimental in this version: UI handlers currently return generated HTML as string, Task<string>, or ValueTask<string>, and rendering/display modes remain host-dependent.

Validation

  • dotnet test --project src\Repl.McpTests\Repl.McpTests.csproj
    • Passed: 128/128
  • dotnet build samples\08-mcp-server\McpServerSample.csproj --output artifacts\verify\08-mcp-server
    • Passed
  • git diff --check
    • Passed

github-code-quality[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

github-code-quality[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@carldebilly carldebilly merged commit b4e09f8 into main Apr 7, 2026
12 checks passed
@carldebilly carldebilly deleted the dev/cdb/mcp-apps branch April 7, 2026 04:38
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.

1 participant