Gemini CLI with Stable Baseline.
Add Stable Baseline to Gemini CLI in one command, sign in from the browser, and document a repository with the sb-setup prompt.
On a free or Google One account?
1. Add the server
gemini mcp add --transport http --scope user sb https://api.stablebaseline.io/functions/v1/cloud-serve/mcp
Without --scope user it is added to this project only. Then, in Gemini CLI, run /mcp auth sb: your browser opens to sign in to Stable Baseline and choose what Gemini CLI may reach. Signing in needs a browser on the same machine.
Or add it to a settings file yourself:
| For | File |
|---|---|
| You, everywhere | ~/.gemini/settings.json |
| This project | .gemini/settings.json |
{
"mcpServers": {
"sb": {
"httpUrl": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp"
}
}
}httpUrl, not url
httpUrl is the setting for a server like Stable Baseline. url means an older kind of connection that Stable Baseline does not offer.Or use an API key
Create one under Organisation settings, Developers, API keys. See Setup. Refer to it through an environment variable:
{
"mcpServers": {
"sb": {
"httpUrl": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
"headers": {
"Authorization": "Bearer $STABLE_BASELINE_API_KEY"
}
}
}
}Keep the key out of your files
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
Gemini CLI offers Stable Baseline's prompts as commands. Type /sb-setup and say what you want, for example “architecture docs for new engineers”. It then:
Checks the connection
It confirms it can reach Stable Baseline with your key or sign-in.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.Remembers them
It writes their ids to .sb/config.json, and keeps .sb/ out of git.Checks for existing docs
If the project already has documentation, it asks whether to add to it, replace it, or stop.Reads the repository
It works through the code to understand what is there.Designs a structure
Folders and documents that fit this repository, not a fixed template.Writes it
Folders, documents, and the diagrams each document needs.Updates AGENTS.md
It adds a Stable Baseline section with rules for keeping the docs current, and keeps everything else in the file.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.”