pidp10-mcp
Click on "Deploy 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., "@pidp10-mcp open a connection to the PiDP-10 and send ~z to call ITS"
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.
pidp10-mcp
An MCP server for driving an ITS session on a PiDP-10 (simh KA10) emulator over its raw TCP terminal line.
It exists because generic telnet MCP servers do not work against this target: they cannot transmit raw control bytes, they tie the TCP connection's lifetime to tool-call cadence, and they reconnect dead sessions in the background — which, on a port that maps to a single terminal line, produces zombie connections fighting each other for it.
What it does differently
Raw control bytes get through. A
~-escape syntax insendputs exact bytes on the wire:~zfor the Ctrl-Z that calls ITS,~efor the ESC that DDT prints as$,~xNNfor anything else.The connection belongs to the server process, not to tool calls. A background reader drains the socket continuously into a 256 KB scrollback. Nothing cares how long the client spends thinking between calls; a three-minute gap is invisible to the session.
It never reconnects on its own. If the socket dies, the session is marked dead and the next tool response says so. Reopening is an explicit decision.
Closes hard.
close()setsSO_LINGERto zero so the socket is reset rather than left in a half-closed state that keeps the line marked busy, and the same teardown runs fromatexitplus SIGTERM/SIGHUP handlers.Terse responses. Only output produced since the last call, VT52 noise stripped, followed by one trailer line. No banners, no echoed inputs, no re-dumping the session log.
Related MCP server: mcp-ssh-interactive
Install
Requires Python 3.11+ and the official mcp SDK 2.x.
uv sync # or: pip install -e .
uv run pidp10-mcp # stdio transport (default)Register it with an MCP client — for Claude Code:
claude mcp add pidp10 -- uv --directory /path/to/pidp10/mcp run pidp10-mcpor by hand, in an mcpServers config block:
{
"mcpServers": {
"pidp10": {
"command": "uv",
"args": ["--directory", "/path/to/pidp10/mcp", "run", "pidp10-mcp"],
"env": { "PIDP10_HOST": "pidp10.local", "PIDP10_PORT": "10018" }
}
}
}Streamable HTTP
uv run pidp10-mcp --http --http-host 127.0.0.1 --http-port 8010Configuration
Env var | CLI flag | Default | Meaning |
|
|
| Emulator host |
|
|
| Emulator TCP port (one line) |
|
|
| Bind address for |
|
|
| Bind port for |
open(host, port) can override the host and port per call.
Escape syntax
Escapes are expanded in send's input. An unknown escape is an error rather
than being passed through as text — silently sending ~q to DDT is worse than
a rejection.
Escape | Byte | Meaning |
|
| Ctrl-Z — calls ITS; a fresh line ignores all other input |
|
| ESC / altmode — DDT's |
|
| Ctrl-C |
|
| Ctrl-G |
|
| Rubout |
|
| Ctrl-S |
|
| Ctrl-O |
|
| CR, when an explicit one is wanted mid-line |
|
| LF — a DDT command (examine next location), not a newline |
|
| Tab |
|
| Any byte, two hex digits |
|
| Literal tilde |
| — | At the very end: do not append the automatic CR |
Line endings
send appends a CR (0x0D) automatically, because that is what the line
editor wants, and normalises any literal LF or CRLF in the input to CR. A bare
LF is not a newline on this system — it is a DDT command. If you genuinely
want to send one, ~n is exempt from normalisation.
raw=true sends the expanded bytes verbatim: no CR appended, no normalisation.
Tools
Tool | Purpose |
| Connect. Idempotent — reports status if already open. Returns any greeting bytes. |
| Send input, return the output it produced. |
| Collect more output without sending anything. |
| Re-show recent scrollback without moving the read cursor. |
| Connected?, host:port, uptime, bytes, pending output, death reason. |
| Hard-close the socket so the emulator frees the line. |
How send and read decide to return
They return on whichever comes first:
expect(a regex) matches the new output → reasonmatchedthe line has been silent for
quiet_ms→ reasonquiettimeout_mselapses → reasontimeout
The quiet timer only starts after the first byte arrives, so a program that
takes five seconds to say anything is not cut off at 700 ms. A call that sees
no output at all runs to timeout_ms and returns timeout.
With auto_more (default on), a trailing --More-- (Space=yes, Rubout=no)
prompt is answered with a space and collection continues, up to 20 pages; the
answered prompts are removed from the returned text. Hitting the cap returns
reason more_limit, and read continues from there. To flush a pager instead
of paging through it, send ~d (rubout).
send and read return only output produced since the last call. peek
does not move that cursor.
Output filtering
Raw output carries VT52 escape sequences, NUL padding and occasional telnet
IAC bytes. The filter drops NULs, ESC+letter sequences, ESC Y <row> <col>
cursor addressing, IAC negotiation (without implementing any telnet stack), and
other nonprinting bytes; it keeps text, tabs and newlines. CR, LF and CRLF all
become a single \n. Trailing whitespace and runs of blank lines are collapsed
in returned text to save tokens; the scrollback keeps the unabridged text.
Typical session
open()
send("~z", expect="Happy hacking|ITS") # ^Z calls ITS -> DDT banner
send(":login rms")
send(":listf") # pages collected automatically
send("foo~ej") # f-o-o ESC j CR (DDT's foo$j)
close()A detached but logged-in ITS session gets auto-logged-out after about five minutes; ITS itself never times out an idle line, so a held-open session is stable indefinitely.
Tests
uv run pytest # offline: filter, escapes, session, tools
PIDP10_LIVE=1 uv run pytest -m live # acceptance tests on a real emulator
PIDP10_LIVE=1 PIDP10_LIVE_SLOW=1 uv run pytest -m live # ...including the 3-minute idle testThe offline tests run the whole stack — including the MCP tool layer, via an in-process client — against a fake TCP line, so no emulator is needed.
Live tests are skipped unless PIDP10_LIVE=1; they take the single terminal
line for their duration. They honour PIDP10_HOST / PIDP10_PORT, plus
PIDP10_USER (default guest) and PIDP10_LISTF_DIR (default sys;, which
needs to be a directory big enough to make the pager appear).
The test_three_minute_gap_does_not_drop_the_session case sits idle for 190
seconds on purpose — it is the regression test for the failure that motivated
this server — so it needs PIDP10_LIVE_SLOW=1 as well.
Available Tools
6 toolscloseA
Hard-close the line so the emulator frees it for the next connection.
Inputs: no named parameters.
openA
Open the single TCP terminal line to the PDP-10.
Idempotent: if the line is already open this reports status instead of reconnecting. The connection is owned by the server and survives any gap between tool calls. Nothing reconnects automatically -- if the session dies you will be told, and reopening is your explicit decision.
ITS ignores all input on a fresh line until it receives a literal ^Z, so the usual next step is send("~z").
Inputs: host, port.
peekA
Re-show recent scrollback without consuming it.
Does not move the read cursor, so send and read still return the same
output afterwards. Use this to recover lost context.
Inputs: last_n_chars.
readA
Collect further output without sending anything.
For slow programs, or to continue after a more_limit. Same cursor
semantics as send: only output not already returned.
Inputs: expect, quiet_ms, auto_more, timeout_ms.
sendA
Send input to ITS and return the output it produced.
A CR (0x0D) is appended automatically -- that is what the line editor
wants -- unless input ends with the ~- marker or raw is true. Any
literal LF/CRLF in input is normalised to CR, because a bare LF is a DDT
command (examine next location) rather than a newline.
Returns only output produced since the previous call, plus a one-word end reason: matched, quiet, timeout, more_limit or dead.
Examples: send("z") calls ITS; send("fooej") sends f-o-o ESC j CR, the
DDT altmode form usually written foo$j; send(":login rms", expect="@").
Inputs: input (required), raw, expect, quiet_ms, +2 more.
statusB
Connection state, target, uptime, pending output and any death reason.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: open manages connection, send transmits input, read collects output, peek previews without consuming, status reports state, and close terminates. No overlapping purposes.
All tool names are concise single-word verbs (open, send, read, peek, status, close), following a uniform imperative style with no mixed conventions.
Six tools is ideal for a terminal connection server, covering the full lifecycle without redundancy or bloat.
The tool surface covers connection setup, sending, reading, non-destructive inspection, status checking, and teardown. No obvious missing operations for the stated purpose of interacting with a PDP-10 terminal line.
Maintenance
Related MCP Connectors
An MCP server that measures MCP client behaviour and converts EBCDIC to ASCII, which nobody needs.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that allows AI models to execute system commands on local machines or remote hosts via SSH, supporting persistent sessions and environment variables.145 npm28MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to run fully interactive SSH sessions (via tmux) and execute commands like a human operator, with persistent sessions and multiple concurrent connections.6MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for controlling iTerm2 terminal sessions, enabling screen reading, command execution, keystroke sending, and session management through natural language.1-
- AlicenseNot gradedqualityDmaintenanceMCP server for interactive TCP connection management, enabling opening listeners, managing sessions, port forwarding, proxy with logging, and local command execution from any MCP host.MIT