MCP setup
BareCI’s MCP server is at https://api.bareci.com/mcp, over Streamable HTTP. Every tool is a route of the /v1 JSON API called with your own token, so every scope and organisation check applies unchanged.
1. Get a token
Section titled “1. Get a token”bareci loginlogin signs in with a one-time code in the browser and stores an agent token for this machine. For an agent elsewhere, create a token with the scopes it needs (read, run, operate) and give it as BARECI_TOKEN. See Organisations, tokens and spend.
2. Add the server to your agent
Section titled “2. Add the server to your agent”Most MCP clients take a server definition like this:
{ "mcpServers": { "bareci": { "type": "http", "url": "https://api.bareci.com/mcp", "headers": { "Authorization": "Bearer ${BARECI_TOKEN}" } } }}With Claude Code:
claude mcp add --transport http bareci https://api.bareci.com/mcp --header "Authorization: Bearer $BARECI_TOKEN"3. Check it
Section titled “3. Check it”Ask the agent to call whoami. It answers the token’s kind, scopes and the organisations it may act for.
Protocol
Section titled “Protocol”- Revision
2026-07-28: stateless, probe withserver/discover. - The legacy
initializehandshake for2025-11-25,2025-06-18and2025-03-26, so older clients connect too. - The dashboard’s session cookie is never accepted here; only bearer tokens.
What every result looks like
Section titled “What every result looks like”Every tool result is structured and carries next: the next action in one sentence, usually with the tool and arguments that do it. Errors come back as tool errors with a hint. The server’s instructions give the usual loop:
run_createto test the worktree on a BareCI machine, thenrun_logsuntil done.- After pushing,
readyanswers whether the pull request may merge and names the fix for each reason it may not. findingslists every reviewer’s open findings; fix or dispute each, thenfinding_resolve.flows_runtests the pull request’s preview with the repository’s Flows.
Live browser tools
Section titled “Live browser tools”The browser_* tools drive a real browser, so they run where the browser is: the local MCP server in the CLI, bareci mcp. It serves the browser tools itself and passes every other tool through to the hosted server with this machine’s token. The hosted /mcp does not list them.
bareci mcp speaks MCP over standard input and output. It uses the token from bareci login (or BARECI_TOKEN), and runs the browser through the Flows package’s bareci-flows-mcp. It looks for that next to bareci, then on PATH, then at BARECI_FLOWS_MCP. It runs a repository’s own copy from node_modules only with --project-flows, so a checkout cannot make it run a program of its choosing:
bun add -d @bareci/flowsbunx playwright install chromiumclaude mcp add bareci -- bareci mcp --project-flowsOr, for clients that take a server definition:
{ "mcpServers": { "bareci": { "command": "bareci", "args": ["mcp", "--project-flows"] } }}The browser host gets no BareCI credentials, and its browsers stop when bareci mcp ends or is stopped. Signed out, only the browser tools work. Without the Flows package, tools/list leaves the browser tools out and calling one answers how to install it. BARECI_FLOWS_MCP names the browser host (bareci-flows-mcp) when it is not in node_modules/.bin or on PATH.
All tools
Section titled “All tools”See the API reference for every tool’s arguments, answer, route and scope.