Client recipes

VS Code with Stable Baseline.

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

Quickest path · Have your AI agent do it

Already have Copilot Chat (or Roo Code / Cline) open in agent mode? Paste the prompt below into the chat. The agent runs the device-code signup against Stable Baseline's anonymous-callable endpoint, shows you a 6-character code to authorise in your browser, then writes .vscode/mcp.json with the resulting API key. You never copy a key by hand.

One block, paste-and-go

The prompt is self-contained. Click the copy button on the code block, paste into Copilot Chat, and follow the agent's lead. Total time: about a minute, including the browser round-trip.
Paste this into Copilot Chat (agent mode)prompt
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": "VS Code Copilot", "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. Write .vscode/mcp.json in the workspace root:
   {"servers": {"sb": {"type": "http", "url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp", "headers": {"Authorization": "Bearer <YOUR_KEY>"}}}}

4. Tell me to reload the MCP server (Cmd/Ctrl+Shift+P → "MCP: Reload Server" or restart VS Code). Then ask what I want to do next.

Once the agent finishes step 4 and you reload, ask Copilot Chat anything that benefits from Stable Baseline tools, for example “list my Stable Baseline workspaces” to verify the connection, or jump straight to “document this codebase”.

Prefer the manual install? Skip below

The two paths below (the one-click install button and editing .vscode/mcp.json by hand) both still work. They just require you to mint an API key on the website first. Use them if you don't have an MCP-capable agent available, or if you prefer secure-credential-store storage from the get-go.

Step 1 · Install in VS Code (manual alternative)

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 (shown once only)

Copy it now

The full API key is only displayed once when you create it. Store it safely. 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 of 180

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