Workflows
VS Code
Set up Stable Baseline's MCP server in Visual Studio Code with GitHub Copilot to automatically generate and maintain living documentation for your codebase.
What You'll Get
MCP Tools
Full access to Stable Baseline's documentation tools directly in GitHub Copilot Chat
Bespoke Documentation
AI-generated docs tailored to your specific codebase and architecture
AGENTS.md Integration
Auto-sync rules injected into your AGENTS.md so Copilot keeps docs updated
Project Configuration
Workspace, project, and folder structure created in Stable Baseline automatically
Step 1: Add the MCP Server
Before you begin, you'll need a Stable Baseline API key. Visit the MCP Setup Guide to create one from your workspace settings.
One-Click Install (Recommended)
When clicked, VS Code will prompt you to add the server and ask for your API key securely on first use.
Manual Setup (Alternative)
If you prefer manual configuration, create a .vscode/mcp.json file in your project root:
{
"inputs": [
{
"type": "promptString",
"id": "sb-api-key",
"description": "Stable Baseline API Key",
"password": true
}
],
"servers": {
"stablebaseline-mcp": {
"type": "http",
"url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
"headers": {
"Authorization": "Bearer ${input:sb-api-key}"
}
}
}
}How VS Code handles credentials: The inputs array defines a secure prompt. The actual API key is never written to the config file — VS Code resolves ${input:sb-api-key} at runtime.
Tip: You can commit this file to source control. Each team member will be prompted for their own key.
After saving, verify the connection in the Output panel (select "GitHub Copilot Chat - MCP" from the dropdown).
Step 2: Generate Your Documentation
Once the MCP server is connected, open GitHub Copilot Chat (Ctrl+Alt+I / Cmd+Alt+I) and type:
/mcp.stablebaseline-mcp.sb-setup
Note: VS Code / Roo Code uses slash commands to invoke MCP prompts directly.
What it does
The sb-setup prompt runs a 9-step process:
- Verifies MCP Connection — Confirms the Stable Baseline server is reachable and authenticated
- Resolves Workspace & Project — Finds or creates your Stable Baseline workspace and project
- Scans Your Codebase — Analyzes project structure, tech stack, dependencies, and architecture
- Checks for Existing Docs — Detects if documentation already exists in Stable Baseline and offers to augment, replace, or cancel
- Creates Folder Structure — Organizes documentation into logical folders matching your codebase
- Generates Documents — Writes comprehensive docs for each area of your codebase
- Adds Diagrams — Creates architecture and flow diagrams using Mermaid, PlantUML, or other supported formats
- Configures AGENTS.md — Adds auto-sync rules to your project's AGENTS.md file (augments existing content — never removes what's already there)
- Summary & Next Steps — Provides a summary of everything created with links to view in Stable Baseline
What Gets Documented
Architecture
High-level system design, component relationships, data flow
API & Integrations
Endpoints, external services, authentication flows
Data Model
Database schemas, relationships, migrations
Frontend
Component hierarchy, state management, routing
Backend
Server logic, middleware, business rules
DevOps
Build pipeline, deployment, environment configuration
Auth & Identity
Authentication, authorization, user management
The exact documentation structure is determined dynamically based on your codebase. No two projects get the same output.
How Auto-Sync Works
After setup, your AGENTS.md file will contain rules that tell GitHub Copilot when to update documentation.
| File Pattern | Documentation Impact | Action |
|---|---|---|
| src/components/** | UI components and patterns | Update "Frontend Patterns" |
| src/lib/api/** | API client and integrations | Update "API & Integrations" |
| supabase/migrations/** | Database schema changes | Update "Data Model" |
| src/hooks/** | Custom hooks and state logic | Update "Frontend Patterns" |
Whenever Copilot modifies files matching these patterns, it will automatically update the corresponding Stable Baseline documentation using the sb-sync prompt.
File Structure
Your Stable Baseline Project
├── Architecture/
│ ├── High Level Overview
│ └── System Architecture Diagram
├── Frontend/
│ ├── Component Hierarchy
│ ├── State Management
│ └── Routing & Navigation
├── Backend/
│ ├── API Endpoints
│ ├── Business Logic
│ └── Middleware & Auth
├── Data Model/
│ ├── Database Schema
│ └── Entity Relationships
└── DevOps/
├── Build & Deploy
└── Environment ConfigThis is an example. Your actual structure will be tailored to your specific project.
Try It
Once setup is complete, try these example prompts in GitHub Copilot Chat:
"Document the authentication flow in our API"
"Add a sequence diagram showing the checkout process"
"Update the database schema docs after the latest migration"
"Create a new doc explaining our caching strategy"
Regenerate Documentation
To regenerate your entire documentation from scratch:
/mcp.stablebaseline-mcp.sb-setup
The setup process will detect existing documentation and ask whether you want to augment (add to existing), replace (start fresh), or cancel.
Team Setup
VS Code's MCP configuration is workspace-level by default. To share the Stable Baseline setup with your team:
- Commit the
.vscode/mcp.jsonfile to your repository - Each team member will be prompted for their own API key on first use (thanks to
${input:sb-api-key}) - No secrets are ever stored in the config file
Other Prompts Available
| Prompt | Description |
|---|---|
| sb-setup | Full project onboarding — scans codebase, creates docs, configures auto-sync |
| sb-sync | Sync AGENTS.md rules — augments existing content, never removes |
| sb-create-doc | Create a new document in Stable Baseline |
| sb-create-diagram | Create a diagram (Mermaid, PlantUML, BPMN, GraphViz, etc.) |
| sb-edit-doc | Edit an existing document with targeted patches |
| sb-manage-images | Upload, update, or delete images in documents |
| sb-manage-data | Manage data files for Vega/Vega-Lite statistical visualizations |