MCP server providing telnet client capabilities for LLMs
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mctelnet-2025.2.6.tar.gz
(14.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mctelnet-2025.2.6.tar.gz.
File metadata
- Download URL: mctelnet-2025.2.6.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fb51e4ac6efd692bdf26af142c0ed8a8f64ca6e9a2533a6f2bdde0afc518447
|
|
| MD5 |
72562f31c1a86378eb916c3ffbda92f5
|
|
| BLAKE2b-256 |
f3e0c0dc43a1f01df6dceecbbf309da1bd3b26edabfb29ffeed4fa015de0e45f
|
File details
Details for the file mctelnet-2025.2.6-py3-none-any.whl.
File metadata
- Download URL: mctelnet-2025.2.6-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0275f82fd3ea071225db893c4dc0efa59a602412e820bfeaec094d361993f389
|
|
| MD5 |
82a100991e5e4746f08963c84d022038
|
|
| BLAKE2b-256 |
a43e0c575345f676e92b492304a41bf9fd7a37e325bfa9b31b9e5da828474b65
|