herdr-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@herdr-mcpsplit the current pane vertically"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
herdr-mcp
A Model Context Protocol (MCP) server that exposes 20 hand-crafted tools from the Herdr terminal API for AI agents — focused exclusively on multi-agent orchestration with git worktrees.
Each tool lives in its own file in tools/, with explicit input schemas, descriptions, and a direct JSON-RPC call to the Herdr Unix socket. No schema auto-generation, no magic.
Features
20 curated tools — only what's needed for worktree orchestration:
worktree.*,agent.*,pane.*,workspace.*,tab.*,ping,session.snapshot. No noise from graphics, plugins, layout management, or reporting APIs.One file per tool — each tool in
tools/<method>.jsexports{ name, description, inputSchema, handler }. Easy to read, test, and modify.WARNING prefix on destructive tools (
worktree.remove) to make the risk visible in the agent's tool list.Auto-timeouts — calls are capped by a client-side timeout (30s by default), and blocking tools that accept
timeout_msare given enough headroom to complete instead of being cut short.Dynamic socket discovery — the Herdr socket path is resolved automatically via
herdr status server --json.Zero-config — no environment variables or configuration required.
Related MCP server: cmuxlayer
How it works
Startup: the server loads the 20 tool definitions from
tools/index.js.Call: when a tool is invoked, the server sends the corresponding JSON-RPC request over the Herdr Unix socket and returns the result.
Tool naming follows herdr_<method> (dots become underscores), e.g. herdr_pane_split, herdr_agent_prompt, herdr_worktree_create.
Requirements
Node.js 18+
Herdr installed and running (the MCP talks to the Herdr server socket and discovers the socket path via
herdr status server --json). Theherdrbinary must be onPATH.opencode (to register the MCP server)
Installation in opencode
The included installer registers the MCP server in opencode's config and copies
all commands from commands/ (/orchestrate, /plan-worktrees)
into opencode's command directory — without breaking any existing config
(comments, formatting and unrelated MCP servers are preserved).
Clone or copy the project to the target machine:
git clone git@github.com:Twinber/herdr-mcp.git cd herdr-mcp npm installRun the installer:
./install.sh # install globally (~/.config/opencode) ./install.sh --project # install into the current project's .opencode/Options:
--dry-run— show what would change without writing anything;--no-test— skip the automaticnpm install+ smoke test;--all— expose all 89 herdr API tools (default: restricted to 20 orchestration tools).
The installer is idempotent: re-running it leaves an already-registered
mcp.herdruntouched, and it refuses to touch an unparseable config (aborting with nothing changed).Restart opencode. The
herdr_*tools will be available to agents (shown asherdr_herdr_*), and the/orchestrateand/plan-worktreescommands will be available globally.
Tool modes
By default the server exposes only the 20 tools needed for worktree
orchestration (worktree.*, agent.*, pane.* (split/send_input/
wait_for_output/list/get), workspace.*, tab.*, ping, session.snapshot).
Destructive or noisy tools (workspace.close, tab.close, pane.close,
server.stop, graphics, plugins, layout, reporting, ...) are excluded.
To expose all 89 tools (e.g. for full herdr API access), pass --all to the
installer or to server.js directly:
./install.sh --all
# or in opencode.jsonc:
# "command": ["node", "/path/to/server.js", "--all"]Development
npm test # run the smoke test (initializes the MCP, lists tools, calls herdr_pane_list)
npm start # run the server directly (stdio transport)The smoke test spawns the server over stdio, performs the MCP handshake, verifies tools/list, and makes a real tools/call against your running Herdr instance.
Multi-agent orchestration with /orchestrate
/orchestrate is an opencode command that turns an opencode agent into a
reactive orchestrator. It drives the herdr MCP tools to launch one opencode
subagent per git worktree, monitor/unblock them, cross-review, merge, push and
open PRs — reacting to what it observes instead of predicting states.
Usage (from any opencode session with the herdr MCP connected):
/orchestrate /path/to/tasks/config.json
/orchestrate <inline JSON>The config format and pipeline are documented in
commands/orchestrate.md. Example configs live in tasks/
(config.example.json, test-1.json, test-blocked.json).
Planning with /plan-worktrees
/plan-worktrees is the companion planning command. It interviews you about a
feature or fix you want, decomposes it into parallelizable tasks (non
overlapping files, no inter-task dependencies), and writes the factory JSON that
/orchestrate consumes directly.
/plan-worktrees # then answer the interviewer's questions
/plan-worktrees Add a station search box and a country filter to the map pageIt asks questions via the question tool until the repo details and the task
decomposition are unambiguous, writes the config to
<repo>/tasks/<date>-<slug>.json, summarizes the plan, and hands off with
/orchestrate <file>.
Project layout
herdr-mcp/
├── server.js # MCP entry (stdio transport, tools/list + tools/call)
├── install.sh # installer entrypoint
├── scripts/
│ └── install.mjs # merges mcp.herdr into opencode config, copies commands
├── tools/
│ ├── index.js # collects all 20 tool definitions
│ ├── ping.js
│ ├── session.snapshot.js
│ ├── workspace.list.js / workspace.get.js
│ ├── tab.list.js / tab.get.js
│ ├── pane.list.js / pane.get.js / pane.split.js / pane.send_input.js / pane.wait_for_output.js
│ ├── agent.start.js / agent.prompt.js / agent.get.js / agent.wait.js / agent.read.js / agent.send_keys.js
│ └── worktree.create.js / worktree.remove.js / worktree.list.js
├── src/
│ └── client.js # JSON-RPC client for the Herdr Unix socket
├── commands/ # /orchestrate + /plan-worktrees commands
├── tasks/ # task configs for /orchestrate
├── test/
│ └── smoke.js # end-to-end smoke test
└── package.jsonLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that publishes CLI tools on your machine for discoverability by LLMsLast updated151MIT
- AlicenseAqualityCmaintenanceTerminal multiplexer MCP server for orchestrating parallel AI agents. Manages workspaces, panes, surfaces with send_input/read_screen/spawn_agent/stop_agent tools. Supports Claude Code, Codex, Gemini, Cursor CLI agents with lifecycle management, browser automation, and agent status push via Claude --channels.Last updated2017Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for hyperpanes terminal workspace app, enabling AI agents to compose and launch workspace layouts, inspect and drive terminal panes, stream output, and orchestrate agent hierarchies.Last updated471MIT
- Alicense-qualityBmaintenanceMCP server for Hotwired multi-agent workflow orchestration, enabling AI agents to coordinate locally via Unix sockets with tools for protocol, messaging, and task management.Last updated12MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Twinber/herd-orchestrator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server