docent-terminal-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DOCENT_TERMINAL_MCP_HOME | No | State directory. Default `~/.local/state/docent-terminal-mcp`. | |
| DOCENT_TERMINAL_MCP_SOCKET | No | tmux socket name, default `docent-terminal-mcp`. | |
| DOCENT_TERMINAL_MCP_SSH_ENV | No | A list of variable names (set in the session via session_create's env) to also set on the far side of `docent-terminal-mcp ssh` and `docent-terminal-mcp into`. | |
| DOCENT_TERMINAL_MCP_SUMMARY | No | Set to 0 to turn off reply summaries, for an A/B. | |
| DOCENT_TERMINAL_MCP_SOCKET_PATH | No | The shared server's Unix socket path, default `$XDG_RUNTIME_DIR/docent-terminal-mcp/server.sock`. | |
| DOCENT_TERMINAL_MCP_ATTACH_PREFIX | No | Words put before the attach command in replies and `/api/sessions`, for a server that runs where a person cannot run tmux directly: `openshell sandbox exec -n NAME --tty --`, `podman exec -it NAME`, `ssh -t HOST`. | |
| DOCENT_TERMINAL_MCP_KEEP_CLOSED_DAYS | No | Days to keep a closed session's logs; default 3, 0 keeps everything. Also set with `docent-terminal-mcp serve --keep-closed-days`. |
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": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| guideA | Usage guidance, worth one call before the first real use. Topics: patterns (one-shot shell habits -- pipes, redirects, -batch, sleep-and- poll, nohup -- and their interactive form, plus the gotchas), programs (gdb, python, REPLs, prompts, questions), fullscreen (vim, less, send order, screen view), output (timeouts, large output, views, the log files), sharing (working alongside a human or another agent). |
| session_createA | Start a terminal session: a tmux pane a human can watch or type into,
whose output is logged in full and kept as numbered regions. Use one
instead of a one-shot shell call for anything that runs a program with
a prompt (gdb, python, ssh, any REPL), takes more than a few seconds (a
build, a testsuite), prints more than a reply holds, may ask a question
(y/n), or that the user may want to watch or take over; a one-shot call
stays right for reading and editing files and for quick commands whose
whole output you want. Open one at the start of a task and do the
task's shell work in it with the With no Tell the user the session's name and attach command (in the reply) on
a line of its own, so they can watch or step in. First time here:
load the By default the pane follows the window of a human who attaches, so
|
| session_splitA | Split a session's window: a new pane beside it, shown together to a
human attached to that window, and a session of its own -- logged
from its first byte, with shell integration (exact exit statuses) by
default. Use it instead of typing |
| session_listA | List terminal sessions: state, what is running, size, who started each (you, a human, another agent), humans attached, the attach command, and presence: how old each session is, its last output, which agents typed into it and when, a human terminal's last input, a typing call in progress -- to judge whether a session you find is in use. Sessions started by earlier servers or by others are used by name like your own; a closed session's logs stay on disk for a few days (the listing says until when; session_logs keeps them). Worth a call at the start of a conversation: a session from an earlier one may still be running, its log intact. |
| session_resizeB | Set the pane size and pin it ( |
| session_closeA | Kill a session and whatever runs in it. Its logs and region files are
kept on disk for a few days (session_logs keeps them for good, or
deletes them). Refused for a session a person is attached to, and
for another's while a command runs there: leave those to their
owners, or ask the user to close it. Close what you are done with; a session another agent or
a human started is theirs to close. A session that shares a window
with others (a split) closes its own pane only; |
| session_logsA | Keep or delete a session's logs (its log directory: the full output,
regions, raw bytes). The usual rule: a closed session's logs are
deleted once they have been neither written nor read for a few days
(DOCENT_TERMINAL_MCP_KEEP_CLOSED_DAYS, default 3). Reading a closed
session's logs needs none of this -- and counts as use: the |
| runA | Type a line into the session, press Enter, and wait for the result: the session's form of a shell tool call, and of a line typed at gdb's or python's prompt. At a bash prompt (shell integration) it waits for the command to exit
and returns its output with the exit status (pipestatus for a pipeline;
no Output longer than At Several lines go one at a time, each once the previous is back at the
prompt; a line that asks a question or times out stops the rest. Into Python or IPython they go
as one paste (an exception drops the lines after it). Predictable
questions:
|
| shell_integrateA | Add shell integration to the bash now waiting at the prompt: exact
command boundaries and exit statuses for Sessions started without a |
| expectA | Script predictable interactions in one call: optionally type Ends when the command finishes (bash), the program is back at its
prompt ( Example, gdb's optional questions:
input="gdb -q -ex 'break lib_fn' -ex run ./prog",
respond=[{"pattern": "Make breakpoint pending", "line": "y"},
{"pattern": "Enable debuginfod", "line": "n"}]
Example, ssh, handing any password prompt to the human:
input="ssh host", respond=[{"pattern": "continue connecting", "line": "yes"},
{"pattern": "[Pp]assword:", "stop": true}]
Without Returns a transcript (what matched, what was sent), rules that never
fired, and the resulting region(s) as |
| sendA | Send keystrokes without waiting for a command's result (that is
For: interrupting (ctrl+c; ctrl+d ends input, or gdb/python at their
prompt; Keys are names such as ctrl+c, ctrl+d, enter, tab, escape, backspace,
up, down, left, right, home, end, pageup, pagedown, f1-f12, alt+x, or
any single character. Shell commands that finish during the call are
reported with their exit status. Refuses, like
|
| waitA | Keep waiting for what is running in the session -- what your last call
left running (a |
| readA | Read session output: the log or one region, by line number -- what
view="cooked" (default): the whole-session log as plain text with line
numbers, real line breaks only. With |
| searchA | Search session output (regex by default) without reading it all: what
Reports the total number of matching lines (so you know whether you
saw them all), then up to |
| regionsA | List the most recent regions: each command or program input with its
status (running, done, waiting at a question, ...), exit status, line
range and file. The session's history at a glance: to find a region id
for |
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 15 tools
Each tool has a distinct role: session lifecycle tools (session_create, session_split, session_list, session_resize, session_close, session_logs) are clearly separated, and interactive tools (run, send, wait, expect) are differentiated by whether they wait for completion, type keystrokes, or script prompts. Minor conceptual overlap between run/send/wait exists, but the detailed descriptions resolve it.
All tools use lower_snake_case, and session management tools share a consistent session_ prefix (session_create, session_split, session_list, etc.). However, non-session tools are a mix of plain verbs (run, send, wait, read, search, expect) and noun_verb (shell_integrate), and 'regions' is a bare noun, so the pattern is not uniformly verb_noun.
15 tools map cleanly to the domain's needs: 6 session lifecycle operations, 5 interaction tools, 3 output inspection tools, plus a guide. Each tool earns its place and no tool appears redundant or trivial for terminal session management.
The surface covers the full terminal session lifecycle: creating, splitting, listing, resizing, closing, and retaining logs, plus rich interaction (run, send, expect, wait, shell_integrate) and output analysis (read, search, regions). No obvious gaps for the stated purpose of managing and interacting with terminal sessions.