Client recipes

Any MCP client works here.

Set up Stable Baseline's MCP server in any IDE or AI agent that supports the Model Context Protocol. The same Streamable-HTTP endpoint, expressed in whichever config shape your client happens to expect.

Have a specific client?

We have dedicated guides for Cursor, VS Code, Windsurf, OpenCode, Claude Code, Warp, OpenAI Codex, and Antigravity.

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 · Server details

Every client needs the same four pieces of information. Whichever config shape yours uses, the underlying values are identical:

FieldValue
Server namesb
TransportStreamable HTTP
Endpoint URLhttps://api.stablebaseline.io/functions/v1/cloud-serve/mcp
Auth headerAuthorization: Bearer YOUR_API_KEY

Step 2 · Pick the format your client expects

Configuration formats in MCP land have diverged a little. Pick whichever matches your client — or use the stdio bridge at the bottom if yours doesn't speak HTTP at all.

Format A · JSON with mcpServers

Used by Cursor, Warp, Antigravity, and Claude Desktop.

mcp.jsonjson
{
  "mcpServers": {
    "sb": {
      "url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Format B · JSON with servers

Used by VS Code with GitHub Copilot.

.vscode/mcp.jsonjson
{
  "servers": {
    "sb": {
      "type": "http",
      "url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Format C · JSON with serverUrl

Used by Windsurf. Note the serverUrl key — this is the single difference from Format A.

mcp_config.jsonjson
{
  "mcpServers": {
    "sb": {
      "serverUrl": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Format D · TOML

Used by OpenAI Codex.

config.tomltoml
[mcp_servers.sb]
url = "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp"
bearer_token_env_var = "STABLE_BASELINE_API_KEY"
http_headers = {}
enabled = true

Format E · Claude Code CLI

Terminalbash
claude mcp add sb \
  --transport http \
  --url "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp" \
  --header "Authorization: Bearer YOUR_API_KEY"

Format F · OpenCode YAML

opencode.yamlyaml
mcp:
  sb:
    type: remote
    url: https://api.stablebaseline.io/functions/v1/cloud-serve/mcp
    headers:
      Authorization: Bearer YOUR_API_KEY

Format G · stdio bridge fallback

If your client only supports stdio MCP servers, use the mcp-remote npm package as a bridge:

mcp.jsonjson
{
  "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

The stdio bridge requires Node.js. The mcp-remote package is downloaded automatically via npx. Replace YOUR_API_KEY with your actual Stable Baseline API key.

Step 3 · Generate your documentation

Once the MCP server is connected, open your client's AI chat or agent and type:

Agentprompt
Run the sb-setup prompt from the sb server

The 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'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, 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 your AI agent when to update documentation:

File patternDocumentation impactAction
src/components/**UI components and patternsUpdate "Frontend Patterns"
src/lib/api/**API client and integrationsUpdate "API & Integrations"
supabase/migrations/**Database schema changesUpdate "Data Model"
src/hooks/**Custom hooks and state logicUpdate "Frontend Patterns"

Whenever your AI agent modifies files matching these patterns, it automatically updates the corresponding Stable Baseline documentation via the sb-sync prompt.

File structure

text
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 Config

This is an example. Your actual structure will be tailored to your specific project.

Keep docs updated mid-conversation

After making significant changes during a coding session — architectural decisions, new features, schema changes, key refactors — your agent will typically automatically propose updates to your documentation via the sb-update prompt based on the rules in your AGENTS.md file. Wait for the agent to finish its current coding step and it will often follow up by running sb-update on its own.

You can also manually capture everything in your documentation without leaving the conversation:

Agentprompt
Run the sb-update prompt

The sb-update prompt scans the current conversation context, identifies what changed, maps changes to existing documents, and applies targeted patches.

No description needed

You don't need to describe what changed when running manually — sb-update infers it from your conversation history.

Try it

Once setup is complete, try these prompts in your 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:

Agentprompt
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.

MCP compatibility

Stable Baseline's MCP server uses the Streamable HTTP transport and supports:

FeatureSupported
ToolsFull tool suite for documents, diagrams, images, data files
Prompts8 built-in prompts (sb-setup, sb-update, etc.)
ResourcesServer info, CDMD guide, diagram types, project hierarchy
AuthAPI key (Bearer token) or OAuth 2.1
TransportStreamable HTTP (with SSE fallback)

Other prompts available

PromptDescription
sb-setupFull project onboarding — scans codebase, creates docs, configures auto-sync
sb-syncSync AGENTS.md rules — augments existing content, never removes
sb-updateUpdate documentation mid-conversation — captures decisions, changes, and knowledge
sb-create-docCreate a new document in Stable Baseline
sb-create-diagramCreate a diagram (Mermaid, PlantUML, BPMN, GraphViz, etc.)
sb-edit-docEdit an existing document with targeted patches
sb-manage-imagesUpload, update, or delete images in documents
sb-manage-dataManage data files for Vega/Vega-Lite statistical visualisations