Client recipes
Antigravity with Stable Baseline.
Set up Stable Baseline's MCP server in Antigravity so its AI agent can generate and maintain living documentation for your codebase.
Quickest path · Have Antigravity do it
Already running Antigravity in this repo? Paste the prompt below. The agent runs the device-code signup against Stable Baseline's anonymous-callable REST endpoint, shows you a 6-character code to authorise in your browser, then writes the MCP config with the resulting API key.
One block, paste-and-go
I want to onboard to Stable Baseline using its agent-driven signup. Walk me through end-to-end without stopping in between.
1. POST https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1/tools/startSignup
Body: {"agent_label": "Antigravity", "intent": "mcp_setup"}
Response: {user_code, verification_url, device_code, poll_interval_seconds, ...}
Show me user_code and verification_url. Tell me to open the URL, sign in or sign up, paste the code, click Authorize.
2. Every 5 seconds, POST https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1/tools/pollSignupStatus
Body: {"device_code": "<from step 1>"}
Stop when status is "authorized" — response includes api_key (starts with sta_). If denied or expired, tell me and stop.
3. Add the Stable Baseline MCP server to Antigravity's config (Antigravity Settings → MCP, or the JSON config file Antigravity reads):
{
"mcpServers": {
"sb": {
"url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
"headers": {"Authorization": "Bearer <YOUR_KEY>"}
}
}
}
4. Tell me to reload Antigravity so it picks up the new MCP server. Then ask what I want to do next.Already have a key? Skip below
Before you begin
You'll need a Stable Baseline API key. Visit the MCP setup guide to create one from your workspace settings. Keys are prefixed sta_… and shown only once.
Step 1 · Add the MCP server
- Open the Agent Panel in Antigravity
- Click the … (more) menu
- Select MCP Servers → Manage MCP Servers
- Click Edit configuration to open
mcp_config.json - Add the Stable Baseline server configuration using one of the options below
Option A: remote HTTP (try this first)
{
"mcpServers": {
"sb": {
"url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Option B: via mcp-remote bridge (fallback)
If Option A doesn't work, use the mcp-remote npm package as a stdio bridge:
{
"mcpServers": {
"sb": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Node.js required
mcp-remote package is downloaded automatically via npx.Replace YOUR_API_KEY with your actual Stable Baseline API key in whichever option you use. After saving the configuration, the server should appear in the MCP Servers list with a connected status.
Step 2 · Generate your documentation
Once the MCP server is connected, open Antigravity's AI agent and type:
Run the sb-setup prompt from the sb server
The AI agent walks you through an interactive setup process to generate documentation for your project.
What sb-setup does — the 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 — Analyses 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 — Organises 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'sAGENTS.mdfile (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, authorisation, user management
The exact 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 contains rules that tell Antigravity's AI agent 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 the AI agent modifies files matching these patterns, it automatically updates the corresponding Stable Baseline documentation via 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 prompts in Antigravity's AI agent:
“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:
Run the sb-setup prompt from the sb server
Setup will detect existing documentation and ask whether you want to augment (add to existing), replace (start fresh), or cancel.
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 visualisations |