Commit f93fd19
authored
feat(cli): add MCP server for AI agent integration (#112)
* feat(cli): add MCP server for AI agent integration
Expose the CLI as an MCP (Model Context Protocol) server so AI agents
(Claude Code, Cursor, VS Code, etc.) can scaffold and modify projects
programmatically via stdio transport.
7 tools: bfs_get_guidance, bfs_get_schema, bfs_check_compatibility,
bfs_plan_project, bfs_create_project, bfs_plan_addition, bfs_add_feature
3 resources: compatibility-rules, stack-options, getting-started
Usage: create-better-fullstack mcp
Register: claude mcp add --transport stdio better-fullstack -- npx create-better-fullstack mcp
* docs: add feature roadmap and competitive analysis
Detailed expansion plans for Rust, Go, Python, TypeScript ecosystems,
new categories (GraphQL, i18n, rate limiting, desktop), platform features
(MCP server, add command, cross-ecosystem stacks), and competitive
analysis vs better-t-stack.
* fix(templates): Kysely empty Database interface and Drizzle missing NextAuth export
Kysely: when auth != better-auth, the Database interface was empty,
making the entire DB layer non-functional. Now generates an ExampleTable
as a starter schema.
Drizzle: barrel file only exported auth schema for better-auth but not
NextAuth, which also generates Drizzle schema files. Added NextAuth to
the conditional export.
* fix(cli): propagate addon setup warnings instead of silent failures
setupAddons() now returns a warnings array. addHandler() includes
warnings in AddResult so callers (including MCP) know when MCP/Skills
addon setup failed. Previously returned success: true with no indication
of failure.
* fix(templates): trailing newlines, tab-to-space in payments, prompt text
- Add trailing newlines to 52 .hbs template files (POSIX compliance)
- Convert tabs to 2-space indent in 4 payment TypeScript templates
- Change "Choose web" prompt to "Select web framework"
- Add codebase issues tracking doc
* fix(mcp): address code review issues from PR #112
- Prevent path traversal in bfs_create_project by calling sanitizePath
and rejecting '..' path components
- Fix mcp --help hang by only intercepting bare 'mcp' subcommand
- Run setupAddons after writing files in bfs_create_project
- Add missing types field to ./mcp package.json export
- Fix misleading self-* notation in COMPATIBILITY_RULES_MD
- Fix summarizeTree type mismatch with VirtualFileTree
* fix: update template snapshots to match current templates
* ci: retrigger CI
* fix(mcp): unify plan/create config defaults via shared buildProjectConfig
bfs_plan_project used createVirtual which had different defaults (api=trpc,
uiLibrary=shadcn-ui, testing=vitest, etc.) than bfs_create_project (all
"none"). This caused plan previews to show more files than create would
actually generate.
Extract buildProjectConfig() as single source of truth for both tools,
and share the Zod schema via planCreateSchema.1 parent c6920e5 commit f93fd19
78 files changed
Lines changed: 2858 additions & 508 deletions
File tree
- apps/cli
- src
- helpers
- addons
- core
- prompts
- test/__snapshots__
- docs/plans/planned
- packages/template-generator/templates
- addons/ruler/.ruler
- api
- orpc
- fullstack
- next/src/app/api/rpc/[[...rest]]
- tanstack-start/src/routes/api/rpc
- server
- trpc/server
- auth
- better-auth
- convex/web/react
- tanstack-router/src/lib
- tanstack-start/src/lib
- native
- bare
- app/(drawer)
- components
- uniwind
- app/(drawer)
- components
- server/base
- src
- web/react/tanstack-start/src
- functions
- routes
- clerk/convex/web/react/tanstack-start/src
- db-setup/docker-compose
- mongodb
- mysql
- postgres
- db
- base
- drizzle
- base/src/schema
- postgres/src
- kysely/base/src/schema
- prisma
- mysql
- prisma/schema
- src
- postgres/src
- sqlite
- src
- examples/ai/web/nuxt/app/pages
- extras
- frontend
- native
- bare/app
- (drawer)
- unistyles/app/(drawer)
- uniwind
- app
- (drawer)
- react
- react-router
- tanstack-router
- tanstack-start
- solid
- packages
- config
- env
- src
- payments
- lemon-squeezy/server/base/src/lib
- paddle/server/base/src/lib
- polar/server/base/src/lib
- stripe/server/base/src/lib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
103 | 112 | | |
| 113 | + | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments