Skip to main content
Glama

"Which of my agents are blocked?"

You: Which of my agents are blocked?

Assistant: Let me check your herdr agents...

┌──────────┬─────────┬────────┐
│ AGENT    │ STATUS  │ PANE   │
├──────────┼─────────┼────────┤
│ docs     │ blocked │ w2:p1  │
│ refactor │ blocked │ w1:p3  │
└──────────┴─────────┴────────┘

Two agents are blocked. "docs" is waiting on a review
decision in w2:p1. "refactor" hit a merge conflict in
w1:p3. Want me to prompt either of them?

Features

🔍 Monitor

List agents, check status (idle/working/blocked/done), read recent output

🚀 Control

Start agents, send prompts, manage terminal panes

🔒 Safe by default

Read-only tools always on; write tools require explicit opt-in

🌐 Remote support

Target agents on remote machines via --machine

🤖 Universal

Works with Grok Bot, Cursor, Claude, and any MCP client


Related MCP server: goose-herdr

Quick Install

Every snippet below starts herdr-mcp read-only. See Safety Model to turn on write tools.

Grok Bot (X plugin marketplace)

Install the herdr-mcp plugin from the Grok Bot marketplace. To let the assistant start or prompt agents, set Enable write operations to 1 in the plugin settings.

Cursor

Add to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects:

{
  "mcpServers": {
    "herdr": {
      "command": "npx",
      "args": ["-y", "herdr-mcp"]
    }
  }
}

Claude Code

claude mcp add herdr -- npx -y herdr-mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS:

{
  "mcpServers": {
    "herdr": {
      "command": "npx",
      "args": ["-y", "herdr-mcp"]
    }
  }
}

Any MCP Client

npx -y herdr-mcp

herdr-mcp speaks MCP over stdio and needs the herdr binary on PATH (Node.js 20+).


Safety Model

herdr-mcp is read-only by default. Assistants can watch your agents but can't change anything until you opt in.

Mode

Tools offered

Enable with

Read-only (default)

The 8 read tools

Nothing

Read + write

The 8 read tools plus the 6 write tools

HERDR_MCP_ALLOW_WRITE=1 (exactly 1)

To opt in, add an env block to the server config:

"env": { "HERDR_MCP_ALLOW_WRITE": "1" }

In read-only mode the write tools aren't registered: they don't appear in the assistant's tool list, and calling one by name fails before herdr ever runs.

  • No shell passthrough. There is no tool for herdr's pane run or pane send-text, or anything else that runs an arbitrary command. herdr is launched with an argument array and no shell, so nothing is interpolated.

  • No flag injection. IDs, agent names, kinds, and keys are validated so they can't be read as herdr options. Prompt text goes in herdr's verbatim text slot, so a prompt like --wait stays text.

  • Bounded calls. Every herdr call has a timeout (5 minutes at most for waits), a 256 KiB output cap, and is cancelled when the client cancels the request. A herdr process that ignores SIGTERM gets SIGKILL.

  • Tool annotations. Read tools are marked readOnlyHint. herdr_agent_prompt, herdr_agent_send_keys, and herdr_pane_close are marked destructiveHint, so clients that honor annotations can ask before running them.

One caveat for write mode: herdr_agent_start passes agent_args straight through to the agent's own CLI. Those can include flags that loosen the agent's safety settings, so only approve args you'd type yourself.


Tools

Tool names are stable across releases.

Read-only tools (always offered)

Tool

Description

herdr_status

Check that the herdr server is running and report its version

herdr_workspace_list

List workspaces

herdr_tab_list

List tabs, optionally in one workspace

herdr_pane_list

List panes, optionally in one workspace

herdr_agent_list

List agents with status (idle/working/blocked/done/unknown)

herdr_agent_get

Get one agent's status, pane, cwd, and session info

herdr_agent_read

Read recent terminal output from an agent as plain text

herdr_agent_wait

Wait until an agent reaches a status, with a timeout

Write tools (offered only with HERDR_MCP_ALLOW_WRITE=1)

Tool

Description

herdr_tab_create

Create a tab whose root pane is an empty shell; doesn't take focus unless focus: true

herdr_agent_start

Start an agent (claude, codex, cursor, grok, ...) in a pane at a shell prompt

herdr_agent_prompt

Send a prompt to an agent, optionally waiting for it to settle

herdr_agent_send_keys

Send key presses such as esc, ctrl+c, or down enter

herdr_agent_rename

Rename an agent

herdr_pane_close

Close a pane and kill whatever runs in it


Remote Machines

Point herdr-mcp at a machine you've saved in herdr (herdr machine add, then herdr machine list):

{
  "mcpServers": {
    "herdr-workbox": {
      "command": "npx",
      "args": ["-y", "herdr-mcp"],
      "env": {
        "HERDR_MCP_MACHINE": "Build machine"
      }
    }
  }
}

Every command is sent as herdr --machine "Build machine" ..., which herdr forwards over SSH to that machine's server. The value must be a saved profile label or ID, not a hostname. Workspace, pane, and agent IDs belong to that machine. To watch several machines, add one server entry per machine.


Usage Patterns

Monitor-first approach

Always check agent status before taking action:

1. herdr_agent_list → see all agents and their states
2. herdr_agent_read → check what an agent has been doing
3. herdr_agent_prompt → only if needed, with human approval

Start-then-prompt recipe

When the user asks for a new agent:

1. herdr_tab_create  → returns root_pane.pane_id, an empty shell
2. herdr_agent_start → returns once the agent is ready for input
3. herdr_agent_prompt → send the task the user approved

Critical caveat

The target pane must be at an idle shell prompt before herdr_agent_start. herdr refuses to start an agent in a pane that's running anything else, so create a fresh tab first.

The bundled skills/herdr/SKILL.md teaches assistants these patterns, along with herdr's error codes and when to ask a human.


Development

git clone https://github.com/sunnyvempati/herdr-mcp.git
cd herdr-mcp
npm ci
npm run build
npm test            # MCP-surface and runner tests against a fake herdr
npm run typecheck

The tests drive the built server through the official MCP client. src/test/fake-herdr.ts stands in for the herdr binary: it enforces herdr 0.9.5's argument grammar and replies with output captured from real herdr.

Smoke test (requires herdr with a running server)

npm run smoke       # or ./scripts/smoke.sh

It exercises every read-only tool against your real herdr and never enables write mode. Set HERDR_MCP_MACHINE to smoke-test a remote machine.


Contributing

See CONTRIBUTING.md. Coding agents (and humans) should read AGENTS.md for the engineering principles this repo follows.


License

MIT


Available Tools

8 tools
herdr_agent_getGet agentA
Read-onlyIdempotent

Get one agent's status, pane location, working directory, terminal title, and session info.

Inputs: agent (required).

herdr_agent_listList agentsA
Read-onlyIdempotent

List the coding agents herdr recognizes, with each agent's status (idle/working/blocked/done/unknown) and pane. The primary monitoring tool.

Inputs: no named parameters.

herdr_agent_readRead agent outputA
Read-onlyIdempotent

Read recent terminal output from an agent's pane as plain text. Use it to see what an agent did, what it is asking, or why it failed.

Inputs: agent (required), lines, source.

herdr_agent_waitWait for agentA
Read-onlyIdempotent

Wait until an agent reaches a status. Without 'until', waits for idle, done, or blocked. Returns immediately if the agent already matches.

Inputs: agent (required), until, timeout_ms.

herdr_pane_listList panesB
Read-onlyIdempotent

List panes. A pane is a real terminal that survives client detach; it may hold a shell, a process, or a coding agent.

Inputs: workspace_id.

herdr_statusherdr statusA
Read-onlyIdempotent

Check that the herdr server is running and report its version. Call this first if other herdr tools fail.

Inputs: no named parameters.

herdr_tab_listList tabsA
Read-onlyIdempotent

List tabs. Tabs are layouts inside a workspace; each contains one or more panes.

Inputs: workspace_id.

herdr_workspace_listList workspacesA
Read-onlyIdempotent

List herdr workspaces. A workspace is a project-level container that owns tabs and panes and rolls up agent states.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a distinct purpose: status check, lists for workspaces/tabs/panes, and agent-specific operations (list, get, read, wait). The list/read/wait agent tools are clearly differentiated by their descriptions, so an agent can easily choose the right one.

    Naming Consistency4/5

    Almost all tools follow a consistent herdr_ prefix and noun_verb pattern (e.g., herdr_workspace_list, herdr_agent_get). The only deviation is herdr_status, which lacks a verb, but it remains readable and predictable overall.

    Tool Count5/5

    8 tools is a well-scoped set for a monitoring-focused server. Each tool earns its place by covering a distinct resource or agent operation without redundancy.

    Completeness4/5

    The surface covers listing workspaces, tabs, panes, and agents, plus detailed agent monitoring (get, read, wait) and server status. However, it lacks get operations for workspaces, tabs, or panes, and offers no control actions (e.g., create, close, start agent), which are minor gaps for a monitoring server.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to orchestrate Herdr coding agents by wrapping its Unix-socket JSON-RPC API, providing tools for agent management, layout editing, and terminal interaction.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables goose to control the Herdr terminal workspace manager, allowing AI agents to inspect and manipulate workspaces, tabs, panes, run commands, and manage agent states.
      3
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables coding agents to control and inspect a running Herdr terminal session, including listing workspaces, tabs, panes, and agents, reading pane output, prompting agents, sending keys and commands, waiting for output or state, and splitting or closing panes.
      14
      -