Skip to content
VS Code

SSH Session MCP for VS Code

io.github.zw-awa/ssh-session-mcp

Shared SSH PTY runtime for MCP clients with viewer, input lock, async tracking, and policy rules.

client:VS Code transport:stdio runtime:npm

Install SSH Session MCP in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "ssh-mcp-config",
      "description": "SSH_MCP_CONFIG",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-mcp-instance",
      "description": "SSH_MCP_INSTANCE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "viewer-port",
      "description": "VIEWER_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "viewer-host",
      "description": "VIEWER_HOST",
      "password": true
    },
    {
      "type": "promptString",
      "id": "auto-open-terminal",
      "description": "AUTO_OPEN_TERMINAL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-mcp-mode",
      "description": "SSH_MCP_MODE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-mcp-local",
      "description": "SSH_MCP_LOCAL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-mcp-debug",
      "description": "SSH_MCP_DEBUG",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-host",
      "description": "SSH_HOST",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-port",
      "description": "SSH_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-user",
      "description": "SSH_USER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-password",
      "description": "SSH_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh-key",
      "description": "SSH_KEY",
      "password": true
    }
  ],
  "servers": {
    "ssh-session-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ssh-session-mcp"
      ],
      "env": {
        "SSH_MCP_CONFIG": "${input:ssh-mcp-config}",
        "SSH_MCP_INSTANCE": "${input:ssh-mcp-instance}",
        "VIEWER_PORT": "${input:viewer-port}",
        "VIEWER_HOST": "${input:viewer-host}",
        "AUTO_OPEN_TERMINAL": "${input:auto-open-terminal}",
        "SSH_MCP_MODE": "${input:ssh-mcp-mode}",
        "SSH_MCP_LOCAL": "${input:ssh-mcp-local}",
        "SSH_MCP_DEBUG": "${input:ssh-mcp-debug}",
        "SSH_HOST": "${input:ssh-host}",
        "SSH_PORT": "${input:ssh-port}",
        "SSH_USER": "${input:ssh-user}",
        "SSH_PASSWORD": "${input:ssh-password}",
        "SSH_KEY": "${input:ssh-key}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

SSH Session MCP in other clients