aiterm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GROK_BIN | No | Path to the Grok CLI binary. | |
| CODEX_BIN | No | Path to the Codex CLI binary. | |
| CLAUDE_BIN | No | Path to the Claude CLI binary. | |
| AITERM_TMUX | No | Path to the tmux binary. If not set, aiterm auto-searches common locations. | |
| XAI_API_KEY | No | API key for xAI as an alternative to GROK_AUTH_PATH. | |
| GROK_AUTH_PATH | No | Path to the validated Grok OAuth canonical authentication file. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| diagnosticsA | Factory 向け read-only 診断。安全な状態語彙だけを機械可読 JSON で返す(PTY 内容・認証情報・path・環境値は返さない)。2つ目のtextは親配送hook(Claude Code・Cursor)の登録状態で、caller_status が setup_required なら呼出元からのagent送信は拒否される。aiterm-setup を実行する。 |
| pty_openA | ローカル永続端末(POSIXはtmux、Windows nativeはpsmux 3.3.8以上)を1個開き、session_id を返す。backend server常駐ゆえ本サーバや クライアントが再起動してもセッションは生存する。リモート操作は専用ツールにせず、開いた端末の中で pty_send(session_id, "ssh host") と打って入る。 |
| pty_sendA | セッションへテキストを送る。通常PTYへは送信のみ(出力は pty_read で取得)。agent session(launcher起動)への送信はこのtoolだけで行い、子の状態はAitermが送る時点で見て振り分ける。子のturnが実行中なら各harness標準の操作で現在のturnへ差し込み(mode=agent_steer)、完了は差し込み後の作業の終わりに元の依頼への1回だけ届く。新しいevent_cursorと配送は作らない。それ以外は新しいturnとしてdispatchし(mode=agent_dispatch)、TUI の ready gate と submit 分離を通して即返り、receipt の event_cursor を返す。dispatch した子は投げっぱなしでよい=親はここで待たない。Codex親とClaude Code親にはAitermが回答本文を自動配送する。parent_deliveryがある場合はwait起動も通常の回答回収も不要。親は作業を続けるかターンを終える。Cursor親にはparent_deliveryとwait_processが付く。作業を続ければ次のツール返りに回答が差し込まれ、ターンを終える前にwait_processを背景で起動するとidle中の完了でも起きられる。ポーリングとpty_read(agent_transcript:true)は不要。その他の親では、完了通知をreceiptの |
| pty_readA | セッションの出力をトークン削減して読む(既定は前回読取位置からの増分)。削減: 制御文字除去 / 反復圧縮 / head+tail 折りたたみ+復元ヒント+メタ併記。agent_transcript:true は agent session の直近完了ターンの最終 assistant メッセージを公開されたharness記録から平文で返す。回答が空で終わったターンは誤りにせず、空のtextとanswer_empty:trueを返す。長い回答が screen tail で切れた時の回収用。 |
| pty_keyA | 制御キーを送る(C-c, C-d, Enter, Tab, Up, Down... の別名に対応)。acceptedは入力受付であり処理中断/会話維持の確認ではない。aiterm相関付きClaudeではC-cだけを許可し、承認UIはclaude_approvalで操作する。 |
| pty_closeA | セッションを閉じ、ログ/読取位置を破棄する。同じsession_idへの再試行は安全で、closed/already_closedのstructured receiptを返す。hibernate:trueはClaude・Codexのagent席を今すぐ休止し(idle時計と同じ手順)、会話と再開情報を残してhibernatedを返す。次のagent_launch(session_name)が同じ会話へ再開する。turn・子process・子への配送が動いている間はAGENT_BUSYで断る(終わってから呼び直す)。Claudeの席が利用上限でturnを終えている時(最後の入力の後の会話記録がrate_limited)は、上限の待ち画面のままでも休止できる。他の理由で休止できない時はAGENT_HIBERNATE_UNAVAILABLE、席は触らない。 |
| pty_listB | 握っているセッション一覧(名前 / 現在の前面コマンド / attach 状態 / サイズ / agent 情報)。 |
| pty_observeA | 指定sessionの存在、paneとharnessの生存、状態と理由、native process identity、画面変化とCPU活動を構造化して観測する。画面本文と生argvは返さない。 |
| agent_approvalA | Codexの現在の承認をinspectし、digestへ束縛した単発許可または拒否をrespondする。恒久許可は選ばない。Claudeは既存claude_approvalを使う。未知dialogはblockedのtyped errorで返す。 |
| claude_turnC | aiterm相関付きClaude sessionのdurable operationを構造化issue/recoverするmachine-caller専用面。pending/unknown/completedを人間向けerror文字列の解析なしで返し、Observer固有ロジックは持たない。 |
| claude_approvalA | aiterm相関付きClaudeのactive turn中に表示された権限確認UIを、turn相関を保ったまま検査・応答する専用面。inspectで画面digestと安全な単発Yes/Noだけを取得し、respondは同じoperation・同じdigestが現在も表示中の場合だけ送信する。 |
| agent_authA | 各harnessの公式CLI認証を開始・確認・取消する。CLIごとのコマンドと認証URL/codeの抽出はAitermが所有し、資格情報は各CLIだけが保存する。auth_uiの段階と公式URL・選択肢を表示する。入力はrespondで同じbindingへ送り、pty_send/pty_keyへ認証コードを渡さない。authenticatedは認証の結果であり、agent_launchの起動準備完了とは別。remoteは他toolと同じ標準対応。startは公式の状態が認証済みなら何も起こさずauthenticatedを返す。relogin:trueを付けると、認証済みに見えても公式ログインを開始する(別のアカウントへ入り直す時、ログインの期限切れを状態から見抜けない時)。Aitermは資格情報を消さず、置き換えは公式CLIが行う。Codexの公式ログインは、始めた時点で元のログインを消す(途中でcancelしても戻らない)。Antigravityのreloginは未対応を返す。 |
| agent_goalA | Read or manage the CLI's real goal for an exact session/launch. clear removes the goal without stopping its turn; resume requires a paused goal. Editing objective resets native usage accounting. User mutations require trusted host provenance. No goal store or worker is created. |
| agent_configureA | 起動済みのClaude/Codex/Grok/Cursor/Antigravity agent sessionを再起動せず、会話contextを保ったままmodel/reasoning effort/fastを変更する。各harnessのCLI標準model操作を使う。Cursorのreasoning_effort変更はmodelと同時指定する。Claude Codeの席では /model の選ぶ画面の「この会話だけ」(s)で替え、端末の ~/.claude/settings.json の既定は書き換えない。その選び方が無い版、選ぶ画面に無いmodel、そのmodelで選べないeffortは、何も変えずに断る。fastだけの指定も受ける。ファスト(harnessの高速の応答。費用や利用量が増える)。席は必ず通常の速度で起きる。trueはその席をfastへ切り替え、falseは通常の速度にする(fastに対応していないmodelでもfalseは受ける)。切り替えは席だけに留め、harnessが利用者の既定へ書いた分は切り替えの直前の値へ戻す。断りは文の先頭の符号で分かる: FAST_MODE_NOT_SUPPORTED(そのmodelは対応していない)、FAST_MODE_UNAVAILABLE(アカウントや契約で使えない)、FAST_MODE_MODEL_CONFLICT(modelへfast版のIDを書いてfalseを渡した)、FAST_MODE_UNCONFIRMED(切り替えた後の状態を確かめられない)。 |
| agent_modelsA | harnessが今返すmodelとreasoning effortの候補を、そのharnessの公式の一覧から取得する。promptもturnも送らず推論を消費しない。Codexはapp-server model/list、Claude Codeはstream-json initializeのmodels、Grokはagent stdio initializeのmodelState、Cursorはcursor-agent modelsを素のmodel IDとeffortへ分けたもの。Antigravityはagy modelsのeffortを含むIDをそのまま返す。返るidとeffortsはagent_launch/agent_configureへそのまま渡せる。modelごとのfastは、そのmodelでfastへ切り替えられるか(harnessが返す値)。fast_unavailableは、アカウントの都合でどのmodelでも使えない時の訳。取得不能はMODEL_CATALOG_UNAVAILABLE、形式異常はMODEL_CATALOG_INVALIDのエラーで返し、別の一覧へfallbackしない。remoteを付けると別端末のharnessの候補を返す。 |
| agent_launchA | エージェントを単一の標準入口から永続sessionへ起動する。harnessはagent loop・認証・hook・transcriptを所有する実行基盤、modelはそのharnessが選ぶ推論モデルであり別軸。Cursor harnessからGPT/Claude/Grok等を選んでも完了相関はCursor方式のまま。ComposerはCursorのmodelの一つで、harnessでもGrokのmodelでもない。harness=cursor-cli と model=composer-2.5-fast(またはcomposer-2.5)で指定する。remoteを付けると、SSHで入った別端末のAitermで同じ起動を行い、完了は同じ形で親へ届く。通常CLIと同じHOME・cwd・project/user/local設定・MCP・plugin・skill・permission/trustを共有する。aitermは完了相関stateだけをlaunch単位で所有する。起動されたagentにはsub-agent自己認識、親session、delegation depth/lineage、delegation_allowed=trueを注入し、必要な追加委譲は許可する。別のcomputer(登録済みの端末)で起こす時は、この起動にterminal(端末の登録元が渡す値をそのまま)とcwd(その端末のproject folder)を付ける。ここで起こしてからcd・sshしない。秘密の値はどの引数・prompt・送信文にも書かず、env_varsに名前だけを書く。dispatch した子は投げっぱなしでよい=親はここで待たない。Codex親とClaude Code親にはAitermが回答本文を自動配送する。parent_deliveryがある場合はwait起動も通常の回答回収も不要。親は作業を続けるかターンを終える。Cursor親にはparent_deliveryとwait_processが付く。作業を続ければ次のツール返りに回答が差し込まれ、ターンを終える前にwait_processを背景で起動するとidle中の完了でも起きられる。ポーリングとpty_read(agent_transcript:true)は不要。その他の親では、完了通知をreceiptの |
| claude_agentA | 【旧互換alias。新規連携は agent_launch(harness=claude-code)】Claude Codeの対話エージェントTUIを永続端末に起動する。 |
| codex_agentA | 【旧互換alias。新規連携は agent_launch(harness=codex-cli)】Codexの対話エージェント TUI を永続端末に起動する。実装・レビュー・調査を対話で回す。通常CLIと同じHOME・cwd・project/user/local設定・MCP・plugin・skill・permission/trustを共有する。aitermは完了相関stateだけをlaunch単位で所有する。起動されたagentにはsub-agent自己認識、親session、delegation depth/lineage、delegation_allowed=trueを注入し、必要な追加委譲は許可する。別のcomputer(登録済みの端末)で起こす時は、この起動にterminal(端末の登録元が渡す値をそのまま)とcwd(その端末のproject folder)を付ける。ここで起こしてからcd・sshしない。秘密の値はどの引数・prompt・送信文にも書かず、env_varsに名前だけを書く。委譲契約を使う完全な呼び出し例: |
| grok_agentA | 【旧互換alias。新規連携は agent_launch(harness=grok-cli)】Grok BuildのGrokモデル(既定 grok-4.6)の対話エージェント TUIを永続端末に起動する。通常CLIと同じHOME・cwd・project/user/local設定・MCP・plugin・skill・permission/trustを共有する。aitermは完了相関stateだけをlaunch単位で所有する。起動されたagentにはsub-agent自己認識、親session、delegation depth/lineage、delegation_allowed=trueを注入し、必要な追加委譲は許可する。別のcomputer(登録済みの端末)で起こす時は、この起動にterminal(端末の登録元が渡す値をそのまま)とcwd(その端末のproject folder)を付ける。ここで起こしてからcd・sshしない。秘密の値はどの引数・prompt・送信文にも書かず、env_varsに名前だけを書く。turn は pty_send で送る(自動で非ブロック dispatch になる)。dispatch した子は投げっぱなしでよい=親はここで待たない。Codex親とClaude Code親にはAitermが回答本文を自動配送する。parent_deliveryがある場合はwait起動も通常の回答回収も不要。親は作業を続けるかターンを終える。Cursor親にはparent_deliveryとwait_processが付く。作業を続ければ次のツール返りに回答が差し込まれ、ターンを終える前にwait_processを背景で起動するとidle中の完了でも起きられる。ポーリングとpty_read(agent_transcript:true)は不要。その他の親では、完了通知をreceiptの |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
There is real overlap: claude_agent, codex_agent, and grok_agent are explicit legacy aliases of agent_launch, and claude_turn duplicates the result-recovery role of pty_read(agent_transcript:true), while agent_approval vs claude_approval and pty_list vs pty_observe are close cousins. The descriptions do flag the aliases and per-harness scoping clearly, so a careful agent can disambiguate, but the surface still invites misselection.
A clear prefix-by-resource convention holds throughout (pty_open/pty_read/pty_send/pty_key/pty_list/pty_close/pty_observe, agent_launch/agent_auth/agent_models/agent_approval/agent_goal/agent_configure, claude_turn/claude_approval/claude_agent). Minor deviations exist: harness-named legacy tools (codex_agent, grok_agent) and the bare noun 'diagnostics' and verbless 'claude_turn' break the verb_noun rhythm.
At 19 tools it sits in the heavy-but-borderline band; the core set (PTY lifecycle, agent launch, auth, models, configure, approvals, observe) is defensible for an agent-orchestration server spanning five harnesses. However, three of the 19 are deprecated compatibility aliases that inflate the surface without adding capability, plus claude_turn overlaps existing read paths.
Coverage of the domain is solid: session open/close/list/observe/read/send/key, agent launch, auth, model catalog, live reconfiguration, per-harness approvals, goal management, and diagnostics. Gaps are minor — no explicit resize, no agent-launch listing/status tool, and no dedicated completion-wait tool despite wait_process being referenced repeatedly.