Skip to content

MCP Apps: Add ergonomic WithAppTool helper to reduce wiring boilerplate #1607

@mikekistler

Description

@mikekistler

From PR #1484 review comment by @halter73:

Ergonomics suggestion (worth considering as a follow-up): the TypeScript @modelcontextprotocol/ext-apps package exposes a registerAppTool(...) helper that bundles tool registration + UI resource linkage in one call. Today a C# user has to do WithTools<T>() + WithResources<T>() + WithMcpApps() + [McpServerTool] + [McpAppUi] + a matching [McpServerResource] with the right MIME type. A combined WithAppTool(method, resourceUri, htmlFactory) overload — or at least a doc section showing the "complete recipe" end-to-end — would cut the wiring boilerplate significantly.

Consider adding a combined helper (e.g. WithAppTool) that bundles tool registration + UI resource linkage into a single call, similar to the TypeScript SDK's registerAppTool(...) pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions