herdr-mcp
This MCP server exposes the Herdr terminal multiplexer API, enabling AI agents to orchestrate multi-agent workflows across git worktrees through 20 specialized tools.
Server & Session Management
herdr_ping— Check server connectivity and retrieve version/protocol infoherdr_session_snapshot— Dump the full session state (workspaces, tabs, panes, layouts, agents) for debugging
Workspace Management
herdr_workspace_list— List all open workspacesherdr_workspace_get— Retrieve details of a specific workspace (label, tab/pane count, worktree info)
Tab Management
herdr_tab_list— List tabs, optionally filtered by workspace, with agent status infoherdr_tab_get— Get details of a specific tab
Pane Management
herdr_pane_list— List all panes, optionally filtered by workspaceherdr_pane_get— Get detailed pane info (cwd, agent status, terminal info, scroll info)herdr_pane_split— Split a pane right or down to create a new pane (used for launching reviewers)herdr_pane_send_input— Send text and/or key presses to a paneherdr_pane_wait_for_output— Block until pane output matches a substring or regex pattern
Agent Lifecycle
herdr_agent_start— Launch an opencode agent inside a paneherdr_agent_prompt— Send a prompt to a running agent, optionally waiting for a specific status (idle/working/blocked/done/unknown)herdr_agent_get— Retrieve current agent status and infoherdr_agent_wait— Block until an agent reaches one of the specified statusesherdr_agent_read— Read recent terminal output from an agent (useful for checking task completion or blocked questions)herdr_agent_send_keys— Send key presses to an agent's terminal (e.g., CtrlC to interrupt a stuck agent)
Git Worktree Management
herdr_worktree_create— Create a git worktree and open it as a Herdr workspace, returning workspace and pane IDsherdr_worktree_remove— Destructively remove a worktree checkout and close its workspaceherdr_worktree_list— List all git worktrees for a repository with branch, path, and workspace info
These tools enable building multi-agent orchestration systems where agents work simultaneously in separate worktrees, with cross-review loops and automated merging.
Provides tools for managing git worktrees, including creating, listing, and removing worktrees, enabling parallel development workflows.
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.
herd-orchestrator
Multi-agent worktree orchestrator — an MCP server, opencode commands, and an installer that together turn any AI coding agent into a reactive orchestration engine for git worktrees.
herd-orchestrator/
├── server.js # MCP server (20 tools)
├── commands/ # /orchestrate + /plan-worktrees
├── tools/ # one file per MCP tool
├── install.sh # one-command installer
├── test/ # smoke test + tool tests
└── src/client.js # JSON-RPC client for herdrWhat it includes
MCP server (server.js)
20 hand-crafted tools that expose the Herdr terminal API through the Model
Context Protocol. No schema auto-generation — each tool is a file with explicit
input schemas and descriptions. The full set is orchestration-relevant
(worktree.*, agent.*, pane.*, workspace.*, tab.*).
Commands (commands/)
Command | What it does |
| Reads a task config, deploys workers in parallel worktrees, monitors/unblocks them, cross-reviews with a rework loop, merges, and cleans up |
| Interviews you about a feature, decomposes it into parallelizable tasks, and writes the config that |
Both commands ship with the operating knowledge learned from real runs (agent start races, TUI prompt swallowing, nested status fields, blocked handling).
Installer (install.sh)
Registers the MCP server in opencode's config and copies all commands to
opencode's command directory — without touching your existing MCP entries or
configuration. Idempotent, safe with invalid configs, supports --dry-run.
Related MCP server: cmuxlayer
Requirements
Node.js 18+ (only for the MCP server)
git (worktrees are native git — always required)
opencode (to use the commands; subagents are used in git-native mode)
Herdr (optional) — used by the MCP server and, when available, by
/orchestrate. Without herdr,/orchestratefalls back to a git-native mode that creates worktrees itself and drives opencode subagents, so the pipeline still works herdr-free.
Installation
git clone git@github.com:Twinber/herd-orchestrator.git
cd herd-orchestrator
npm install
./install.sh # global install (~/.config/opencode)Options: --project, --dry-run, --no-test.
Restart opencode. The herdr_* MCP tools and /orchestrate + /plan-worktrees
commands will be available.
Workflow
The orchestrator turns a feature request into merged code through three layers:
1. Plan (/plan-worktrees)
You describe what you want to build. The command interviews you, identifies parallelizable tasks (non-overlapping files, no dependencies), and writes a config file with all the details:
{
"repo": { "cwd": "/path/to/repo", "base_branch": "main" },
"issues": [
{ "id": "task-a", "branch": "tasks/task-a", "title": "...", "prompt": "..." },
{ "id": "task-b", "branch": "tasks/task-b", "title": "...", "prompt": "..." }
]
}2. Orchestrate (/orchestrate)
You point the orchestrator at that config. It drives the pipeline in one of two modes, selected automatically at startup:
herdr mode — when the
herdr_*MCP tools respond. Deploys one opencode agent per worktree through herdr:worktree.create → agent.start → agent.prompt → agent.get/read/wait │ │ │ │ Create worktree Launch agent Send task Monitor + workspace opencode in to the worker (working/blocked/ the pane idle/done)git-native mode — when herdr isn't available. The orchestrator creates the worktrees itself with
git worktree addand launches opencode subagents with thetasktool (workers and reviewers). The pipeline phases are the same; only the transport differs:git worktree add → task (worker) → task (reviewer) → git merge creates branch implements in reviews the diff integrates + worktree dir the worktree (APPROVE / REQUEST) --no-ff
Worktrees are created from the base branch in both modes — each worker starts from the same commit, so they can modify the same files without interfering.
Cross-review loop — when a worker finishes, a reviewer in a fresh pane inspects the diff. If it says
CHANGES_REQUESTED, the feedback goes back to the same worker for fixes, then a new reviewer re-checks. Loop untilAPPROVEormax_review_roundsis exhausted.Integration — approved tasks are merged to the base branch sequentially. Git handles any conflicts automatically (ort strategy).
Cleanup — workspaces and worktrees are removed; local branches are deleted.
3. Result
The orchestrator reports per task: status, review verdict, and merge result. All commits land on the base branch, each task in its own merge commit, with the original micro-commits preserved in the history.
Real example
In a production run with the app-clima Flutter project (10 tasks), the pipeline completed in three parallel rounds:
Round | Tasks | Files | Result |
1 | weather-model, about-screen, pull-to-refresh | models, UI, routes | 3 merged |
2 | extended-conditions, sunrise-sunset, share-weather | widgets, forecast tiles | 3 merged (1 rework) |
3 | dark-mode, settings, temp-chart, favorite-cities | theme, settings, chart, favorites | 4 merged (1 rework) |
A cross-review loop triggered twice (about-screen: missing tests + label fix; temp-chart: missing LineTouchData). Both were resolved in one rework round.
Tests
npm test # smoke test (MCP handshake + tools/list + tools/call)
npm run test:tools # unit tests for the read-only toolsLicense
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 updated2019Apache 2.0
- AlicenseAqualityAmaintenanceMCP 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