feat: mcp+CLI agent references #25
Draft
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.
What kind of change does this PR introduce?
Adds MCP and CLI tooling references to the existing Supabase skill.
What is the current behavior?
The Supabase skill has references for database concepts (RLS, schema design, migrations, performance) but lacks guidance on tooling. Agents don't know:
What is the new behavior?
The skill now provides comprehensive tooling guidance:
MCP Setup - Configuration references for connecting to local, hosted, and self-hosted MCP servers, including security considerations and available feature groups.
CLI Command References - LLM-friendly documentation for all major CLI commands grouped by category (project, database, migrations, functions, secrets, generation). Each group includes command syntax, flags, and comparison with equivalent MCP tools.
Combined Workflows - Patterns showing how MCP and CLI work together. For example, local development uses CLI for stack management, MCP for rapid iteration (no migration files cluttering history), and CLI to capture the final state.
Tool Selection Framework - Clear guidance on when to prefer MCP (remote operations, no setup needed) vs CLI (local-only operations, file generation).
Decisions
Key architectural and content decisions made during development:
MCP first, CLI fallback: Agents should prefer MCP tools when connected because they require no link setup. CLI is used for local-only operations (start/stop/reset) and as fallback when MCP is unavailable.
Grouped CLI files instead of individual: Organized 18+ CLI commands into 6 category files (project, database, migrations, functions, secrets, generation) rather than one file per command. Reduces context overhead while maintaining discoverability.
CLI needs descriptions, MCP doesn't: MCP tools are self-describing via the server connection - agents receive tool schemas automatically. CLI commands have no such mechanism, so they need LLM-friendly documentation in the skill.
Workflow-focused combined references: Rather than documenting MCP and CLI separately, created workflow patterns showing them working together (local dev, migration creation, type generation, function development).
Additional context
Sources consulted:
mcp__supabase__search_docsIncludes a
decision-guide.mdwith instructions on which command to choose depending on the workflow and acommon-pitfallfile with common mistakes that agents make with Supabase CLI (Thanks @jorgoose for the suggestion - #26)