Skip to content

mcp: stdio MCP server wrapping dispatch() as generate_app tool#60

Merged
dadachi merged 1 commit into
mainfrom
mcp-server-surface
May 8, 2026
Merged

mcp: stdio MCP server wrapping dispatch() as generate_app tool#60
dadachi merged 1 commit into
mainfrom
mcp-server-surface

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented May 8, 2026

Summary

  • Add src/mcp.ts — stdio MCP server exposing dispatch() as a single generate_app tool. Same backend as the CLI; different wire format. Phase 2 distribution surface per docs-private/MONETIZATION.md §"MCP as a distribution surface".
  • Register a second bin nativeapptemplate-agent-mcp so MCP clients (Claude Code, Cursor, Cline, Continue, Goose, …) can wire it up via npx -y nativeapptemplate-agent-mcp. Promotes @modelcontextprotocol/sdk and zod from transitive to direct deps so the bin keeps working after publish.
  • New smoke test pairs an in-memory MCP client with createMcpServer() and routes tools/call generate_app through the stub dispatch end-to-end.

Streaming progress is intentionally deferred — dispatch() doesn't emit events yet, and that's a separate task.

Test plan

  • npm run ci — 20/20 tests green, including the new MCP roundtrip
  • Real stdio smoke against compiled dist/mcp.jsinitialize + tools/list return correct serverInfo and the generate_app schema
  • (post-publish) Wire npx -y nativeapptemplate-agent-mcp into a Claude Code .mcp.json and run generate_app against a stub spec from a real MCP client

🤖 Generated with Claude Code

Phase 2 distribution surface from MONETIZATION.md — same dispatch() core,
exposed over stdio so any MCP-compatible AI assistant (Claude Code, Cursor,
Cline, Continue, Goose, ...) can invoke the agent without the user dropping
to a terminal.

Ships as a second bin (nativeapptemplate-agent-mcp) so MCP clients can wire
it up via `npx -y nativeapptemplate-agent-mcp`. Promotes the previously
transitive @modelcontextprotocol/sdk and zod to direct deps so the bin
keeps working after publish.

Streaming progress is intentionally deferred — dispatch() doesn't emit
events yet, and adding that is a separate task.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 09c732f into main May 8, 2026
1 check passed
@dadachi dadachi deleted the mcp-server-surface branch May 8, 2026 11:51
dadachi added a commit that referenced this pull request May 24, 2026
…erred (#99)

The Claude Code plugin was named as a packaging surface across SPEC, ROADMAP,
README, and CLAUDE.md but never built, while the MCP server (PR #60) shipped
and isn't a like-for-like replacement (wider reach, but today a single
generate_app tool). Align all four docs on one story:

- Shipped surfaces: CLI (primary) + `nativeapptemplate-agent-mcp` (multiplier).
- Plugin → ROADMAP Post-v0.1 backlog, gated on streaming out of dispatch() +
  an orchestration skill (chain mobile-mcp walkthrough + validation), since
  against the single-tool MCP a plugin is a thin wrapper.
- SPEC §8 historical prose left frozen per the doc's own convention; the
  addendum now corrects the record.
- MONETIZATION.md already aligned (leans on MCP, silent on plugin) — unchanged.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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