S

Sftp MCP

by AdversTM · io.github.AdversTM/sftp-mcp

Enables AI assistants to browse, edit, transfer and sync files over plain SFTP without shell access, including on chrooted and SFTP-only accounts. Per-server read-only, non-destructive and path policies keep file operations constrained.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-adverstm-sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_HOST": "<VALUE>",
        "SFTP_PORT": "22",
        "SFTP_USER": "<VALUE>",
        "SFTP_PASSWORD": "<YOUR_VALUE>",
        "SFTP_PRIVATE_KEY": "<VALUE>",
        "SFTP_PASSPHRASE": "<YOUR_VALUE>",
        "SFTP_SERVERS_FILE": "<VALUE>",
        "SFTP_READ_ONLY": "false",
        "SFTP_ALLOW_DESTRUCTIVE": "true",
        "SFTP_ALLOWED_WRITE_PREFIX": "<VALUE>",
        "SFTP_ALLOWED_READ_PREFIX": "<VALUE>",
        "SFTP_SERVERS": "<VALUE>",
        "SFTP_LOG_FILE": "<VALUE>",
        "SFTP_CHUNK_SIZE": "32768",
        "SFTP_READY_TIMEOUT": "20000",
        "SFTP_DISABLED_TOOLS": "<VALUE>",
        "SFTP_MAX_READ_BYTES": "1048576",
        "SFTP_MAX_CONCURRENCY": "8",
        "SFTP_TRANSFER_CONCURRENCY": "64"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
SFTP_HOST No SSH host. Required in single-server mode.
SFTP_PORT No SSH port. Default: 22
SFTP_USER No SSH username. Required in single-server mode.
SFTP_PASSWORD secret No Password authentication.
SFTP_PRIVATE_KEY No Path to a private key file.
SFTP_PASSPHRASE secret No Passphrase for the private key.
SFTP_SERVERS_FILE No Path to a file containing the JSON map of server id to connection. Alternative to SFTP_SERVERS.
SFTP_READ_ONLY No Deny every remote mutation. Default: false
SFTP_ALLOW_DESTRUCTIVE No false denies delete, rmdir, rename and non-dry-run sync. Default: true
SFTP_ALLOWED_WRITE_PREFIX No Absolute path prefix for mutations (single-server mode).
SFTP_ALLOWED_READ_PREFIX No Absolute path prefix for reads (single-server mode).
SFTP_SERVERS No JSON map of server id to connection, passed inline. Alternative to SFTP_SERVERS_FILE.
SFTP_LOG_FILE No Also append logs to this file, for clients that hide stderr. Its directory must exist.
SFTP_CHUNK_SIZE No Transfer chunk size in bytes (minimum 1024). Default: 32768
SFTP_READY_TIMEOUT No SSH handshake timeout, in ms. Default: 20000
SFTP_DISABLED_TOOLS No Comma-separated tool names to hide from the client.
SFTP_MAX_READ_BYTES No Size limit for sftp_read. Larger files must use sftp_download. Default: 1048576
SFTP_MAX_CONCURRENCY No Default parallelism of the batch tools. Default: 8
SFTP_TRANSFER_CONCURRENCY No In-flight requests per file transfer. Default: 64

Similar servers