Client recipes

VS Code with Stable Baseline.

Connect VS Code to Stable Baseline and get your entire codebase documented — architecture, schemas, security, business context — in one prompt. Works with GitHub Copilot Chat, Roo Code, and any VS Code extension that supports MCP.

Step 1 · Install in VS Code

Skip the config file. Click the button below and VS Code opens a confirmation panel with the server pre-filled. It will prompt you for your API key — paste your sta_… key once and it gets stored in the secure credential store, never on disk.

One-click install

Opens VS Code with the Stable Baseline server pre-configured. You'll be prompted for your API key on first use.

Requires VS Code 1.99+ with GitHub Copilot (or another MCP-capable extension like Roo Code or Cline).

Install vs Install in Workspace

VS Code will show both buttons in the confirmation panel. Pick Install in Workspace — it writes .vscode/mcp.json which you can commit so every teammate gets the server automatically. The plain Install button stores it in your personal user settings instead.

Step 2 · Create your API key

If you don't have an API key yet:

  • Sign in to app.stablebaseline.io and open your project
  • Open Project Settings (the gear icon)
  • Navigate to MCP Setup → API Keys
  • Click Create API Key, name it (e.g. “VS Code — Atlas”)
  • Copy the sta_… key — it's shown once

Copy it now

The full API key is only displayed once when you create it. Store it safely — you'll paste it into VS Code's prompt in the next step.

Project-scoped vs organisation-wide keys

Key typeCreated fromAccess
Project-scoped (recommended)Project Settings → MCP SetupOnly that project's workspace and documents
Organisation-wideOrganization Settings → MCP SetupAll workspaces and projects in the org

Project-scoped keys follow least-privilege — each dev project gets its own key, scoped to just that project's workspace. Full API key docs →

Or configure manually

Prefer editing files directly? Create a .vscode/mcp.json in your project root:

.vscode/mcp.jsonjson
{
  "inputs": [
    {
      "type": "promptString",
      "id": "sb-api-key",
      "description": "Stable Baseline API Key",
      "password": true
    }
  ],
  "servers": {
    "sb": {
      "type": "http",
      "url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
      "headers": {
        "Authorization": "Bearer ${input:sb-api-key}"
      }
    }
  }
}

How credentials work

The inputs array defines a secure prompt. VS Code resolves ${input:sb-api-key} at runtime — the actual API key is never written to the config file. You can commit .vscode/mcp.json safely; each teammate is prompted for their own key on first use.

Workspace vs user config

ScopeLocationWhen to use
Workspace (recommended).vscode/mcp.jsonPer-project — commit to git, every teammate gets it automatically
User (global)MCP: Open User ConfigurationApplies to all projects — use if you want Stable Baseline everywhere

Step 3 · Verify the connection

  • Open the Output panel (Ctrl+Shift+U / ⌘+Shift+U)
  • Select MCP: sb from the dropdown (or GitHub Copilot Chat — MCP if using Copilot)
  • Confirm Connection state: Running appears with a tool count in the 60+ range

Not connecting?

Common issues:
  • Wrong API key — Reset via Command Palette: MCP: Reset Cached Inputs, then restart the server
  • Proxy interference — If you have Http: Proxy set in VS Code settings, add api.stablebaseline.io to Http: No Proxy
  • Missing MCP client extension — You need GitHub Copilot, Roo Code, Cline, or another MCP-capable extension installed

Step 4 · Generate your documentation

Open GitHub Copilot Chat (Ctrl+Alt+I / ⌘+Alt+I) and run the setup prompt:

Copilot Chatprompt
/mcp.sb.sb-setup

VS Code asks for prompt parameters (like project_goal) in an input bar at the top — you can type a short goal or press Enter for defaults. Pick either Insert as text or Run as Command and the agent begins onboarding your project.

What sb-setup does, in order

  • Verifies the MCP connection — If it can't connect, it tells you exactly what to fix and waits for you to say “continue”
  • Resolves your workspace & project — If you have multiple, it asks you to pick. If none, it links you to the app
  • Creates .sb/config.json — Caches your workspace and project IDs locally
  • Checks for existing documentation — If docs exist, asks whether to augment, replace, or cancel
  • Analyses your repository — Tech stack, architecture, dependencies, security model, infrastructure, domain context
  • Designs a bespoke documentation structure — No template. Tailored to your repo's natural boundaries
  • Creates the documentation — Real content with diagrams, not stubs
  • Generates AGENTS.md — File-pattern-to-document mappings specific to your codebase
  • Provides a summary — Tree view of everything created, with next steps

How auto-sync works

The AGENTS.md generated in step 4 contains a table mapping your repo's file patterns to Stable Baseline documents:

File patternDocumentation impactAction
src/auth/**Authentication & Authorization doceditDocument
migrations/**Data Model doceditDocument
docker-compose.yml, Dockerfile*Deployment & Infrastructure doceditDocument
openapi.yaml, src/routes/**API Reference doceditDocument

These patterns are specific to your repo. When Copilot's agent changes files matching a pattern, it knows which doc to update — and does so automatically via the MCP tools.

AGENTS.md is cross-IDE

AGENTS.md is the Linux Foundation / Agentic AI Foundation standard. It works in VS Code Copilot, Cursor, Claude Code, OpenCode, Windsurf, Zed, Warp, Roo Code, Aider, and 15+ other tools. Switch IDEs and the auto-sync rules follow.

File structure

text
your-project/
├── .vscode/
│   └── mcp.json          # MCP server config (step 1)
├── .sb/
│   └── config.json       # Project IDs (auto-generated)
├── AGENTS.md             # Cross-IDE auto-sync rules (auto-generated)
└── ...

All files are safe to commit. The API key is never stored in any config file — VS Code resolves it at runtime from its secure credential store. Add .sb/ to .gitignore if you prefer to keep IDs local.

Try it

Once setup has run, here are some prompts worth pasting into Copilot Chat:

Generate an ERD from my database schema and add it to the Data Model doc.

Create a sequence diagram for the authentication flow.

Summarise the key design decisions in this repo and document them.

Add a deployment architecture diagram to the Infrastructure doc.

What documentation is out of date after the changes I just made?

Other prompts available

PromptWhat it does
/mcp.sb.sb-setupFull project onboarding — scans codebase, creates docs, configures auto-sync
/mcp.sb.sb-syncSync AGENTS.md rules — augments existing content, never removes
/mcp.sb.sb-create-docCreate a new document in Stable Baseline
/mcp.sb.sb-create-diagramCreate a diagram (Mermaid, PlantUML, BPMN, GraphViz, …)
/mcp.sb.sb-edit-docEdit a document with targeted patches
/mcp.sb.sb-manage-imagesUpload, update, or delete images in documents
/mcp.sb.sb-manage-dataManage data files for Vega/Vega-Lite charts