feat(cli): add MCP server for AI agent integration#112
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This comment was marked as resolved.
This comment was marked as resolved.
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
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.
…extAuth 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.
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.
- 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
- 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
7400c98 to
344848d
Compare
…nfig 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MCP Server
7 tools:
bfs_get_guidancebfs_get_schemabfs_check_compatibilitybfs_plan_projectbfs_create_projectbfs_plan_additionbfs_add_feature3 resources: compatibility-rules, stack-options, getting-started guide
Usage:
create-better-fullstack mcp # Register with Claude Code claude mcp add --transport stdio better-fullstack -- npx create-better-fullstack mcpDocs
New planned feature docs in
docs/plans/planned/:addcommand, cross-ecosystem stacks)Test plan
bun run --filter=create-better-fullstack build)tools/listreturns all 7 tools with correct schemasbfs_get_schemareturns valid options (tested withdatabasecategory)bfs_check_compatibilitydetects invalid combos (tRPC + svelte → auto-adjusts)bfs_plan_projectgenerates 55 files in-memory without writing to diskbfs_create_projectscaffolds 54 files to disk withbts.jsoncresources/listreturns 3 resources--helpshowsmcpsubcommand