ssh-chat-mcp
Click on "Install 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., "@ssh-chat-mcpSSH into 192.168.1.100 as root and run uptime"
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.
English
ssh-chat-mcp is a Model Context Protocol server that
lets an LLM client open temporary SSH/SFTP sessions to remote hosts, run commands
(including sudo -iu), and upload/download files — without the MCP server
holding any pre-baked credentials, hosts, paths, or environment secrets.
You start the server with no arguments. Then, in chat, you give the model a host
plus credentials, it calls connect, does its work, calls disconnect, and the
credentials are wiped from RAM.
Built by AI Platforms — on-premises LLM and computer-vision systems for enterprises that need their AI to stay inside their own server room.
Why zero-config
Most SSH automation wants you to put ~/.ssh/config, inventory.yml,
HOST=…, SSH_PRIVATE_KEY=… or similar on disk. That's fine for one stable
production target and a CI worker. It's wrong when:
You want an LLM client to occasionally SSH into a box you set up yesterday, deploy a thing, and walk away.
You don't want a hostname / username / key visible to anything that reads your MCP config — including extensions, IDE integrations, or other MCP servers.
You don't want the LLM client to remember anything about your infrastructure once the chat ends.
ssh-chat-mcp keeps the MCP layer pure and pushes every connection detail into
the conversation, where you (the user) can see it explicitly and where it dies
with the connection.
Install
Requires Node.js 20 or newer (22 recommended).
Option A — npx (recommended, zero install). Point your MCP client at
npx -y ssh-chat-mcp. The first run downloads the package; later runs are
instant from cache. Nothing to clone or build. See Integrations.
# verify it runs (starts silently; Ctrl+C to stop)
npx -y ssh-chat-mcpOption B — global install.
npm install -g ssh-chat-mcp
ssh-chat-mcp # starts the stdio serverOption C — from source (for development).
git clone https://github.com/aiplatforms-ru/ssh-chat-mcp.git
cd ssh-chat-mcp
npm install
npm run build
node build/index.jsIn all cases the server starts silently and must not print anything to stdout
(stdout is reserved for MCP JSON-RPC traffic). Press Ctrl+C twice quickly to
stop. A single Ctrl+C only cancels in-flight commands/jobs so MCP clients can
interrupt a tool call without killing the whole stdio transport. No output is
expected during normal operation.
Quick start
In your MCP client (Claude Code / Codex / Kilo / LM Studio / Cursor / etc.), register the server (see Integrations below), then say:
Use the
ssh-chatMCP. Callconnectwith connectionName=t1, host=203.0.113.10, username=deploy, password=<your password>. Then runexecwith commandwhoami && hostname. Thendisconnect.
That's the whole workflow: connect → do stuff → disconnect.
Tools
All inputs are validated with zod. All outputs and error messages pass through a redaction layer that removes:
Field values for keys named
password,passphrase,privateKey,sudoPassword,token,apiKey,Authorization,secret.password=,*_PASSWORD=,token=,secret=,Authorization: Bearer …patterns in text.PEM-encoded private key blocks.
Tool | What it does |
| Open an SSH session. Requires |
| Close the SSH+SFTP session and wipe credentials from memory. |
| Return non-sensitive metadata for all active connections. |
| Local MCP/SSH diagnostics. With no args it proves the MCP server is alive and lists connections/jobs. With |
| Run a shell command. With |
| Start a long-running command and return immediately with |
| Run as another Linux user via |
| Long-running version of |
| Read a command job status plus stdout/stderr slices. Pass returned |
| List known command jobs without logs. |
| Best-effort cancellation for a job. If the remote PID is known, sends the signal to the remote process group and closes the SSH channel. |
| Remove a completed/cancelled/failed job and drop its buffered logs. |
| SFTP upload one file. Optional |
| Recursive SFTP upload. Caller-supplied |
| SFTP download to local disk. |
| Read remote file as UTF-8 text, up to |
| Write text to a remote file via SFTP. Useful for staging systemd/nginx configs into |
Long-running commands
For commands that can exceed your MCP client's tool timeout, prefer:
exec_startorexec_as_startwith the long command.exec_statusevery so often, usingstdout.nextOffsetandstderr.nextOffsetfrom the previous response.exec_cancelif the job must be stopped.exec_removeafter completion if you want to drop the in-memory log buffers.
This keeps the MCP transport responsive: the first call only opens the SSH
channel and returns a jobId; stdout/stderr are held in rolling in-memory
buffers and read later by job id. If a job times out or is cancelled, the server
tries to signal the remote process group before closing the SSH channel.
Integrations
All snippets below use the npx form (npx -y ssh-chat-mcp) — no install,
no paths. If you installed from source instead, replace
{ "command": "npx", "args": ["-y", "ssh-chat-mcp"] } with
{ "command": "node", "args": ["/abs/path/to/ssh-chat-mcp/build/index.js"] }.
On Windows, npx-based clients sometimes need the launcher wrapped as
"command": "cmd", "args": ["/c", "npx", "-y", "ssh-chat-mcp"].
Claude Code (CLI)
claude mcp add ssh-chat --scope user -- npx -y ssh-chat-mcpVerify with /mcp inside Claude Code.
Claude Desktop
Edit:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Fully restart the Claude Desktop app (quit from tray, not just close the window).
OpenAI Codex CLI
Edit ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml):
[mcp_servers.ssh-chat]
command = 'npx'
args = ['-y', 'ssh-chat-mcp']
startup_timeout_sec = 30
tool_timeout_sec = 120
enabled = trueKilo Code
Edit ~/.config/kilo/kilo.jsonc:
{
"mcp": {
"ssh-chat": {
"type": "local",
"command": ["npx", "-y", "ssh-chat-mcp"],
"enabled": true,
"timeout": 120000
}
}
}LM Studio
Edit %USERPROFILE%\.lmstudio\mcp.json (Windows) or the equivalent on your OS:
{
"mcpServers": {
"ssh-chat": {
"command": "cmd",
"args": ["/c", "npx", "-y", "ssh-chat-mcp"]
}
}
}macOS / Linux:
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Continue.dev / Hermes / VS Code MCP extensions
Most MCP-capable extensions follow the same shape:
{
"name": "ssh-chat",
"command": "npx",
"args": ["-y", "ssh-chat-mcp"],
"transport": "stdio"
}Consult your client's docs for where this JSON lives.
Any stdio-capable MCP client
If your client supports stdio servers at all, point it at:
command:
npxargs:
["-y", "ssh-chat-mcp"]env / cwd: not needed
transport: stdio
There is intentionally nothing else to configure.
Example chat workflow
Use the
ssh-chatMCP. Connect to203.0.113.10:22asdeploywith the password I just gave you. UploadD:\Projects\myappto/tmp/myapp, excluding.gitandnode_modules. Asappuser, create a venv and installrequirements.txt. Write a systemd unit to/tmp/myapp.serviceandsudo mvit to/etc/systemd/system/. Reload systemd, enable and startmyapp.service. Write an nginx site to/tmp/myapp.nginxand install it to/etc/nginx/sites-available/, symlink it intosites-enabled/, runnginx -t, reload nginx. Thendisconnect.
Typical tool sequence:
connect— credentials enter memory.upload_directory— SFTP the project to/tmp/myapp.exec—cd /tmp/myapp && ...for unprivileged setup.exec_as—runAs: "appuser"for app-user steps (venv, pip).write_remote_file— stage/tmp/myapp.service.exec—sudo mv /tmp/myapp.service /etc/systemd/system/ && sudo systemctl daemon-reload && sudo systemctl enable --now myapp.exec—sudo nginx -t && sudo systemctl reload nginx.disconnect— credentials wiped.
Security
See SECURITY.md for the full threat model. Short version:
✅ Credentials never touch disk.
✅ Tool output and error messages pass through redaction.
✅
sudopassword is piped via stdin, never on a command line.✅ POSIX shell quoting on every
cwd/commandinterpolation.✅ Strict Linux-username validation on
runAs.⚠️ Host-key checking is off by design (zero-config means no on-disk known_hosts). The calling user is responsible for trusting the host.
⚠️ There is no destructive-command blacklist. Your MCP client's tool approval flow is the only checkpoint.
⚠️ Passing a password or private key into chat means it's visible in your chat client's transcript and may be logged by your model provider. Prefer local/private clients (LM Studio, Claude Code locally), and rotate credentials after the session if you have any doubt.
Development
npm install
npm run typecheck
npm test
npm run buildProject layout:
src/
index.ts MCP stdio server + tool registration
types.ts shared types
ssh/
connectionManager.ts in-memory Map<name, descriptor>
exec.ts exec, exec_as (sudo -iu)
sftp.ts upload/download/read/write
security/
redact.ts redact strings, values, errors
shellQuote.ts POSIX quoting, Linux-username validation
test/
redact.test.ts
shellQuote.test.ts
errors.test.tsRelated MCP server: mcp-ssh-tool
Русский
ssh-chat-mcp — это MCP-сервер, который
позволяет LLM-клиенту открывать временные SSH/SFTP-сессии к удалённым хостам,
выполнять команды (включая sudo -iu), загружать и скачивать файлы — без
каких-либо предзаписанных в конфиге кредов, хостов, путей и переменных окружения.
Сервер запускается без аргументов. Дальше в чате модель получает от тебя host
и креды, вызывает connect, делает работу, вызывает disconnect — и креды
стираются из памяти.
Сделано в AI Platforms — внедрение приватных LLM и систем компьютерного зрения для предприятий, которым нужно, чтобы ИИ оставался в их собственной серверной.
Зачем zero-config
Большинство SSH-автоматизаций просит положить на диск ~/.ssh/config,
inventory.yml, переменные HOST=…, SSH_PRIVATE_KEY=…. Это нормально для
одной стабильной прод-машины и CI-раннера. Это неправильно, когда:
Ты хочешь, чтобы LLM-клиент иногда зашёл по SSH на машину, которую ты поднял вчера, что-то задеплоил и забыл.
Ты не хочешь, чтобы hostname / username / ключ были видны всему, что читает твой MCP-конфиг — расширениям IDE, интеграциям, другим MCP-серверам.
Ты не хочешь, чтобы LLM-клиент вообще что-либо помнил про твою инфраструктуру после окончания чата.
ssh-chat-mcp держит MCP-слой чистым и пушит все детали подключения в
переписку, где они видны тебе явно и умирают вместе с соединением.
Установка
Требуется Node.js 20+ (рекомендуется 22).
Вариант A — npx (рекомендуется, без установки). Укажи MCP-клиенту
npx -y ssh-chat-mcp. Первый запуск скачает пакет, дальше — мгновенно из кэша.
Ничего клонировать и собирать не нужно. См. Интеграции.
# проверка запуска (стартует молча; Ctrl+C для остановки)
npx -y ssh-chat-mcpВариант B — глобальная установка.
npm install -g ssh-chat-mcp
ssh-chat-mcp # запускает stdio-серверВариант C — из исходников (для разработки).
git clone https://github.com/aiplatforms-ru/ssh-chat-mcp.git
cd ssh-chat-mcp
npm install
npm run build
node build/index.jsВо всех случаях сервер запускается молча и не должен ничего писать в stdout
(stdout зарезервирован под MCP JSON-RPC). Для остановки нажми Ctrl+C два раза
быстро. Один Ctrl+C только отменяет активные команды/jobs, чтобы MCP-клиенты
могли прервать tool call без убийства всего stdio-транспорта. В штатной работе
вывода быть не должно.
Быстрый старт
В твоём MCP-клиенте (Claude Code / Codex / Kilo / LM Studio / Cursor / …) зарегистрируй сервер (см. Интеграции) и скажи в чате:
Используй MCP
ssh-chat. Вызовиconnectс connectionName=t1, host=203.0.113.10, username=deploy, password=<твой пароль>. Потом запустиexecс command=whoami && hostname. Потомdisconnect.
Весь цикл: connect → работа → disconnect.
Инструменты
Все входы валидируются через zod. Все выходы и ошибки проходят через redaction-слой, который убирает:
Значения полей с именами
password,passphrase,privateKey,sudoPassword,token,apiKey,Authorization,secret.Паттерны
password=,*_PASSWORD=,token=,secret=,Authorization: Bearer …в тексте.PEM-блоки приватных ключей.
Инструмент | Что делает |
| Открывает SSH. Обязательно: |
| Закрывает SSH+SFTP, стирает креды из памяти. |
| Возвращает нечувствительные метаданные активных соединений. |
| Локальная диагностика MCP/SSH. Без аргументов доказывает, что MCP-сервер жив, и показывает соединения/jobs. С |
| Выполняет shell-команду. Если задан |
| Запускает долгую команду и сразу возвращает |
| Запуск как другой Linux-пользователь через |
| Долгая версия |
| Читает статус job и срезы stdout/stderr. Передавай возвращённые |
| Показывает известные jobs без логов. |
| Best-effort отмена job. Если известен remote PID, сигнал отправляется remote process group, затем закрывается SSH channel. |
| Удаляет завершённую/отменённую/упавшую job и очищает буферы логов. |
| SFTP-загрузка одного файла. Опционально |
| Рекурсивная SFTP-загрузка. |
| SFTP-скачивание на локальный диск. |
| Чтение удалённого файла как UTF-8, до |
| Запись текста на удалённый файл через SFTP. Полезно для staging systemd/nginx-конфигов в |
Долгие команды
Для команд, которые могут выйти за timeout MCP-клиента, используй:
exec_startилиexec_as_startс долгой командой.exec_statusвремя от времени, передаваяstdout.nextOffsetиstderr.nextOffsetиз прошлого ответа.exec_cancel, если job нужно остановить.exec_removeпосле завершения, если нужно очистить in-memory буферы логов.
Так MCP transport остаётся отзывчивым: первый вызов только открывает SSH channel
и возвращает jobId; stdout/stderr хранятся в rolling in-memory буферах и
читаются потом по job id. Если job получает timeout или отмену, сервер пытается
послать сигнал remote process group до закрытия SSH channel.
Интеграции
Все сниппеты ниже используют форму npx (npx -y ssh-chat-mcp) — без
установки и путей. Если ставил из исходников, замени
{ "command": "npx", "args": ["-y", "ssh-chat-mcp"] } на
{ "command": "node", "args": ["/abs/path/to/ssh-chat-mcp/build/index.js"] }.
На Windows некоторым клиентам npx нужно обернуть как
"command": "cmd", "args": ["/c", "npx", "-y", "ssh-chat-mcp"].
Claude Code (CLI)
claude mcp add ssh-chat --scope user -- npx -y ssh-chat-mcpПроверка: /mcp внутри Claude Code.
Claude Desktop
Файл:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Полностью перезапусти Claude Desktop (Quit из трея, не просто закрытие окна).
OpenAI Codex CLI
Файл ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml):
[mcp_servers.ssh-chat]
command = 'npx'
args = ['-y', 'ssh-chat-mcp']
startup_timeout_sec = 30
tool_timeout_sec = 120
enabled = trueKilo Code
Файл ~/.config/kilo/kilo.jsonc:
{
"mcp": {
"ssh-chat": {
"type": "local",
"command": ["npx", "-y", "ssh-chat-mcp"],
"enabled": true,
"timeout": 120000
}
}
}LM Studio
Файл %USERPROFILE%\.lmstudio\mcp.json (Windows) или аналог на твоей ОС:
{
"mcpServers": {
"ssh-chat": {
"command": "cmd",
"args": ["/c", "npx", "-y", "ssh-chat-mcp"]
}
}
}macOS / Linux:
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"ssh-chat": {
"command": "npx",
"args": ["-y", "ssh-chat-mcp"]
}
}
}Continue.dev / Hermes / VS Code MCP-расширения
Большинство MCP-совместимых расширений принимает форму:
{
"name": "ssh-chat",
"command": "npx",
"args": ["-y", "ssh-chat-mcp"],
"transport": "stdio"
}Конкретное место хранения JSON смотри в документации клиента.
Любой stdio-совместимый MCP-клиент
Если клиент вообще поддерживает stdio-серверы, укажи:
command:
npxargs:
["-y", "ssh-chat-mcp"]env / cwd: не нужно
transport: stdio
Больше настраивать сознательно нечего.
Пример сценария в чате
Используй MCP
ssh-chat. Подключись к203.0.113.10:22какdeployс паролем, который я только что дал. ЗалейD:\Projects\myappв/tmp/myapp, исключая.gitиnode_modules. Какappuserсоздай venv и поставьrequirements.txt. Запиши systemd-юнит в/tmp/myapp.serviceи черезsudo mvперенеси в/etc/systemd/system/. Перечитай systemd, включи и запустиmyapp.service. Запиши nginx-сайт в/tmp/myapp.nginx, перенеси в/etc/nginx/sites-available/, symlink вsites-enabled/, проверьnginx -t, перезагрузи nginx. Потомdisconnect.
Типичная последовательность инструментов:
connect— креды попадают в память.upload_directory— заливаем проект в/tmp/myapp.exec—cd /tmp/myapp && ...для непривилегированных шагов.exec_as—runAs: "appuser"для шагов от имени приложения.write_remote_file— staging/tmp/myapp.service.exec—sudo mv /tmp/myapp.service /etc/systemd/system/ && sudo systemctl daemon-reload && sudo systemctl enable --now myapp.exec—sudo nginx -t && sudo systemctl reload nginx.disconnect— креды стёрты.
Безопасность
Полная модель угроз — в SECURITY.md. Кратко:
✅ Креды не пишутся на диск.
✅ Вывод и ошибки проходят redaction.
✅ Пароль sudo идёт через stdin, никогда не в командной строке.
✅ POSIX shell quoting на каждом
cwd/command.✅ Строгая валидация
runAsкак Linux-юзера.⚠️ Проверка host-key выключена по дизайну (zero-config означает отсутствие on-disk known_hosts). Доверие к хосту — на стороне пользователя.
⚠️ Чёрного списка деструктивных команд нет. Единственная точка контроля — апрув инструментов в твоём MCP-клиенте.
⚠️ Передача пароля или ключа в чат означает, что они видны в транскрипте клиента и могут логироваться провайдером модели. Используй локальные/приватные клиенты (LM Studio, Claude Code локально). При сомнениях — ротация кредов после сессии.
Разработка
npm install
npm run typecheck
npm test
npm run buildСтруктура проекта:
src/
index.ts MCP stdio-сервер + регистрация инструментов
types.ts общие типы
ssh/
connectionManager.ts Map<name, descriptor> в памяти
exec.ts exec, exec_as (sudo -iu)
sftp.ts upload/download/read/write
security/
redact.ts redaction строк/значений/ошибок
shellQuote.ts POSIX-квотинг, валидация Linux-юзера
test/
redact.test.ts
shellQuote.test.ts
errors.test.tsAbout AI Platforms / О компании AI Platforms
AI Platforms — Russian systems integrator specialising in on-premises AI: private LLM/RAG stacks (DeepSeek, Qwen, Kimi, GLM), computer-vision for quality control and safety, AI chatbots and autonomous agents, 3D digital avatars, and GPU infrastructure. We deploy AI systems that stay inside our clients' server rooms — not in someone else's cloud.
AI Platforms — российский системный интегратор приватного ИИ: связки LLM/RAG (DeepSeek, Qwen, Kimi, GLM) на собственном железе клиента, компьютерное зрение для контроля качества и безопасности, ИИ-чат-боты и автономные агенты, 3D digital-аватары, GPU-инфраструктура. ИИ-системы остаются в серверной клиента, а не в чужом облаке.
🌐 Web: https://aiplatforms.ru/
✉️ E-mail: akvis-s@mail.ru
☎️ Tel: +7 (812) 987-70-07
📍 196006, St. Petersburg, Mitrofan'evskoe Shosse 29A, office 213
License
MIT © AI Platforms / ООО «Аквис-Сервис».
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aiplatforms-ru/ssh-chat-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server