WP

wgthomas/putty-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 6 forks 质量 71 趋势 15MIT

MCP server exposing the full PuTTY toolchain — 30 tools for SSH, SCP, SFTP, serial, key management, registry sessions, and multi-hop

概览

The full PuTTY toolchain exposed as a Model Context Protocol (MCP) server. Gives AI assistants like Claude complete access to SSH, SCP, SFTP, serial, key management, and more — all through PuTTY's battle-tested Windows tools. across 8 categories. Windows-native. Covers every PuTTY executable. Most SSH MCP servers give you basic ssh and scp wrappers. This one wraps the with features you won't find elsewhere: - — Open a shell, send commands, read output over multiple turns. Background reader threads keep output flowing. - — Converts OpenSSH keys to PuTTY's PPK format in pure Python. No GUI puttygen needed. - — Full CRUD for PuTTY saved sessions. Create, read, update, delete sessions programmatically. - — Chain through jump hosts with automatically constructed proxy commands. - — Open PuTTY on COM ports with configurable baud, parity, stop bits. - — Load keys into PuTTY's SSH agent. - Python 3.

README

以下为原文 README 节选,完整内容请查看原文。

PuTTY MCP Server

The full PuTTY toolchain exposed as a Model Context Protocol (MCP) server. Gives AI assistants like Claude complete access to SSH, SCP, SFTP, serial, key management, and more — all through PuTTY’s battle-tested Windows tools.

30 tools across 8 categories. Windows-native. Covers every PuTTY executable.

What Makes This Different

Most SSH MCP servers give you basic ssh and scp wrappers. This one wraps the entire PuTTY suite with features you won’t find elsewhere:

  • Persistent interactive sessions — Open a shell, send commands, read output over multiple turns. Background reader threads keep output flowing.
  • Native PPK v3 key conversion — Converts OpenSSH keys to PuTTY’s PPK format in pure Python. No GUI puttygen needed.
  • Windows Registry integration — Full CRUD for PuTTY saved sessions. Create, read, update, delete sessions programmatically.
  • Multi-hop SSH — Chain through jump hosts with automatically constructed proxy commands.
  • Serial port support — Open PuTTY on COM ports with configurable baud, parity, stop bits.
  • Pageant integration — Load keys into PuTTY’s SSH agent.

Covered Executables

Executable Purpose
putty.exe GUI terminal sessions (SSH, Telnet, serial, raw)
plink Command-line SSH/Telnet/serial execution
pscp SCP/SFTP file transfer
psftp Interactive SFTP sessions
pageant SSH key agent
puttygen Key generation (via ssh-keygen + native PPK converter)

Quick Start

Prerequisites

  • Python 3.10+
  • PuTTY installed (all tools)
  • Windows (PuTTY is Windows-native; registry tools require Windows)

Install

git clone https://github.com/wgthomas/putty-mcp.git
cd putty-mcp
pip install -r requirements.txt

Configure Claude Code / Claude Desktop

Add to your MCP config (~/.claude.json or Claude Desktop settings):

{
  "mcpServers": {
    "putty": {
      "command": "python",
      "args": ["/path/to/putty-mcp/putty_mcp.py"],
      "env": {}
    }
  }
}

PuTTY executables are auto-detected from C:\Program Files\PuTTY, PATH, or PUTTY_PATH env var.

Tools (30)

GUI Launch (3)

Tool Description
putty_open Launch PuTTY with full connection parameters
putty_open_session Launch PuTTY from a saved session name
putty_serial Launch PuTTY on a serial port

Command Execution (3)

Tool Description
plink_exec Run a single command on a remote host via plink
plink_script Run commands from a local script file via plink
plink_tunnel Create SSH tunnel (port forward) or -nc connection

Persistent Sessions (5)

Tool Description
session_open Open persistent interactive session (SSH/Telnet/serial/raw)
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "putty": { "command": "python", "args": ["/path/to/putty-mcp/putty_mcp.py"], "env": {} } } }