Recipe

Cursor with Stable Baseline.

Install Stable Baseline in Cursor with one click, sign in from the browser, and ask Cursor's agent to document your repository.

1. Install

Add to Cursor

Opens Cursor with the Stable Baseline server filled in. Cursor then asks you to sign in.

Add to Cursor

Or add it by hand: in .cursor/mcp.json for this project, or ~/.cursor/mcp.json for every project.

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

Cursor shows that the server needs you to sign in; follow it to your browser, sign in to Stable Baseline and choose what Cursor may reach.

Or use an API key

Create one under Organisation settings, Developers, API keys. See Setup. Then refer to it from the config through an environment variable:

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

Keep the key out of your files

Put your API key in the STABLE_BASELINE_API_KEY environment variable or your tool's secret store, and refer to it from the config as shown. Never paste the key itself into a file you commit or share. Signing in with OAuth avoids keys altogether.

2. Document the repository

If Cursor lists Stable Baseline's prompts, run sb-setup. Otherwise ask its agent in plain words:

prompt
Document this repository in my Stable Baseline project. Use the Stable Baseline tools to find my workspace and project (do not create them), read the code, design a structure of folders, documents and diagrams, write them, and add a Stable Baseline section to AGENTS.md so you keep the docs current as the code changes.

Either way, the work follows the same steps:

  1. Checks the connection

    It confirms it can reach Stable Baseline with your key or sign-in.
  2. Finds your workspace and project

    It never creates them: if it cannot find the ones you mean, it asks you to create them in the app first.
  3. Remembers them

    It writes their ids to .sb/config.json, and keeps .sb/ out of git.
  4. Checks for existing docs

    If the project already has documentation, it asks whether to add to it, replace it, or stop.
  5. Reads the repository

    It works through the code to understand what is there.
  6. Designs a structure

    Folders and documents that fit this repository, not a fixed template.
  7. Writes it

    Folders, documents, and the diagrams each document needs.
  8. Updates AGENTS.md

    It adds a Stable Baseline section with rules for keeping the docs current, and keeps everything else in the file.
  9. Sums up

    It tells you what it created.

3. Try it

  • “What changed in the checkout service this week? Update its document.”
  • “Add a sequence diagram of the sign-in flow to the authentication document.”
  • “Create a plan for the database migration with three phases.”
  • “Log a risk in the work register: the payment provider's rate limits.”