modelcontextprotocol / modelcontextprotocol/csharp-sdk
MCP Apps: Add ergonomic WithAppTool helper to reduce wiring boilerplate
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Description
From PR #1484 review comment by @halter73:
Ergonomics suggestion (worth considering as a follow-up): the TypeScript
@modelcontextprotocol/ext-appspackage exposes aregisterAppTool(...)helper that bundles tool registration + UI resource linkage in one call. Today a C# user has to doWithTools<T>()+WithResources<T>()+WithMcpApps()+[McpServerTool]+[McpAppUi]+ a matching[McpServerResource]with the right MIME type. A combinedWithAppTool(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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the review discussion in PR #1484 and tracing the current WithTools(), WithResources(), WithMcpApps(), [McpServerTool], [McpAppUi], and [McpServerResource] usage. Compare the TypeScript registerAppTool(...) pattern, then clarify whether the desired outcome is a C# WithAppTool overload or an end-to-end documentation recipe. Done means the chosen approach removes or clearly documents the repeated tool and UI-resource wiring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, typescript
- Domain
- api, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100