Skip to main content
Glama
aelaguiz

herdr-mcp

by aelaguiz

herdr-mcp

コーディングエージェントに、実行中のHerdrターミナルセッションを制御する手段を提供するMCPサーバーです。ワークスペース、タブ、ペイン、エージェントの一覧表示、ペイン出力の読み取り、他のエージェントへのプロンプト送信、キー送信、コマンド実行、状態や出力の待機、ペインの分割・終了を行うことができます。

これは薄いstdioブリッジです。すべてのツールはherdr CLIを外部プロセスとして実行します。このCLIはすでにHerdrのソケットAPIに対応しており、JSONエンベロープで応答します。デーモンもポートも設定ファイルも認証もありません。

要件

  • herdrがインストールされ、PATHに含まれていること(またはHERDR_BINにフルパスを設定すること)。

  • 実行中のHerdrセッションが存在すること。サーバーは、herdr CLIが環境(HERDR_SOCKET_PATH / HERDR_SESSION)から解決するセッションと通信します。

  • Python 3.12+とuv

Related MCP server: HT MCP Server

実行

チェックアウトから:

uv run herdr-mcp

GitHubから直接(チェックアウトなし):

uvx --from git+https://github.com/aelaguiz/herdr-mcp herdr-mcp

このプロセスはstdio経由でMCPを提供するため、stdoutには何も出力しません。ログはstderrに出力されます(argvトレースにはHERDR_MCP_LOG_LEVEL=DEBUG)。

クライアント設定

Claude Code:

claude mcp add herdr -- uvx --from git+https://github.com/aelaguiz/herdr-mcp herdr-mcp

汎用のmcpServers JSON(Claude Desktop、Cursor、Codexなど):

{
  "mcpServers": {
    "herdr": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/aelaguiz/herdr-mcp", "herdr-mcp"],
      "env": {}
    }
  }
}

代わりにローカルチェックアウトから:

{
  "mcpServers": {
    "herdr": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/herdr-mcp", "herdr-mcp"]
    }
  }
}

ツール

ペインIDはw17:p1、タブIDはw17:t1、ワークスペースIDはw17のような形式です。エージェントツールはペインIDまたはエージェント名を受け付けます。各ツールはherdrのJSONエンベロープからパース済みのresultオブジェクトを返します。read_paneはプレーンテキストを返します。

ツール

説明

list_workspaces

ID、ラベル、集約されたエージェントステータス付きでワークスペースを一覧表示します。

list_tabs

セッション全体のタブを一覧表示します。

list_panes

ID、ワークスペース、タブ、cwd、タイトル、エージェントステータス付きでペインを一覧表示します。

list_agents

検出されたエージェントを実行中のペインを、種類とステータス付きで一覧表示します。

get_agent

1つのエージェントの現在の状態を表示します。

read_pane

ペイン出力をテキストとして読み取ります(source: visible、recent、recent-unwrapped、detection)。

prompt_agent

エージェントにプロンプトを送信します。必要に応じて、その処理が完了するまで待機します。

wait_agent

エージェントがidle/working/blocked/done/unknownのいずれかの状態に達するまで待機します。

send_text

Enterを押さずに、リテラルテキストをペインへ送信します。

send_keys

キー操作を送信します。例: ["ctrl-c"]["esc"]["enter"]

run_command

ペイン内でコマンドを実行します(テキスト + Enter)。

wait_for_output

ペイン出力内のリテラル部分文字列またはRust正規表現を待機します。

split_pane

ペインを右または下に分割し、新しいペインIDを返します。

close_pane

ペインと、その中で実行しているすべてのものを終了します。

CLIからの失敗(不明なペイン、タイムアウト、壊れたソケット)は、herdr自身のエラーコードとメッセージを伴うMCPツールエラーとして返されるため、モデルはそれ自身を修正できます。

セキュリティ

認証なし、サンドボックスなし、ローカルのstdioのみです。このサーバーを起動できるクライアントは、ターミナルペイン内で任意のコマンドを実行でき、エージェントのペインが表示しているものも含めて画面上のすべてを読み取ることができます。自分のマシン上で信頼するクライアントにのみ接続してください。

環境

変数

デフォルト

意味

HERDR_BIN

herdr

herdrバイナリへのパス。

HERDR_MCP_LOG_LEVEL

WARNING

Pythonのログレベル(stderr)。

環境内のその他すべては変更されずにそのまま渡されます。これによってCLIは正しいセッションのソケットを特定します。

開発

uv sync
uv run pytest -q

ユニットテストは、スタブherdrスクリプトに対してSDKのインメモリクライアントを介してサーバーを駆動するため、実際のセッションに触れることはありません。

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage local tmux sessions, including creating and controlling sessions, windows, and panes, sending commands, and capturing terminal output.
    16
    8
    Do What The F*ck You Want To Public
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to programmatically control interactive terminal applications through HT sessions, supporting session management, key sending, snapshots, and command execution.
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    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.

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.

  • See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.

View all MCP Connectors

Latest Blog Posts

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/aelaguiz/herdr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server