Client recipes

Cursor with Stable Baseline.

Connect Cursor to Stable Baseline and get your entire codebase documented — architecture, schemas, security, business context — in one prompt. One-click deeplink install, OAuth 2.1, or manual JSON — all supported.

Step 1 · Install in Cursor

Click the button below and Cursor opens a confirmation panel with the Stable Baseline server pre-filled. The deeplink install uses OAuth by default — you'll be prompted to authorise in your browser on first use, and no API key ends up in the config file.

One-click install

Opens Cursor with the Stable Baseline server pre-configured. Uses OAuth — no API key needed.

Add Stable Baseline MCP server to Cursor

Requires Cursor 0.48+. You'll be prompted to authorise in your browser on first use.

Step 2 · Create your API key (if needed)

If you'd rather bypass OAuth and use a long-lived key, create one first:

  • Sign in to app.stablebaseline.io and open your project
  • Open Project SettingsMCP Setup → API Keys
  • Click Create API Key, name it (e.g. “Cursor — 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.

Or configure manually

Prefer editing files directly? Create .cursor/mcp.json in your project root. Two shapes are supported — pick whichever suits your auth model.

Using an API key (recommended)

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

Don't have an API key yet?

Go to your Stable Baseline organisation → Settings → MCP Setup → API Keys and create one. Full setup guide →

Using OAuth 2.1 (alternative)

If your organisation uses OAuth, Cursor supports the MCP Authorization spec via its public client (PKCE) flow. Just the URL — no key, no secrets on disk:

.cursor/mcp.json (OAuth)json
{
  "mcpServers": {
    "sb": {
      "url": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp"
    }
  }
}

Cursor discovers the OAuth endpoints automatically via the Protected Resource Metadata spec (RFC 9728). No manual OAuth configuration required.

Project vs global config

ScopeFile locationWhen to use
Project (recommended).cursor/mcp.jsonTeam repos — commit to git, everyone gets it
Global~/.cursor/mcp.jsonPersonal setup across all projects

We recommend project-level config so every teammate picks up Stable Baseline automatically when they clone the repo.

Step 3 · Run setup

Open Cursor's Agent mode (⌘I / Ctrl+I) and paste the setup prompt. That's it — the agent handles everything from here.

Cursor Agentprompt
Run the sb-setup prompt from the sb server

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 app.stablebaseline.io to create them and waits for you
  • Creates .sb/config.json — Caches your workspace and project IDs locally
  • Checks for existing documentation — If the project already has docs, it shows you what's there and asks whether to augment, replace, or cancel
  • Analyses your repository — Tech stack, architecture, directory structure, dependencies, security model, infrastructure, domain context
  • Designs a bespoke documentation structure — No fixed template. Tailored to your repo's natural boundaries — by service, by domain, by layer, whatever fits
  • Creates the documentation in Stable Baseline — Real content with diagrams, not stubs
  • Generates AGENTS.md — A cross-IDE auto-sync rule file at your repo root
  • Provides a summary — Tree view of everything created, with next steps

If anything goes wrong at the connection or workspace steps, the agent stops, tells you exactly what to do, and waits for you to type continue after you've fixed it. No need to start over.

What gets documented

The agent doesn't follow a checklist. It reads your code and documents what matters for this repo. Areas it considers:

  • Technical standards & coding patterns — how code should be written in this stack
  • Architectural patterns — system design, component relationships, data flows, API contracts
  • Security patterns — auth flows, authorisation, data protection, secrets management
  • Operational & maintenance — deployment, monitoring, incident response, runbooks
  • Compliance & governance — regulatory requirements, audit trails, data retention
  • Business context — business rules, domain models, stakeholder requirements
  • Drift prevention — the “why” behind decisions so future developers don't deviate

How auto-sync works

The AGENTS.md file generated in step 3 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 Cursor's agent changes files matching a pattern, it knows which Stable Baseline document 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 Cursor, VS Code Copilot, 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/
├── .cursor/
│   └── 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 in mcp.json is scoped to your team's workspace — or use OAuth to avoid committing secrets entirely. Add .sb/ to .gitignore if you prefer to keep IDs local.

Try it

Your baseline docs are ready. Here are prompts worth pasting next:

Generate an ERD diagram from my database schema and add it to my docs.

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 my infrastructure doc.

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

Regenerate documentation

Need to start fresh? Ask Cursor's agent:

Cursor Agentprompt
Delete all existing folders and documents in my Stable Baseline project,
then run the sb-setup prompt from the sb server to regenerate everything from scratch.

Destructive action

This deletes all existing documents and folders in your Stable Baseline project. Document version history will be lost.