Docs · Set up and reference

Your knowledge, shared. Connected in five minutes.

One command connects Claude Code, Codex CLI, Cursor, VS Code, or Zed to your team's skills and conventions — served over MCP, authored in Brewale or versioned in your own GitHub repo. Everything else on this page is reference for after that first connection.

$ npx brewale

Setup time is untimed — your 14-day trial only starts on your org's first MCP call.

Start here

Quickstart — your first connection

Zero to a working, verified agent connection in about five minutes. Four steps, one command, no credit card.

Create your org

Sign up at brewale.dev with email/password or Google — no card. Then create an organization: the container for your skills, conventions, tokens, and members.

Add your knowledge

Author skills and conventions straight from your agent over MCP — no repo required — or, under Settings → GitHub, install the Brewale GitHub App and pick a repository (with an optional base path). Push a conventions.md and skills/{slug}/SKILL.md to the default branch — Brewale syncs and auto-publishes.

With GitHub sync on, approving an agent's proposal also commits it back to your repo — the repo stays the source of truth. Prefer no repo? In Brewale-only mode, approving publishes straight to Brewale and you export as markdown anytime.

Connect your agent

$ npx brewale

The installer detects Claude Code, Codex CLI, Cursor, VS Code, and Zed and writes the MCP config for https://mcp.brewale.dev/mcp. Auth is OAuth 2.1 by default: your browser opens, you sign in, pick the org, and consent — no token to copy. With separate consent it also adds a managed instruction block to your CLAUDE.md / AGENTS.md so agents actually call Brewale.

Alternates: --auth token for API keys, or for any Streamable-HTTP MCP client.

Verify

Start a session. A well-configured agent calls get_conventions at session start (that's what the instruction block is for) and list_skills / get_skill on demand.

Verify it worked

Run npx brewale status for a read-only health report with a connectivity probe — or ask your agent “what conventions apply here?” and watch get_conventions fire.

Setup time is untimed — your 14-day trial starts on your org's first MCP call, not at signup.

Sign up no card
Set up untimed
First MCP call clock starts
Day 1 of 14 free trial

What your agent can do now

get_conventions readlist_skills readget_skill readget_skill_file read
create_skill proposescreate_convention proposes — drafts only; a human reviews and publishes.

Everything an agent gets flows through this one connection — and you can revoke it in one click. See .

Start here

The mental model

Three primitives, one connection. Sixty seconds of theory before the reference.

What does the agent know?

Conventions — one conventions.md, auto-loaded at session start: the always-on rules. Skills — on-demand knowledge docs (skills/{slug}/SKILL.md), listed via list_skills, fetched via get_skill only when relevant.

What can it do?

Read what's published — and propose. Agents can draft new skills and conventions over MCP, but nothing is served to anyone until a human approves and publishes. Agents never publish.

Who is connected?

Humans connect via OAuth 2.1 or an org-scoped API key; machines get service accounts. Every call is attributed in analytics, and every connection can be cut in one click.

Skills vs conventions

  • Conventions — always loaded, apply to every task: naming rules, architectural decisions, PR standards.
  • Skills — fetched on demand, context-specific: “how we do database migrations”, “release checklist”. A skill can be a bundle with references, scripts, and templates fetched file-by-file via get_skill_file.

It's your knowledge; Brewale is just the tap.

With GitHub sync on, your repo is the source of truth — every published version maps to a commit SHA. Prefer no repo? Author and publish in Brewale and export your files as markdown anytime. Either way, full version history lives in the app and you can leave whenever, files in hand.

Connect

CLI reference — npx brewale

The installer the quickstart just ran, in full. It shows you the exact bytes before writing anything, and re-running is idempotent.

Commands

npx brewaleInteractive setup (alias: init)
npx brewale statusRead-only health report + connectivity probe (alias: doctor)
npx brewale uninstallRemoves the config entries and instruction blocks it added

Flags

--agent <ids>claude-code (alias claude), codex, cursor, vscode (alias code), zed — repeatable or comma-separated. Default: detected agents.
--project / --globalConfig scope (default: project). Codex CLI MCP config is always global.
--localClaude Code only: stored in ~/.claude.json for this repo, nothing written to the repo. The right choice for trying Brewale without touching a shared .mcp.json.
--auth <oauth|token>Default oauth (recommended — no secret stored anywhere).
--token <tok>Brewale API key. Warning: flags can end up in shell history.
--token-stdinRead the token from stdin — the safe option for CI.
--project-id <owner/repo>Scope the connection to a Brewale project. Default: derived from the git remote and confirmed.
--no-project-idDon't scope to a project; skip the git-remote prompt.
--no-instructions / --instructions-onlySkip, or only manage, the CLAUDE.md / AGENTS.md instruction block.
--yes / -yAccept defaults; required when stdin isn't a TTY.
--dry-runPreview everything, write nothing.
--url <mcp-url>Advanced: non-default server URL.
--no-verifySkip the post-install verification probe.
--quiet / --verboseLess / more output.

The trust surface

  • Shows the exact bytes (or the exact command) before writing anything.
  • Idempotent — re-running never duplicates config or instruction blocks.
  • Managed markers: one block between <!-- brewale:start --> and <!-- brewale:end --> — content outside them is never touched.
  • Token auth writes env-var references (${BREWALE_MCP_TOKEN}) into project files, never raw tokens.
  • All terminal output passes a secret redactor. Zero telemetry.

What we write where

AgentTargetNotes
Claude Code./.mcp.json (project) · ~/.claude.json (user & local, via claude mcp add)Token auth in project files is an env-var reference (${BREWALE_MCP_TOKEN}) — the raw token is never written to the repo.
Codex CLI~/.codex/config.toml (via codex mcp add — always global)Token auth passes only the env-var name, never the value.
Cursor./.cursor/mcp.json · ~/.cursor/mcp.jsonToken auth references ${env:BREWALE_MCP_TOKEN} at both scopes.
VS Code./.vscode/mcp.json (project) · user profile via code --add-mcpProject token auth uses a ${input:brewale-token} password prompt — VS Code asks once and stores the value outside the repo.
Zed./.zed/settings.json · ~/.config/zed/settings.jsonSettings are JSONC and edited comment-preservingly. Zed has no env-var interpolation, so token auth is refused at project scope (it would commit the token) and stored with a warning globally.
InstructionsCLAUDE.md / AGENTS.md (with separate consent)One managed block between <!-- brewale:start --> and <!-- brewale:end --> markers. Content outside the markers is never touched.

Verify it worked

npx brewale status is always safe to run — read-only, with a connectivity probe against the Brewale server.

Connect

Manual setup — any MCP client

For clients the CLI doesn't cover, and for people who prefer editing JSON themselves.

https://mcp.brewale.dev/mcp Streamable HTTP · works with any MCP client that supports remote servers

OAuth 2.1 (recommended)

// ./.mcp.json (project scope)
{
  "mcpServers": {
    "brewale": {
      "type": "http",
      "url": "https://mcp.brewale.dev/mcp"
    }
  }
}

API key (Bearer token)

// ./.mcp.json — env-var reference, never the raw token
{
  "mcpServers": {
    "brewale": {
      "type": "http",
      "url": "https://mcp.brewale.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${BREWALE_MCP_TOKEN:-}"
      }
    }
  }
}

Project scope lives in .mcp.json at the repo root. User scope goes through `claude mcp add --scope user` into ~/.claude.json — there is no ~/.claude/mcp.json.

To scope a connection to a project, append ?project_id=owner/repo to the URL — see .

Verify it worked

After saving, ask the agent “what conventions apply here?” — a successful get_conventions call is the confirmation.

Connect

Authentication

Two ways in: OAuth 2.1 for humans in editors, org-scoped API keys for CI and clients without OAuth support. Both arrive on the Authorization header.

OAuth 2.1 (recommended)

  1. The client hits /mcp without credentials and gets a 401 with a WWW-Authenticate challenge.
  2. It discovers the authorization server via /.well-known metadata.
  3. Dynamic Client Registration (RFC 7591) means no pre-registration — any client self-onboards from just the URL.
  4. Your browser opens: sign in, pick the organization, grant consent.
  5. The code is exchanged for short-lived JWTs verified via JWKS, refreshed via offline_access.

Scopes: mcp:read and offline_access. No long-lived secret is ever stored in an editor config.

API keys

Minted under Settings → API Keys: name, optional expiry, lore-mcp_ prefix. Shown exactly once, hashed at rest, scoped to one organization, revocable individually.

Authorization: Bearer lore-mcp_your-api-key

Which one?

OAuth for humans in editors. Tokens for CI, scripts, and clients without OAuth support — pair them with --token-stdin in the CLI.

Who can cut what, instantly

ControlWhereWhat it cuts
Revoke one API keySettings → API KeysEvery connection using that key, immediately.
Disconnect all MCP clientsAccount pageEvery OAuth grant across all your agents — each client must re-authenticate.
Sign out everywhereAccount pageAll of your web sessions, including the current one.
Mark a member inactiveSettings → MembersThat member's MCP access — web access stays, and they stop counting as a billed seat.
Remove a memberSettings → MembersAll of their MCP access to the organization.

Connect

Service accounts

Machine identities that authenticate to MCP on behalf of your org — for shared bots, CI agents, and review automation, without tying the connection to a person.

Create them under Settings → Service accounts: a name, a visibility (private to the creator or org-wide so admins manage it), and bearer tokens with optional expiry. They authenticate via token or via the OAuth select-org “authorize as” flow. Each account keeps an authentication log and shows up in analytics like a member, so automated usage stays attributable.

fact

A service account does not consume a billed seat.

Skills & conventions

Conventions

The always-on half of the content model: one conventions.md at the repo root (or under your configured base path), served whole by get_conventions — which well-configured agents call at session start and before edits. That's exactly what the CLI's instruction block enforces.

What belongs here

Naming rules, architectural decisions, PR and commit standards — anything that must apply to every task.

What doesn't

Task-specific how-tos. Make those skills, so they don't tax the context window every session.

Every push creates a new version tied to the commit SHA — history and one-click unpublish live in the app under Conventions.

Not loading? Check the file lives at the configured base path and review the sync history under Settings → GitHub — or jump to .

Skills & conventions

Skills & skill bundles

The on-demand half: reusable knowledge documents your agents pull only when relevant.

Anatomy

Each skill is a skills/{slug}/SKILL.md with optional YAML frontmatter — name, description, and category. The description is what agents see in list_skills, so write it as a trigger: “Use when…”.

---
name: "Release checklist"
description: "Use when preparing or verifying a production release."
category: "devops"
---

Your skill content in markdown…

Categories: code_style, testing, architecture, git_workflow, security, performance, api_design, documentation, devops, other.

Bundles

A skill directory can also carry references/, scripts/, and templates/. Agents fetch individual bundle files on demand via get_skill_file — big skills stay cheap, because only what's needed enters the context window.

Lifecycle & per-user control

  • Push → auto-sync → published. Per-version history by commit SHA; unpublish from the UI without touching the repo.
  • “Enabled for me”. Every member has a per-skill toggle — disabled skills disappear from that member's list_skills. A personal preference, not an org-wide state.
  • Agents can also draft new skills — see — and per-skill show whether each one earns its keep.

Personal skills

Skills don't have to belong to the org. Ask your agent for a private skill and it calls create_skill with visibility: "personal" — the skill is tied to your account instead, and you review and publish it yourself under Account → My skills.

  • Only your agents see it. Personal skills are served exclusively to your own connections, listed as p:{slug} in list_skills — never to other members.
  • Available in all your orgs. One personal skill follows you across every organization you belong to, with a per-org switch to turn it off where it doesn't fit.
  • Brewale-only. Personal skills are never synced to a GitHub repo — download any of them as a zip from Account → My skills.

Skills & conventions

Agent-authored skills & conventions

Agents draft, humans publish. The propose → review → publish loop is the first “aha” after connecting.

  1. The agent calls skill_authoring_guide / convention_authoring_guide for house style, then create_skill / create_convention (or update_* for edits). The proposal lands in Proposed state — served to no one.
  2. Humans review under Skills → Proposals / Conventions → Proposals: full diff, invite reviewers.
  3. Approve & publish serves the change to every agent — and, with GitHub sync on, commits it to your repo. Reject discards with a reason the agent can read.

Agents never publish

create_* and update_* only ever create drafts. The only path to being served is a human clicking Approve.

GitHub is optional. Approving publishes to your agents right away. Keep GitHub sync on and it also commits to your repo; turn it off and you manage everything in Brewale — export as markdown anytime.

Starter prompt

We just solved <X>. Propose a Brewale skill capturing how — call skill_authoring_guide first, then create_skill.

Skills & conventions

Projects — scope what each agent sees

Opt-in: any org admin flips it on under Settings → Organization. One org, many repos, different standards — the right context flows to the right codebase.

  • Scope in git. Skills and conventions declare scope: general | project in their frontmatter. general content is always served; a project item is served only to connections scoped to a project it's attached to — attachments are managed in the app.
  • Scope the connection. Append ?project_id=owner/repo to the MCP URL. npx brewale derives this from the git remote automatically (--project-id / --no-project-id to override), and any tool call can pass a per-call project_id override.
  • Agent-side tools (available when Projects is on): register_project registers a new owner/repo key, search_projects finds existing ones. The Projects page in the web app lists them all.

Projects only filter what is served — they are not access control between members. Turning Projects on or off never changes or deletes any content.

Skills & conventions

GitHub sync & repository structure

You own your skills

Every skill and convention is plain markdown. Author it in Brewale or in your own repo, download the lot as a ZIP whenever you want, and leave anytime with every file.

Connect (optional)

Settings → GitHub → install the Brewale GitHub App → pick a repository (switch anytime) with an optional base path. No repo? Skip it — author over MCP, publish in Brewale, and export everything as markdown from Settings → GitHub whenever you want.

Sync

Pushes to the default branch sync incrementally via webhook — only changed files are processed. Sync Now forces a full manual pass, and a sync history shows the status, commit SHA, and any errors for every run.

Publishing & version history

The publish gate and commit-SHA pinning are the core control primitive: agents only ever see published content, and every published version maps to exactly one commit.

New fileNew published version.
EditNew version, history kept per commit SHA.
DeleteUnpublishes — history is preserved.
UnchangedNo-op — identical content never creates a version.

Repository layout

<base-path>/
├── conventions.md
└── skills/
    ├── code-style/
    │   └── SKILL.md
    └── release-checklist/
        ├── SKILL.md
        ├── references/
        ├── scripts/
        └── templates/

SKILL.md frontmatter (all fields optional): name (defaults to the slug), description, category (defaults to “other”), and scope when Projects is enabled.

Approving an agent proposal commits through this same connection — one pipeline for human- and agent-written content.

Run your org

Members, roles & invitations

Owner

Exactly one per org.

  • Everything an admin can do
  • Transfer ownership
  • Remove members from the organization

Admin

Runs the org.

  • Manage the GitHub connection
  • Manage tokens and service accounts
  • Invite members and manage invitations
  • Org settings — e.g. enable Projects
  • Manage billing and billing managers

Member

Uses the connection.

  • Connect agents via OAuth or tokens
  • Use skills and toggle them per-user
  • Propose and review skills & conventions
  • Publish and unpublish content
  • Invitations. Settings → Members → invite by email. The invitee gets a link, signs up (or in) and lands in the org — works with Google sign-in too.
  • Ownership transfer. Owner-only, under Settings → Members.
  • Removal. Removing a member revokes their org MCP access.
  • Multiple orgs. One account can belong to several orgs. The org switcher picks context in the web app; OAuth consent picks which org a connection serves.

Inactive members

A per-member admin toggle that pauses MCP access but keeps web access — and stops billing them as a seat. Ideal for people who browse skills but never connect an agent. See .

Run your org

Analytics

The quickstart answers “is it connected?” — analytics answer “is the knowledge actually being used?”

  • Org overview. 30-day summary cards, a calls-over-time chart, top skills, and a per-member table with drill-in to an individual member's usage.
  • Per-skill analytics. From any skill's page: total calls, a 30-day trend, and top callers — the feedback loop for curation. Skills nobody calls need better descriptions or retirement; heavily-called skills deserve investment.
  • Attributable automation. Service accounts appear alongside members, so automated usage is never a blind spot.

Run your org

Billing & trial

Plain, verifiable billing facts — the same ones the pricing page commits to.

  • Per-seat subscription, billed via Polar — checkout, invoices, and receipts all run through it.
  • 14-day free trial, no card. The clock starts on your org's first MCP call, not at signup — setup time is untimed.
  • Unused trial days carry over to checkout: subscribing early never costs you trial time.
  • Seats reconcile automatically as members join and leave. There is no seat list to manage.
  • Inactive members are not billed as seats — see Members & roles for what the toggle does.
  • Service accounts are never billed as seats.
  • Billing managers: under Settings → Billing, admins choose who receives invoices and billing email — including addresses like finance@ that never log in. Polar emails all of them.
  • Payment failure: we warn, we don't cut off. There is a grace period before anything is restricted.
  • An expired trial without a subscription is the one state that pauses MCP access. Your content, repo connection, and web access are untouched — subscribing resumes service immediately.

Current price: brewale.dev/pricing.

Run your org

Account security

Everything here is self-service — protect the account, and kill access instantly when you need to.

Two-factor authentication

TOTP with any authenticator app. Setup generates one-time backup codes — store them outside the authenticator; they're your way back in if you lose the device.

Sign in with Google

One-click login and signup, plus linking Google to an existing email/password account from account settings.

Kill switches

Disconnect all MCP clients

Revokes every OAuth grant at once — all agents must re-authenticate. Effective immediately.

Sign out everywhere

Ends all web sessions, including the one you're using.

Token hygiene

  • Prefer OAuth for humans in editors — nothing long-lived to leak.
  • Give CI tokens an expiry date when you mint them.
  • Revoke tokens you no longer use under Settings → API Keys.
  • Tokens are hashed at rest and shown exactly once at mint — treat the copy you take as the only copy.

Reference

MCP tool reference

The complete tool surface your agents get through the Brewale connection — twelve tools in three groups.

The chips describe how each tool behaves: read tools return published content, proposes tools only ever create drafts for human review.

Read

read Always available
ToolWhat it returnsWhen your agent calls it
get_conventionsYour published conventions document (honors project scope).At session start and before edits.
list_skillsThe skill catalog: slugs, names, descriptions (honors per-user toggles) — plus your own personal skills as p:{slug}.At task start, to discover relevant skills.
get_skillThe full SKILL.md for one slug.When a listed skill matches the task at hand.
get_skill_fileOne bundle file — references/, scripts/, or templates/.When a skill points at its supporting files.

Authoring — proposes only, never publishes

proposes Always available
ToolWhat it returnsWhen your agent calls it
skill_authoring_guideThe house style for writing skills.Before drafting a skill proposal.
create_skillA new skill draft in Proposed state — served to no one. visibility: "personal" makes it a personal skill instead of an org one.When the agent learns something worth keeping.
update_skillA proposed edit to an existing skill.When a skill turns out stale or wrong.
convention_authoring_guideThe house style for writing conventions.Before drafting a convention proposal.
create_conventionA new convention draft in Proposed state.When a rule deserves to become always-on.
update_conventionA proposed edit to a convention (including conventions.md).When an existing rule needs a change.

Projects

read Listed when Projects is enabled at Settings → Organization
ToolWhat it returnsWhen your agent calls it
register_projectRegisters a new owner/repo project key (idempotent).When working in a repo that has no registered project yet.
search_projectsExisting project keys matching a query.To find the right key before scoping content to it.

Every tool is org-scoped by the authenticated connection. There is no tool that mutates published content or your repository directly.

Reference

Troubleshooting & FAQ

Ordered by frequency. The first answer is almost always npx brewale status.

My agent can't connect to the MCP server

Run npx brewale status first — it's a read-only health report with a connectivity probe. Check that the URL points to https://mcp.brewale.dev/mcp. If you're using token auth, verify the key hasn't expired or been revoked under Settings → API Keys and that the header format is Authorization: Bearer lore-mcp_… .

Should I use OAuth or an API key?

OAuth for humans in editors — tokens are short-lived, user-scoped, and no long-lived secret is stored in your config. API keys for CI, scripts, and clients without OAuth support. The Authentication section has the full comparison.

My skill isn't showing up for agents

Three checks: is it Published, not Proposed? Is its 'Enabled for me' toggle on for you — skills you disable disappear from your own list_skills? And if Projects is enabled, does the skill's scope match your connection's project_id?

Changes I pushed aren't showing up

Automatic sync only processes pushes to the default branch. Check the sync history under Settings → GitHub for errors, confirm the default branch and base path, and hit Sync Now to force a full pass.

I lost my API key

Keys are shown exactly once and stored hashed, so a lost key can't be recovered. Revoke it under Settings → API Keys, mint a new one, and update your agent configuration.

Conventions aren't loading at session start

Confirm conventions.md lives at the configured base path in your connected repo, and that the managed instruction block exists in your CLAUDE.md / AGENTS.md — npx brewale status checks both the MCP config and the instruction block.

It says my trial expired — what am I locked out of?

An expired trial without a subscription is the one state that pauses MCP access. Your content, GitHub connection, and web access are untouched, and subscribing under Settings → Billing resumes service immediately.

Which config file does Claude Code actually use?

Project scope: .mcp.json in the repo root. User and local scope: ~/.claude.json, written via claude mcp add. There is no ~/.claude/mcp.json — if you have one, nothing reads it.

Can I use Brewale with multiple organizations?

Yes — one account can belong to several orgs. The org switcher picks your context in the web app, and each MCP connection serves exactly one org: you pick which at the OAuth consent screen, or by the org your token is scoped to.