mctelnet
Telnet for LLMs. Connect to BBSes, MUDs, network devices, or host your own telnet services.
claude mcp add mctelnet "uvx mctelnet"
Why?
LLMs can now interact with the vast world of telnet-accessible systems:
- Retro computing - BBSes, ASCII art servers, text adventures
- Network ops - Routers, switches, legacy infrastructure
- Automation - Expect-style scripting for any interactive prompt
- Hosting - Run telnet services that LLMs can manage
Quick Start
# Watch Star Wars in ASCII (really!)
connect("towel.blinkenlights.nl", 23, strip_ansi=True)
# Login to a server
expect_send(conn_id, "login:", "admin")
expect_send(conn_id, "Password:", "secret", hide_send=True)
expect_send(conn_id, "$ ", "uptime")
Features
Client Mode - Connect Anywhere
| Tool | What it does |
|---|---|
connect |
Connect with optional ANSI stripping, keepalive |
send |
Send text, auto-read response |
send_key |
Send escape sequences (ctrl-c, arrows, F-keys) |
expect |
Wait for patterns (supports regex) |
expect_send |
Wait then send - perfect for prompts |
run_script |
Full automation sequences |
connection_info |
Stats: bytes sent/received, uptime |
get_transcript |
Complete session history |
Server Mode - Host Services
| Tool | What it does |
|---|---|
start_server |
Listen on a port (localhost by default) |
list_clients |
See who's connected |
send_client |
Send to specific client |
broadcast |
Send to all clients |
read_client |
Get buffered client input |
Examples
Expect-Style Automation
# Scripted login + commands
run_script(conn_id, [
{"expect": "login:", "send": "admin"},
{"expect": "Password:", "send": "secret", "hide": True},
{"expect": "$ ", "send": "show version"},
{"expect": "$ ", "send": "exit"}
])
Terminal Keys
# Send escape sequences
send_key(conn_id, "ctrl-c") # Interrupt
send_key(conn_id, "up") # Arrow key
send_key(conn_id, "f1") # Function key
send_key(conn_id, "break") # Telnet break
# See all available keys
list_keys()
Regex Pattern Matching
# Flexible matching
expect(conn_id, [r"user(name)?:", r"login:"], regex=True)
expect_send(conn_id, "password", "secret", ignore_case=True)
Host a Service
# Start server (binds localhost:2323)
start_server(2323)
# Send welcome to new connections
send_client(server_id, client_id, "Welcome to my LLM-powered service!")
# Broadcast to everyone
broadcast(server_id, "Server shutting down in 5 minutes")
Installation
With Claude Code:
claude mcp add mctelnet "uvx mctelnet"
Standalone:
uvx mctelnet
From source:
git clone https://git.supported.systems/MCP/mctelnet
cd mctelnet
uv run mctelnet
Security
- Server mode binds to
127.0.0.1by default (localhost only) - Port validation (1-65535)
- Connection limits prevent resource exhaustion
- Graceful shutdown cleans up all connections
License
MIT
Metadata
Release files for mctelnet 2025.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mctelnet-2025.2.6.tar.gz | 14.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mctelnet-2025.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.7 kB
Release files / mctelnet-2025.2.6.tar.gz
| Download URL | mctelnet-2025.2.6.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fb51e4ac6efd692bdf26af142c0ed8a8f64ca6e9a2533a6f2bdde0afc518447
|
|
BLAKE2b-256 checksum How to use checksums |
f3e0c0dc43a1f01df6dceecbbf309da1bd3b26edabfb29ffeed4fa015de0e45f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / mctelnet-2025.2.6-py3-none-any.whl
| Download URL | mctelnet-2025.2.6-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0275f82fd3ea071225db893c4dc0efa59a602412e820bfeaec094d361993f389
|
|
BLAKE2b-256 checksum How to use checksums |
a43e0c575345f676e92b492304a41bf9fd7a37e325bfa9b31b9e5da828474b65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for mctelnet 2025.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.