MCP server and skills
Connect your coding agent to Cerebe over MCP, install the bundled skills, and load your rules at session start.
The MCP server
cerebe mcp is a Model Context Protocol
server over stdio. An agent that speaks MCP gets structured tools, resources,
and prompts instead of shelling out to cerebe and parsing text. Your agent
starts the server from its own configuration; you do not run it by hand.
cerebe must be on PATH.
Claude Code
.mcp.json at the repository root:
{
"mcpServers": {
"cerebe": {
"type": "stdio",
"command": "cerebe",
"args": ["mcp"]
}
}
}Cursor
.cursor/mcp.json in the project, or ~/.cursor/mcp.json:
{
"mcpServers": {
"cerebe": {
"command": "cerebe",
"args": ["mcp"]
}
}
}Codex
~/.codex/config.toml, or .codex/config.toml in a
trusted project:
[mcp_servers.cerebe]
command = "cerebe"
args = ["mcp"]Gemini CLI
.gemini/settings.json in the project, or ~/.gemini/settings.json:
{
"mcpServers": {
"cerebe": {
"command": "cerebe",
"args": ["mcp"]
}
}
}OpenCode
For OpenCode v2, use opencode.json in the project. The
current configuration puts named
servers under mcp.servers, and command is an array:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"cerebe": {
"type": "local",
"command": ["cerebe", "mcp"]
}
}
}
}Connection defaults and legacy syntax
OpenCode servers connect automatically. Set disabled to true on a server
to turn it off. The public schema also accepts
the older direct mcp.<name> shape as deprecated compatibility syntax; for an
older OpenCode release, use that version's documentation.
Check the wiring
Start a new agent session and ask it to call cerebe_doctor and summarize the
result. A connected agent lists the tools and returns the same checks as
cerebe doctor.
What the server offers
The server is named cerebe. Tools are named cerebe_<name>, prompts
cerebe.<name>, and resources live under cerebe://repo/. The catalog changes
between releases, so read it from the server (tools/list, resources/list,
prompts/list) rather than from a fixed list. The main tools mirror CLI
commands:
Gateway and review tools
| Tool | CLI equivalent |
|---|---|
cerebe_doctor | cerebe doctor --json |
cerebe_review, cerebe_review_status | cerebe review, run in the background and polled |
Findings and push tools
| Tool | CLI equivalent |
|---|---|
cerebe_findings | cerebe status --json |
cerebe_show_run | cerebe show --json |
cerebe_gate_push | cerebe gate-push |
cerebe_bypass | CEREBE_BYPASS (the older AGENT_REVIEW_BYPASS still works); the reason is recorded |
Status and model tools
| Tool | CLI equivalent |
|---|---|
cerebe_stats | cerebe stats |
cerebe_model_list, cerebe_model_add, cerebe_model_set, cerebe_model_quorum, cerebe_model_remove | cerebe model |
cerebe_pr_review_result | cerebe review-status --json |
Document and setup tools
| Tool | CLI equivalent |
|---|---|
cerebe_doc_list, cerebe_doc_read, cerebe_doc_scaffold, cerebe_doc_write | cyclone doc |
cerebe_prove | cyclone prove |
cerebe_onboard | cerebe onboard |
cerebe_skills_list, cerebe_skills_install | cerebe skills |
Resources and prompts
Resources include cerebe://repo/docs (every registered document),
cerebe://repo/doc/{type}/{id}, cerebe://repo/findings/{commit_sha},
cerebe://repo/runs/recent, and cerebe://repo/config/critics.
Client capabilities
Which MCP features appear depends on the client and version. If your client exposes MCP prompts, select one from the server's current prompt catalog. Otherwise, use the tools and resources your client exposes, or the corresponding CLI commands. Check your client's documentation for how it presents each MCP capability.
If your agent allowlists tools one by one, list the cerebe_ names. In Claude
Code, an entry looks like mcp__cerebe__cerebe_doctor.
Bundled skills
cerebe ships agent skills: step-by-step procedures rendered for your
repository's layout.
cerebe skills list # bundled skills and what each does
cerebe skills install verify # render one skill
cerebe skills install --all # render every skill enabled in cerebe.yamlThe bundled skills include verify (produce verification-route evidence before
a push), objectives (author an objectives contract at plan time),
land-cycle (land a cycle or an issue through review and proof),
chief-engineer-review (an architectural review of a plan or code PR), and
the Designer Mode skills (designer-brief, designer-build, designer-ship,
designer-handoff).
Each skill is written to two places: .agents/skills/<name>/, which most agents
read, and .claude/skills/<name>/, which Claude Code reads. Pass
--install-root <path> (repeatable) to choose other roots.
Rendered files carry a GENERATED marker. Re-running the install with the same
inputs changes nothing. A file you edited by hand is skipped unless you pass
--force. Agents pick up newly installed skills in a new session.
The skills take their values from cerebe.yaml. A section that depends on a key
renders only when the key is set:
repo:
displayName: "Your Repo"
ownerRepo: "your-org/your-repo"
docs:
manifesto: docs/PRINCIPLES.md
adrDir: docs/ADR
cycleDocsDir: docs/roadmap/cycles
qualityGates:
- "make test"
worktreeRoot: ".worktrees"
skills:
verify:
enabled: true
land-cycle:
enabled: trueLoad your rules at session start
Agents follow AGENTS.md. cerebe install seeds it with a marked span that
carries Cerebe's doctrine packs, and cerebe doctor --fix keeps that span
current. CLAUDE.md is a thin file that imports AGENTS.md, so every agent reads
the same rules.
If you prefer not to keep the doctrine in AGENTS.md, wire cerebe context --hook as a Claude Code SessionStart hook. With no marked span in AGENTS.md,
it injects the doctrine packs as session context.
Load your guidance files
Guidance loading with --guidance and --part is available in v9.19.0 and
later. Run cerebe context --help to check your installed binary's options.
cerebe context --hook --guidance --part N gives a coding session the files
context.guidanceFiles lists in the cerebe/config.json committed on your
default branch (the branch origin/HEAD names, else origin/main or
origin/master). The list and every file are read at that commit, never from
the working tree or your current branch, so an edit to a rule takes effect once
it merges and your clone fetches it. Workstation rules are not read: when the
default branch has no cerebe/config.json, part 1 says so and carries no files.
AGENTS.md, CLAUDE.md and GEMINI.md are left out, because your agent loads
those itself. In a repository the Platform reviews, the list can come from the
Platform instead; see
The Platform's guidance list.
Claude Code caps each hook's context
at 10,000 characters and moves anything
longer to a file the session is not asked to read. So whole files are packed,
in list order, into numbered parts that each stay under that cap, and each part
is a SessionStart hook of its own. Wire several parts beside the doctrine
hook in .claude/settings.json. A part number past the last part prints
nothing, so spare parts cost nothing:
{
"hooks": {
"SessionStart": [
{
"hooks": [
{ "type": "command", "command": "cerebe context --hook" },
{ "type": "command", "command": "cerebe context --hook --guidance --part 1" },
{ "type": "command", "command": "cerebe context --hook --guidance --part 2" },
{ "type": "command", "command": "cerebe context --hook --guidance --part 3" },
{ "type": "command", "command": "cerebe context --hook --guidance --part 4" }
]
}
]
}
}Part 1 opens with a manifest: every listed file and the part that carries it, and the total number of parts. A file too large for any part is written under your git directory, and the manifest tells the agent to read it before it starts work. A file that is missing or is not a regular file is named there too, never dropped silently.
If the guidance needs more parts than you wired, the session receives only the
parts you wired, and the manifest's part count shows the rest. The agent prints
a part it did not receive with cerebe context --guidance --part N: without
--hook, the same part prints as plain text. A problem with the guidance never
stops the session: part 1 carries a one-line notice instead.
The Platform's guidance list
A placed coding session needs its own trusted session-start hook and access to the configured gateway and credential path. An installation that manages hook trust should trust the exact reviewed default-branch definition; task branches and worktrees must not replace that trusted definition. Verify the first placed session's part-1 manifest and the context actually delivered at startup. That manifest identifies the selected list and reports any fallback.
The hook reads the Platform's guidance list from v9.20.0. Earlier releases
always use the committed list.
In a repository the Platform reviews, cerebe/critic reads the Platform's
guidance list for that repository, which can differ from the committed
context.guidanceFiles. So that a session follows the same files, the hook asks
the Platform at session start for the list of the repository your origin
remote names. It uses the same gateway and credential as the
effort commands. When the credential is
authorized for the repository and its installation, the session gets the
Platform's list in place of the committed one. Each file is still read as
committed on your default branch, and each part's first line names the list. If
the Platform's list names no files, the session gets none, and part 1 says so.
The session gets the committed list instead, and part 1 says why in one line, when:
- the credential can see no repository by that name that the Platform has
reviewed, or the
originremote is not a github.com repository; - no gateway URL or credential is set up, or the credential is not authorized to read that repository's list;
- the read fails, or the Platform does not answer within 1.5 seconds.
The line reads
The Platform's guidance list is not used: <reason>. The committed list is used instead.
The parts of one session start share one read, and
cerebe context --guidance --part N reuses its answer, so a part you print
later matches the manifest.
A credential that covers several installations reads the one that holds the
repository. If two of them hold a repository by that name, the session falls
back and the notice names CEREBE_INSTALLATION_ID: set it to the ID of the
installation to read. When it is set, the hook reads only that installation.
Scaffold the agent context
cerebe onboard analyzes a repository and proposes the agent-context files:
AGENTS.md, the tool overlays, and cerebe/ configuration.
cerebe onboard --analysis-only # scan only, no model call
cerebe onboard # preview the scaffold; writes nothing
cerebe onboard --apply # write it
cerebe onboard --pr # write it on a branch and open a pull requestThe tailoring step runs on a local agent CLI you choose with --vendor
(claude by default).