RepoOps
Open the app
Getting started

Hosted API reference

Everything a program needs to call repoops.ai: load the contract, pick the right bearer token, read the error and rate-limit headers, and connect an agent to your brain over MCP or a scoped read token.

Last updated

1

How to

A free account at repoops.ai. A device token also needs a team; the MCP steps need the RepoOps desktop app on the machine your agent runs on.

  1. Load the contract.

    The public surface is published at /openapi.json (OpenAPI 3.1). Every operation has its own operationId, a description, typed parameters and response schemas, so it loads straight into an LLM function-calling setup or any OpenAPI client generator.

    curl -s https://www.repoops.ai/openapi.json | jq '.paths | keys'
  2. Pick the token the operation takes.
    • Device token. Binds one machine to one team. POST /api/connect/exchange mints it from the one-time connect code the dashboard shows, and POST /api/connect/rotate rotates it in place. The desktop app, the daemon and headless sensors use it on every ingest endpoint.
    • CLI token. A JWT from the RFC 8628 device-authorization flow: POST /api/cli/device/code, approve in the browser, then poll POST /api/cli/device/token. npx repoops uses it.
    • Read token. A scoped, revocable capability you mint in My Brain. It is the only credential GET /api/me/brain/context accepts, and it can only read. See read tokens below.
  3. Send it as a bearer header, never in a URL.
    Authorization: Bearer <token>
  4. Pin the version if you want a call to fail rather than drift.

    This is API version 1, served at the unversioned paths in the spec. Send the header below to pin it. Omit it and the current version answers. Every response echoes the version that served it in the same header.

    RepoOps-Api-Version: 1
  5. Branch on the error code, and pace on the rate-limit headers.

    Failures return JSON, never an HTML error page. Branch on code (snake_case, stable) and never parse error, whose wording can change:

    { "ok": false, "code": "unauthorized", "error": "sign in to continue" }

    Rate-limited endpoints send the RFC 9331 headers, so you can pace against the real budget:

    RateLimit-Limit: 5
    RateLimit-Remaining: 4
    RateLimit-Reset: 42
    RateLimit-Policy: minute;q=5;w=60, day;q=50;w=86400
  6. To give an agent your brain, connect it over MCP or a read token.

    MCP runs on the desktop app, on this machine: the steps are under Connect RepoOps to your agent. A read token reads a slice of your brain over HTTP from anywhere: the steps are under Read your brain with a read token.

2

Use cases

A morning standup from your own agent

Situation
Your team wants a summary of yesterday's work in its own words and its own channel, written by the agent it already uses.
You do
Connect Claude Code to the desktop app's MCP endpoint, check that /mcp lists the repoops tools, and ask for the standup with the prompt under Connect RepoOps to your agent. Schedule it however your agent schedules things.
You see
The agent reads list_sessions, search_telemetry, get_accountability_loops, list_pending_questions and ask_brain, and writes one short section per engineer. The agent, its schedule and its model bill are yours.

Answer from your brain inside a spreadsheet

Situation
You keep pricing notes in My Brain and want a Google Sheet to look them up without pasting them in.
You do
Mint a read token scoped to the kinds the sheet needs, store it as a Script Property named REPOOPS_READ_TOKEN, and paste the Apps Script client from the RepoOps repository into the sheet.
You see
=REPOOPS_ASK("what did I decide about pricing?") returns up to three cited snippets, one per line, each with its file path, and the read shows under Who read your brain on Privacy and egress.
3

Expected outcome

WorkedThe curl in step 1 prints the paths in the public contract.
WorkedA call with the right token answers with JSON, and its response carries RepoOps-Api-Version: 1.
WorkedThe endpoints an anonymous caller polls return the RateLimit headers on success too, so your client can slow down before it is refused.
WorkedIn Claude Code, /mcp lists the repoops server and its brain tools, and GET /api/mcp/status on the app's address returns the same list when you ask from the machine running it. From anywhere else it answers only the endpoint, the sign-in issuer and whether it is on.
Did not work401 with code unauthorized.

Next step: The token is missing, invalid, expired or revoked. For a read token, mint a new one in My Brain; for a device token, rotate it or bind the machine again with a new connect code.

Did not work429 Too Many Requests.

Next step: Wait for the seconds in Retry-After (never below one), then pace on RateLimit-Remaining. A read token's 429 means its daily read cap is spent.

Did not work400 with code unsupported_api_version.

Next step: The pinned version is not served here. The error names the versions that are; pin one of them or drop the header.

Did not workA JSON 404 with a hint naming /openapi.json.

Next step: The path is not part of the public contract. Find the operation in the spec; if it is not there, do not build against it.

Did not workClaude Code lists no repoops server.

Next step: Check that REPOOPS_HOSTED_MCP=1 is in the app's .env and that you reopened the app, then copy the line from the Hosted MCP panel in Settings, which carries the port the app is really on.

4

What else to consider

Connect RepoOps to your agent

The desktop app serves your brain to any MCP client over Streamable HTTP at /mcp on its own local address. The endpoint is off by default and listens on this machine only. To reach your team's brain from Claude.ai, ChatGPT or another app, use the hosted server at https://mcp.repoops.ai/mcp instead (see Connect an AI app to your brain).

  1. Turn it on. Add REPOOPS_HOSTED_MCP=1 to the .env file in the app's data directory (%APPDATA%\repo-dashboard\.env on Windows, ~/.repo-dashboard/.env elsewhere), then quit and reopen the app.
  2. Register it. The Hosted MCP panel in the app's Settings shows this line with the address the app is running on, and a Copy button. Port 4000 is the default; the app picks a free port when 4000 is taken.
    claude mcp add --transport http repoops http://localhost:4000/mcp
  3. Check it. Run /mcp in Claude Code and the repoops server lists the brain tools.

With no token, a caller on the same machine gets read-only access. For the write tools, set REPOOPS_MCP_DEV_TOKEN in the same .env, restart, and add --header "Authorization: Bearer <token>" to the line above. A write call also needs the brain:write scope and confirm: true.

To start the brain server over stdio instead, with nothing to turn on, run npx repoops connect --local in the repository you want it to read. It adds a repoops-brain entry to that repository's .mcp.json that runs bin/mcp-brain.mjs with the runtime the app ships, so you need no Node of your own. An entry of that name is left alone, and a .mcp.json that does not parse is refused rather than rewritten. The entry holds paths on your machine, so keep .mcp.json out of git if the repository is shared.

A standup prompt to start from, once the tools are listed:

Summarize what everyone on my team has been working on in the last 24 hours, using the RepoOps MCP tools. One short narrative section per engineer: what they shipped (merged PRs with titles), what it cost, and any open questions they left. Keep session counts to a single footnote line.

Merged pull request titles come from git history on this machine. If you want the summary with no agent of your own, the hosted daily digest mails a team's owners and admins every day, and posts to the team's chat webhook when one is set. For how RepoOps checks the MCP servers your agents already use, see MCP security.

Read your brain with a read token

Any external property (a website, a Google Sheet, a CRM widget, a bot) can read a slice of your My Brain through a scoped, revocable read token.

  1. Mint the token. In the desktop app open My Brain, then Personal read tokens. Give it a label, the narrowest scope that works (a kinds allowlist and path prefixes, for example kind:projects,preferences) and a TTL, then press Mint token. The raw token shows once and is stored only as a hash. Every token expires, 90 days by default and at most 365.
  2. Store it server side: an environment variable, a platform secret store, or for Apps Script a Script Property named REPOOPS_READ_TOKEN. Never in client code, a URL or git.
  3. Call the one endpoint a read token opens:
    curl -sS -G "https://www.repoops.ai/api/me/brain/context" \
      -H "Authorization: Bearer $REPOOPS_READ_TOKEN" \
      --data-urlencode "q=what did I decide about pricing?"
    It answers with cited matches from your own brain, each with a filePath, a kind and a snippet.
  4. Watch and revoke. Privacy and egress, Who read your brain lists each token's reads. My read tokens on My Brain, under the mint form, lists every token you hold; press Revoke on one when it is no longer needed. A program can list them over GET /api/me/brain/tokens with your own session or CLI token.

The endpoint returns matches, not a written answer. The reasoning endpoint POST /api/me/brain/ask takes your own session or CLI token, never a read token. A Node or browser client (docs/integration-kit/snippet.js), a curl script (docs/integration-kit/snippet-curl.sh) and the Google Sheets function (docs/integration-kit/apps-script/Code.gs) are in the RepoOps repository. Setting up My Brain itself is on Getting started with My Brain.

How the contract changes

Additive changes ship without notice: a new endpoint, a new optional field, a new enum member. Your client must ignore fields it does not recognize. Breaking changes (removing or renaming an endpoint or a field, or narrowing a type) carry an RFC 9745 Deprecation header and an RFC 8594 Sunset header for at least 180 days before they land, and go in the changelog. A version keeps being served until its published sunset date passes.

There is no /v1/ path prefix on purpose: the desktop app, the capture daemon and the CLI are all deployed against these paths, and moving them would break every installed client.

Error and rate-limit details

Older endpoints return the reduced { "error": "..." } form; the spec documents the exact shape per operation. POST /api/cli/device/token answers with RFC 8628 codes (authorization_pending, slow_down, expired_token, invalid_grant) in the error key, because that RFC says so.

Ingest endpoints are limited per team; the device-authorization and public intake endpoints per IP. RateLimit-Policy lists every quota an endpoint enforces, and the other three headers describe whichever quota is nearest exhaustion. The endpoints an anonymous caller polls (/api/requests/status, /api/requests/ingest and both device-authorization routes) send the headers on success too.

Markdown for agents

Most public pages serve a markdown rendition when the request prefers it (Accept: text/markdown), with Vary: Accept set; a few routes are HTML only and send no Vary header. A docs page answers with its full text, /pricing with each plan's monthly and annual price, other pages with their title and summary. The site overview is /llms.txt, the page index with a summary each is /llms-full.txt, and every docs page in one file is /llms-docs.txt, which the site build writes.

What is not in the contract

Session-cookie dashboard routes, cron and webhook seams, and the enterprise SCIM and SSO endpoints (which follow their own RFCs) are not in the spec. Neither are the desktop app's own local endpoints on localhost: they serve the app's tabs, change with each release, and are listed for contributors in .claude/brain/api.md in the RepoOps repository. If an endpoint is not in /openapi.json, do not build against it.