OpsBrain MCP server
OpsBrain keeps how a frontline team does its work: step-by-step workflows, the runs where people work through them on their phones, and the flags they raise when something on the floor is wrong. This MCP server lets an AI assistant look all of that up, and act on it when you allow it.
Ask "Which steps of the cycle count get skipped most this month?" and the assistant calls get_workflow_insights and answers from your own runs, using the version of the procedure your team runs today.
OpsBrain hosts the server, so there's nothing to install. This repo holds what you need to connect: client configs, examples, the registry entry (server.json) and a copy of the REST API's OpenAPI file.
| Server address | https://app.opsbrain.io/mcp (Streamable HTTP) |
| Sign-in | An OpsBrain API key, sent as Authorization: Bearer obk_... |
| Plans | Every plan, Free included |
| Docs | MCP server, API keys, opsbrain.io/developers |
Get a key
Managers create keys in OpsBrain.
- Open Integrations in the sidebar, then API keys, and choose New API key.
- Name it after the assistant that will use it, like "Claude for the ops team". When you revoke a key, the name tells you what stops working.
- Choose Read only to start. A read-only key doesn't even see the three tools that make changes.
- Copy the key. It starts with
obk_, and OpsBrain shows it only once.
Connect your assistant
Claude (claude.ai and the desktop app)
In Settings, Connectors, add a custom connector with the address https://app.opsbrain.io/mcp. Open the request headers, add Authorization, and set its value to Bearer followed by your key.
On Claude Team and Enterprise, an owner adds the connector once and everyone in the organization uses that one key. Pick its scopes with that in mind, or give people their own keys in Claude Code, Cursor or VS Code.
Claude Code
claude mcp add --transport http opsbrain https://app.opsbrain.io/mcp \
--header "Authorization: Bearer obk_..."
Or run clients/claude-code/add.sh with OPSBRAIN_API_KEY set.
Cursor
Add clients/cursor/mcp.json to ~/.cursor/mcp.json and put your key in place of obk_....
VS Code
Copy clients/vscode/mcp.json to .vscode/mcp.json in your project. VS Code asks for the key when it starts the server, so the key stays out of the file.
Your own agent
Any MCP client that speaks Streamable HTTP and can send a custom header will work, including agents built with an MCP SDK. examples/mcp-handshake.sh does the handshake with curl and lists the tools your key can use.
ChatGPT
ChatGPT needs a sign-in flow (OAuth) that OpsBrain doesn't offer yet. This README will say when it does.
Tools
Each key sees only the tools its scopes allow.
Look things up
| Tool | What it returns | Scope |
|---|---|---|
search_workflows |
Workflows by name, status or team | workflows:read |
get_workflow |
One workflow with its live steps, decisions and the evidence each step asks for | workflows:read |
list_runs |
Recent runs by status, workflow, team, reference or date | runs:read |
get_run |
One run step by step: answers, skips, notes, flags and timing | runs:read |
list_open_flags |
Flags nobody has resolved yet | flags:read |
get_workflow_insights |
Health score, and the steps where people skip or raise flags | insights:read |
list_teams |
The organization's teams | teams:read |
get_team_queue |
Runs waiting in a team's queue | teams:read, runs:read |
list_suggestions |
Suggestions to improve your workflows | suggestions:read |
Make changes
| Tool | What it does | Scope |
|---|---|---|
queue_run |
Puts a run in a team's queue, with answers filled in ahead | runs:write |
resolve_flag |
Resolves a flag | flags:write |
create_draft_workflow |
Starts a draft from a written description, for a manager to review | workflows:write |
The write tools take an idempotency_key, so a retry never acts twice.
Safeguards
- The server tells the assistant to check with you before it queues a run, resolves a flag or starts a draft.
- No tool publishes a workflow, deletes anything, or changes members, billing or settings. A manager does those in OpsBrain.
- Text your team writes (step instructions, notes, flag messages) comes back marked as data, and the assistant is told never to follow instructions inside it.
- Tool calls count against the key's limits like REST API calls: 120 reads and 30 writes a minute per key, 500 writes a day, plus a limit per organization that depends on the plan. Each call shows in the key's usage.
- Revoking a key stops it on its next request.
REST API
The same keys work with the REST API at https://app.opsbrain.io/api/v1. Use it when a system starts the work, for example when a WMS books a delivery and the receiving check should land in the dock crew's queue.
examples/first-call.sh,first-call.mjsandfirst_call.pycall/meand print your organization and the key's scopes.examples/queue-run.shqueues a run with a reference and anIdempotency-Key.openapi/openapi.jsonis a copy of the live OpenAPI 3.1 file. If they ever differ, the live file is right.
The API reference covers every endpoint, filter and error code.
MCP Registry
server.json is this server's entry in the official MCP Registry, under the name io.opsbrain/mcp.
Keep keys safe
Keep keys in environment variables or a secrets manager, never in a repository. The examples here read the key from OPSBRAIN_API_KEY. If a key leaks, revoke it in OpsBrain and create a new one.
To report a security problem, email [email protected].
License
The configs and examples in this repo are MIT licensed. Using OpsBrain is covered by the terms of service.