A Model Context Protocol (MCP) server that enables interaction with remote servers via the Telnet protocol.
- Telnet server connection and session management
- Command transmission and response reception
- Telnet protocol special command handling (IAC, option negotiation)
- Multiple concurrent session management
- ANSI control code preservation
{
"mcpServers": {
"telnet": {
"command": "npx",
"args": ["-y", "git+https://github.com/YUChoe/telnet-mcp"],
"disabled": false,
"autoApprove": []
}
}
}Connects to a Telnet server.
Arguments:
host(string): Host addressport(number): Port numbertimeout(number, optional): Connection timeout (default: 5000ms)
Returns: Session ID
Sends a command to an active session.
Arguments:
sessionId(string): Session IDcommand(string): Command to send
Reads response from the session buffer.
Arguments:
sessionId(string): Session IDwaitMs(number, optional): Data wait timeencoding(string, optional): Encoding method (utf8, base64, hex, binary)
Returns: Data from buffer
Terminates a session.
Arguments:
sessionId(string): Session ID
Lists all active sessions.
Returns: Array of session information
npm run buildnpm testnpm run devMIT
Model Context Protocol (MCP) 서버로 Telnet 프로토콜을 통해 원격 서버와 상호작용할 수 있습니다.
- Telnet 서버 연결 및 세션 관리
- 명령 전송 및 응답 수신
- Telnet 프로토콜 특수 명령 처리 (IAC, 옵션 협상)
- 여러 세션 동시 관리
- ANSI 제어 코드 보존
{
"mcpServers": {
"telnet": {
"command": "npx",
"args": ["-y", "git+https://github.com/YUChoe/telnet-mcp"],
"disabled": false,
"autoApprove": []
}
}
}Telnet 서버에 연결합니다.
인자:
host(string): 호스트 주소port(number): 포트 번호timeout(number, 선택): 연결 타임아웃 (기본값: 5000ms)
반환: 세션 ID
활성 세션에 명령을 전송합니다.
인자:
sessionId(string): 세션 IDcommand(string): 전송할 명령
세션의 버퍼에서 응답을 읽습니다.
인자:
sessionId(string): 세션 IDwaitMs(number, 선택): 데이터 대기 시간encoding(string, 선택): 인코딩 방식 (utf8, base64, hex, binary)
반환: 버퍼의 데이터
세션을 종료합니다.
인자:
sessionId(string): 세션 ID
모든 활성 세션 목록을 조회합니다.
반환: 세션 정보 배열
npm run buildnpm testnpm run devMIT