Skip to content

Add multi-view app architecture reference for build-mcp-app#973

Open
bryan-anthropic wants to merge 1 commit intoanthropics:add-plugin/mcp-server-devfrom
bryan-anthropic:add-app-architecture-patterns
Open

Add multi-view app architecture reference for build-mcp-app#973
bryan-anthropic wants to merge 1 commit intoanthropics:add-plugin/mcp-server-devfrom
bryan-anthropic:add-app-architecture-patterns

Conversation

@bryan-anthropic
Copy link
Copy Markdown
Contributor

Summary

  • Adds references/app-architecture-patterns.md to the build-mcp-app skill
  • Covers production patterns for multi-view MCP apps (beyond single-purpose widgets)
  • Patterns distilled from building nashville-charts-app, generalized with placeholder examples
  • Adds one line to SKILL.md reference list

Patterns covered

  • Single-resource action dispatch — one HTML resource, all tools route via action field
  • Model context updates — what/when to send via updateModelContext(), graceful degradation
  • Teardown guards — handling post-teardown callback firing with useRef
  • Bidirectional tool calls — component → callServerTool() → parent re-dispatch
  • Build pipeline — Vite single-file HTML + esbuild server two-step build
  • Dual transport — HTTP (stateless) + stdio (persistent) from one server factory
  • Debugging tips — stderr for stdio, extension detection, resource caching
  • Prompt orchestration — prompts as multi-tool workflow choreography

Why

The existing widget-templates.md covers isolated widgets (picker, dialog, progress). Developers building apps with 5+ UI tools, shared state, and framework builds (React/Vue) don't have guidance for the architecture layer above individual widgets. This doc fills that gap.

Files changed

  • plugins/mcp-server-dev/skills/build-mcp-app/references/app-architecture-patterns.md (new, ~12KB)
  • plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md (1 line added to reference list)

🤖 Generated with Claude Code

Adds a reference doc covering production patterns for multi-view MCP apps
that go beyond single-purpose widgets. Patterns distilled from building
nashville-charts-app, generalized with placeholder examples.

Covers: single-resource action dispatch, model context updates, teardown
guards, bidirectional tool calls, Vite+esbuild build pipeline, dual
transport (HTTP+stdio), debugging tips, prompt orchestration.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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