Skip to content

feat(cli): add MCP server for AI agent integration#112

Merged
Marve10s merged 12 commits intomainfrom
feat/mcp-server
Apr 2, 2026
Merged

feat(cli): add MCP server for AI agent integration#112
Marve10s merged 12 commits intomainfrom
feat/mcp-server

Conversation

@Marve10s
Copy link
Copy Markdown
Owner

@Marve10s Marve10s commented Apr 1, 2026

Summary

  • Adds an MCP (Model Context Protocol) server to the CLI, enabling AI agents (Claude Code, Cursor, VS Code Copilot, etc.) to scaffold and modify Better-Fullstack projects programmatically
  • Includes feature roadmap docs covering ecosystem expansion plans for Rust, Go, Python, TypeScript, and competitive analysis

MCP Server

7 tools:

Tool Purpose
bfs_get_guidance Returns workflow rules, field semantics, constraints for agents
bfs_get_schema Returns valid options for any/all categories
bfs_check_compatibility Validates stack combinations, returns auto-adjustments
bfs_plan_project Dry-run: generates in-memory, returns file tree preview
bfs_create_project Scaffolds project to disk (install always skipped)
bfs_plan_addition Validates proposed addons for existing projects
bfs_add_feature Adds addons to existing projects

3 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 mcp

Docs

New planned feature docs in docs/plans/planned/:

  • Rust/Go/Python ecosystem expansion (frameworks, ORMs, auth, GraphQL, etc.)
  • TypeScript new categories (GraphQL, i18n, rate limiting, desktop, PWA)
  • TypeScript category expansion (search, CMS, deploy, observability)
  • Platform features (MCP, add command, cross-ecosystem stacks)
  • Competitive analysis vs better-t-stack

Test plan

  • Build succeeds (bun run --filter=create-better-fullstack build)
  • tools/list returns all 7 tools with correct schemas
  • bfs_get_schema returns valid options (tested with database category)
  • bfs_check_compatibility detects invalid combos (tRPC + svelte → auto-adjusts)
  • bfs_plan_project generates 55 files in-memory without writing to disk
  • bfs_create_project scaffolds 54 files to disk with bts.jsonc
  • resources/list returns 3 resources
  • --help shows mcp subcommand
  • Register with Claude Code and test live agent scaffolding

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
better-fullstack-web Ignored Ignored Preview Apr 2, 2026 4:47pm

@Marve10s

This comment was marked as resolved.

Marve10s added 6 commits April 2, 2026 16:01
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
Marve10s and others added 4 commits April 2, 2026 16:08
…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.
@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Apr 2, 2026
@github-actions github-actions bot added the size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). label Apr 2, 2026
@Marve10s Marve10s merged commit f93fd19 into main Apr 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant