Skip to main content
Glama

openbot-mcp

An MCP server for directing and managing OpenBot agents from any MCP client (Claude Code, Claude Desktop, Cursor, …) through OpenBot's Local scripts API (docs/automation.md). It covers every route the API offers.

Prepare OpenBot

  1. Open the OpenBot app.

  2. For each agent you want to control: Settings → Permissions → Local scripts = On (agents without it are invisible to this server).

  3. OpenBot writes url / token files to %APPDATA%\OpenBot\automation\ (macOS ~/Library/Application Support/OpenBot/automation, Linux ~/.config/OpenBot/automation). The server re-reads them when OpenBot restarts, so there is no token to configure.

Related MCP server: OpenMesha

Create your first agent (Manager)

The MCP server needs at least one agent with Local scripts on, because:

  1. OpenBot starts its listener and writes the url / token files only while at least one agent has Local scripts on. With none, the MCP server has nothing to connect to.

  2. The Local scripts API has no route to create agents. This server's create_agent instead asks an existing agent to call OpenBot's built-in openbot.create_agent tool.

  3. A script cannot turn on Local scripts or widen permissions (an OpenBot security boundary), so you have to click it in the app at least once.

Make the first agent a Manager: its one job is creating agents and routing work. It never does the work itself. Turn on Local scripts for this agent only, so there is a single entry point from outside.

Profile

Field

Value

name

Manager

title

Team dispatcher

provider / model

claude / claude-opus-5-5 (or Sonnet to save quota)

reasoningEffort

medium (routing does not need deep thinking)

initialMessage

Introduce yourself in one line and list the agents on this team.

description (~900 characters, limit 2,000). Paste it verbatim:

You run my OpenBot team: you create agents and route work to them. You never do the work yourself.

When a message asks for a new agent, call openbot.create_agent with exactly the arguments given. Do not rewrite the description. Then call openbot.read_agent to verify it. When a routine is requested, create it with openbot.create_routine for the new agent's id. End with the line "CREATED_AGENT_ID: <id>".

When a message is a task, pick the one teammate whose job fits (openbot.list_agents), hand the task to it, and report its answer back in a few lines. If no teammate fits, say so and propose a new agent (name + one-job line) instead of doing it.

Never: write code, browse, or run commands for a task; change another agent's settings unless asked; delete agents.

Voice: brief, factual, no filler. Reply in the language of the message. You work when asked.

Why it is written this way:

  • It follows the one job → anti-jobs → voice → wake structure of OpenBot's "Agent Designer" skill.

  • "Do not rewrite the description" and the CREATED_AGENT_ID: line match the message that the create_agent tool sends. The tool uses that line to confirm the agent was created.

  • "You never do the work yourself" stops the Manager from doing a task itself when no teammate fits, so the roles stay separate.

Steps

  1. Open OpenBot. A fresh install likely comes with one default agent (the repo ships an "Eggbot Getting Started" skill for fresh installs).

  2. Chat with that agent. OpenBot creates agents by having an agent call its tool in chat:

    Use openbot.create_agent to create an agent named "Manager", title "Team dispatcher", provider claude, model claude-opus-5-5, reasoningEffort medium, with this description verbatim: (paste the description above) initialMessage: "Introduce yourself in one line and list the agents on this team." Then check the result with openbot.read_agent.

    If the app has a New agent button, you can enter the same values there instead.

  3. Turn on Manager → Settings → Permissions → Local scripts.

  4. Check from your MCP client: openbot_status (should show 1 agent), then send_message("Manager", "list the team", wait=true).

Next agents: create them through MCP

create_agent(manager: "Manager", name: "Reviewer", job: "...", antiJobs: [...],
             voice: "...", initialMessage: "...", dryRun: true)    # preview + warnings
create_agent(..., dryRun: false)                                     # create it

Or use the design_agent prompt to have the client ask you a few questions and draft it.

New agents start with Local scripts off. You can either:

  • turn Local scripts on for each one in the app, to direct it from MCP, or

  • leave it off and go through the Manager: send_message("Manager", "Give this to Reviewer: ...")

Agents that know your project

create_agent writes the profile from what your MCP client knows right now. Load the project first, then ask for the agent in the same session:

  1. Load context. Ask the client to read your project: llms.txt, docs, README, roadmap. For example: "Read https://www.mevlabs.xyz/llms.txt and every page it links to."

  2. Ask for the agent. "Create an agent for that thinks from this project's point of view." The client can now use real product names, constraints and priorities instead of a generic persona.

  3. Copy the facts into the profile. The new agent cannot see your client's session:

    • how: the source-of-truth URL (so it can re-read it), plus a 2–3 line summary of the project.

    • antiJobs: the project's hard rules, written as things it never does.

    • how: a fixed answer format, e.g. decision → why → tasks (owner, done when) → what I need from you.

  4. Preview, then create. Run dryRun: true, read the description, adjust, then dryRun: false.

  5. Check with the first task. Use an initialMessage such as "Read and list the 3 things that matter most right now." A vague or wrong answer means the profile is missing context.

Example: an integration-support agent for MEV Labs, made after the client read its llms.txt:

create_agent(
  manager: "Manager",
  name: "Integrator", title: "Partner integration support",
  job: "Answers a partner's integration question with the exact endpoint, request and error code
        from the MEV Protect docs.",
  antiJobs: [
    "Never promises a launch date, rebate rate or partner terms; they are agreed per partner",
    "Never asks for or handles private keys or seed phrases",
    "Never guesses an endpoint or field that is not in the docs; says it is not documented"
  ],
  how: [
    "Source of truth: https://www.mevlabs.xyz/llms.txt, mainly /docs/*.md",
    "Wallets → RPC https://rpc.mevlabs.xyz/<chain>/<key> (key is an identifier, not a secret);
     backends → API https://api.mevlabs.xyz/v1/<chain> with a Bearer key kept on the server",
    "Chain ids: bsc, arbitrum, base, robinhood, arc, elysium; revert protection on bsc only",
    "Answer as: the call (curl or JSON) → what comes back → the error codes to handle"
  ],
  voice: "Precise and brief; code first, one line of explanation",
  wake: "on-demand",
  initialMessage: "Read llms.txt and the docs, then show how a DEX backend submits a transaction on Base and reads its status.",
  dryRun: true
)

Every line in antiJobs and how comes from the site, not from the role name: the URLs, the chain ids, "the RPC key is not a secret" and "rebate terms are per partner" are what make it this project's support agent instead of a generic one.

Install

Run straight from GitHub, no clone needed (npm fetches the repo and builds it):

npx -y github:mevlabs-xyz/openbot-mcp

Or clone it. npm install also builds dist/ (via the prepare script):

git clone https://github.com/mevlabs-xyz/openbot-mcp.git
cd openbot-mcp
npm install

Claude Code

claude mcp add openbot --scope user -- npx -y github:mevlabs-xyz/openbot-mcp
# or, from a clone:
claude mcp add openbot --scope user -- node "/path/to/openbot-mcp/dist/index.js"

Claude Desktop / other clients (mcpServers)

{
  "mcpServers": {
    "openbot": {
      "command": "npx",
      "args": ["-y", "github:mevlabs-xyz/openbot-mcp"]
    }
  }
}

From a clone, use "command": "node" with "args": ["/path/to/openbot-mcp/dist/index.js"] instead.

On Windows, use a full path such as C:\\path\\to\\openbot-mcp\\dist\\index.js (escape backslashes in JSON).

Testing

1. Automated (no OpenBot needed)

npm test

This builds the project, then runs the real server (dist/index.js) over stdio against a mock OpenBot (test/mock-openbot.ts) and checks 19 scenarios: every tool, question/approval flows, timeouts, an OpenBot restart with a new token, read-only mode, and create_agent.

2. By hand with the MCP Inspector (no OpenBot needed)

# terminal 1
npm run mock

# terminal 2 (PowerShell)
$env:OPENBOT_AUTOMATION_DIR = "$PWD\.mock-openbot"
npm run inspect
# bash/zsh: OPENBOT_AUTOMATION_DIR="$PWD/.mock-openbot" npm run inspect

The mock has agents Ada (routine Wake) and Bob. Put these words in a message to trigger a case:

Word

Result

ASK

the agent asks a question: try get_pending → answer_prompt

APPROVE

the agent requests an approval: try respond_approval

SLOW

the job never ends: tests timeouts and the 409 from clear_context

3. Against the real OpenBot

Turn on Local scripts for an agent, check that url, token and headers exist in the automation folder, then run npm run inspect without OPENBOT_AUTOMATION_DIR set. Start read-only (list_agents, send_message with wait=true, get_pending, create_agent with dryRun=true) before creating anything. send_message and run_routine count toward the hourly limit (see Limits).

Tools

Tool

Route

What it does

openbot_status

GET /v1/agents

Checks that OpenBot is reachable

list_agents

GET /v1/agents

Lists agents and their routines

send_message

POST /messages (+ poll)

Sends a task. With wait=true, returns the answer or what the agent needs from a person

send_to_agents

POST /messages × N

Sends the same task to several agents at once

get_delivery

GET /deliveries/:id

Reads a delivery's status once

wait_for_delivery

GET /deliveries/:id + /pending

Waits until done, a person is needed, or timeout (sends progress notifications)

run_routine

POST /routines/:id/run

Runs a routine (by name or id) with an optional payload / waitId

update_agent_settings

POST /settings

Changes provider / model / effort / account

clear_context

POST /context/clear

Starts a new chat

get_pending

GET /pending

Lists questions, approvals and browser takeovers that wait for a person (no agent = all agents)

answer_prompt

POST /prompts/:id/answer

Answers a question

respond_approval

POST /approvals/:id/respond

Accepts or declines an approval

create_agent

POST /messages → manager agent

Drafts and checks a profile against the Agent Designer rules, then has a manager agent call openbot.create_agent (default dryRun=true = preview only)

agent accepts an id or a name (case-insensitive). OpenBot errors (400–429) become tool errors with an explanation and the response body (a 409 for a wrong model, for example, lists the valid models).

Resources: openbot://agents, openbot://agents/{agentId}/pending, openbot://guides/create-agent

Prompts: delegate (pick an agent, send the task, handle its questions), triage_pending (walk through everything that is waiting), design_agent (short interview → draft persona → preview → create)

Creating agents

The Local scripts API has no create route, so create_agent sends a step-by-step message to an existing (manager) agent, which calls the built-in openbot.create_agent tool. The rules come from the OpenBot repo (profile-tools.ts, tool-guidance.ts, the agent-designer skill):

  • description is the whole persona, at most 2,000 characters, in the order one job → anti-jobs → voice → wake, followed by the concrete "how".

  • name ≤ 80 characters, title ≤ 120, initialMessage (the first task) is required. Without provider/model/effort, the new agent uses the manager's.

  • Routines are created by the manager with openbot.create_routine, not by the new agent itself.

  • New agents have Local scripts off. Turn it on in the app before this server can see them.

  • The manager replies with a CREATED_AGENT_ID: <id> line, which the tool uses to confirm success.

Environment

Variable

Default

Effect

OPENBOT_AUTOMATION_DIR

per OS

Folder with url/token (e.g. a dev profile or the mock)

OPENBOT_MCP_READONLY

off

1 = register only read tools (create_agent stays, preview only)

OPENBOT_MCP_DISABLE_APPROVALS

off

1 = no respond_approval

OPENBOT_MCP_WAIT_SECONDS

300

Timeout for wait=true when none is given

Limits (from OpenBot itself)

  • The listener binds 127.0.0.1, so this server must run on the same computer as OpenBot, as the same OS user.

  • send_message and run_routine share a limit of 30 requests per hour per agent (change it in Server Settings › Agent defaults › Local scripts). Reads, answers, settings changes and new chats do not count.

  • No attachments. Agent names and permissions cannot be changed through the API.

  • Secret questions, browser takeovers and owner-only approvals must be handled in the OpenBot app (the API answers 403 / requiresOpenBot).

  • An MCP timeout or cancel stops only the wait. The agent keeps working; use wait_for_delivery to resume.

Layout

src/connection.ts          reads url/token, retries after an OpenBot restart, maps HTTP errors
src/api.ts                 typed wrapper for every route, resolves agents/routines by name
src/wait.ts                polls a delivery until done / needs a person / timeout / cancel
src/tools.ts               MCP tools, resources, prompts
src/agent-design.ts        agent creation rules (limits, enums, 4-part persona, manager message, guide)
src/agent-design-tools.ts  create_agent tool, design_agent prompt, guide resource
src/index.ts               stdio entry point and env flags
test/                      mock OpenBot, e2e smoke test (19 checks), run-mock helper

License

MIT

Available Tools

13 tools
answer_promptAnswer an agent's questionA

Answer a pending question from get_pending. answers maps question id → list of strings, e.g. {"build":["Debug"]}. For options:null questions send typed text; for the "choice" id send each picked label (without the " (…)" note). Expired requests give 409 — call get_pending again.

Inputs: agent (required), answers (required), requestId (required).

clear_contextStart a new chat with an agentA
DestructiveIdempotent

Same as New chat: the agent forgets the conversation and its next turn starts a fresh provider session. Instructions, model, tools, memories and workspace stay. 409 while the agent works or has queued messages — wait and retry.

Inputs: agent (required).

create_agentCreate a new OpenBot agent (via a manager agent)A

Compose and validate a new agent's profile the way OpenBot's Agent Designer does (one job → anti-jobs → voice → wake, description ≤ 2,000 chars), then ask an existing 'manager' agent to call openbot.create_agent with exactly those arguments. dryRun=true (default) only returns the description, the create_agent arguments, warnings and the message — nothing is sent. The Local scripts API cannot create agents itself; the new agent starts with Local scripts OFF. Read openbot://guides/create-agent for the rules.

Inputs: job (required), name (required), initialMessage (required), how, +13 more.

get_deliveryGet a delivery's statusA
Read-only

Read one message delivery once (no waiting): status queued/starting/running/completed/failed/interrupted/cancelled, and the agent's answer once it ended. Does not count toward the hourly limit.

Inputs: agent (required), deliveryId (required).

get_pendingGet requests waiting for a personA
Read-only

List questions (prompts), approvals and browser takeovers that an agent is blocked on. Omit agent to check every agent. Items with requiresOpenBot must be handled in the OpenBot app.

Inputs: agent.

list_agentsList OpenBot agentsA
Read-only

List the OpenBot agents that allow Local scripts, with their routines (id, name, active). Agents without Local scripts on are invisible to this server.

Inputs: no named parameters.

openbot_statusOpenBot connection statusA
Read-only

Check that OpenBot is running and reachable through the Local scripts API, and how many agents allow it. Use first when another tool reports OpenBot unreachable.

Inputs: no named parameters.

respond_approvalAccept or decline an agent's approval requestA
Destructive

Accept or decline an approval from get_pending (e.g. a command the agent wants to run). ALWAYS show the person the full kind/command/cwd/reason/permissions and get their explicit decision before accepting. Does not change saved permissions. Owner-only approvals give 403 — the person must answer in OpenBot.

Inputs: agent (required), decision (required), requestId (required).

run_routineRun an agent's routineA

Start one of an agent's routines now (like Test run, also when paused), optionally with an event payload the agent reads as data. With waitId, wakes only that open wait (openbot.await_event); without it, wakes every matching open wait. No retry key: calling twice runs twice.

Inputs: agent (required), routine (required), wait, waitId, +2 more.

send_messageSend a task to an agentA

Send a message to an OpenBot agent through its normal conversation queue. wait=true returns the agent's answer (or what it needs from a person); wait=false returns the deliveryId at once. Counts toward the agent's hourly limit (30 by default). Attachments are not supported.

Inputs: text (required), agent (required), wait, timeoutSeconds, +1 more.

send_to_agentsSend a task to several agentsA

Send the same message to several agents at once (fan-out) and optionally wait for all of them. Each agent gets its own delivery; failures are reported per agent.

Inputs: text (required), agents (required), wait, timeoutSeconds.

update_agent_settingsChange an agent's model / provider / accountA
Idempotent

Change an agent's provider, model, reasoning effort and/or provider account (same as the model and account controls in OpenBot). model alone picks the provider that lists it; provider alone uses its default model. Provider/account changes wait until the agent is idle (409 while it works). Invalid model/effort gives 409 with the valid values.

Inputs: agent (required), model, provider, reasoningEffort, +1 more.

wait_for_deliveryWait for a deliveryA
Read-only

Poll a delivery until the agent finishes, needs a person (question/approval/browser takeover — returned so you can answer), or the timeout passes. Use after send_message/run_routine with wait=false, or to resume a wait.

Inputs: agent (required), deliveryId (required), timeoutSeconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 13 tools

    Disambiguation4/5

    Each tool targets a distinct action on agents, deliveries, or pending items, and the descriptions explicitly cross-reference each other (e.g. get_delivery vs wait_for_delivery, answer_prompt vs respond_approval). The only near-overlaps are send_message vs send_to_agents (single vs fan-out) and get_delivery vs wait_for_delivery (read-once vs poll), both of which are clearly disambiguated in text.

    Naming Consistency4/5

    The set follows a nearly uniform verb_noun snake_case convention (list_agents, get_delivery, send_message, run_routine, update_agent_settings). Minor deviations are openbot_status (a prefixed, noun-first health check) and clear_context (object-less verb), but both remain readable and predictable.

    Tool Count5/5

    Thirteen tools sit squarely in the well-scoped range and each maps to a real operation: health, agent listing, creation, messaging, routines, delivery polling, pending handling, settings, and context reset. No tool feels redundant or filler.

    Completeness4/5

    Core lifecycle is covered: discover agents, send messages/routines, poll deliveries, resolve blocked questions and approvals, adjust model/provider, and reset context. Gaps are minor but real — no way to cancel/interrupt a running delivery, stop an agent, or delete/disable agents (partly constrained by the Local scripts API).

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers