# SFTP

> SFTP is an open-source MCP server for files and documents. SFTP-only file access for AI: browse, edit, transfer and sync with no shell. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/adverstm/sftp-mcp
- **MCP Registry name:** io.github.AdversTM/sftp-mcp
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The design choice here is what it leaves out. It speaks only the SFTP protocol, so the assistant can work with files on a server but cannot run commands. That makes it usable on chrooted, SFTP-only and shared-hosting accounts where SSH-based servers cannot run. The only remote command it ever sends is a fixed sha256sum for hashing, and it falls back to hashing over SFTP when the account has no shell.

Access is limited by policy. Each server can be read-only, can forbid delete, rmdir, rename and real syncs, and can be confined to an absolute read or write path prefix; these are checked before any SFTP request goes out. You can define many servers in one JSON map, and the assistant sees their descriptions. Transfers run in parallel over one warm connection per host, and directory sync uploads only changed files.

It needs Node.js 24 or newer and is configured entirely through environment variables, with bad values stopping startup.

## Features

- **No shell access:** Only SFTP is used, so the assistant cannot execute commands.
- **Per-server policies:** Read-only, no-destructive and path-prefix limits per server.
- **Many hosts:** Define several servers in one map and address them by id.
- **Parallel transfers:** Concurrent transfers share one warm connection per host.
- **Changed-file sync:** Directory sync uploads only files that differ.
- **Tool hiding:** SFTP_DISABLED_TOOLS removes named tools from the client.

## Good for

- Deploy a static site to shared hosting
- Edit a config file on a chrooted account
- Pull logs without giving shell access
- Sync a build folder to staging

## Install

### Claude Code (Terminal)

```sh
claude mcp add sftp-mcp --env SFTP_PASSWORD='<SFTP_PASSWORD>' --env SFTP_PASSPHRASE='<SFTP_PASSPHRASE>' -- npx -y sftp-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_PASSWORD": "<SFTP_PASSWORD>",
        "SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_PASSWORD": "<SFTP_PASSWORD>",
        "SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "sftp-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_PASSWORD": "<SFTP_PASSWORD>",
        "SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_PASSWORD": "<SFTP_PASSWORD>",
        "SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "sftp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sftp-mcp"
      ],
      "env": {
        "SFTP_PASSWORD": "<SFTP_PASSWORD>",
        "SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
      }
    }
  }
}
```

## Tools

- `sftp_read`: Reads a remote file, up to a configurable size limit.
- `sftp_download`: Downloads larger files.
- `sftp_list_servers`: Lists configured servers with their descriptions.

## FAQ

### Can the assistant run commands?

No; it never gets a shell.

### Does it work on SFTP-only accounts?

Yes, that is the stated reason for it.

### How are limits enforced?

Policies are checked before any SFTP request is sent.

### What are the requirements?

Node.js 24 or newer and SSH credentials by password or private key.

### Is SFTP free?

Yes. SFTP is open source, so you can use and self-host it for free.

### How do I add SFTP to Claude Code?

Run this command in your terminal: claude mcp add sftp-mcp --env SFTP_PASSWORD='<SFTP_PASSWORD>' --env SFTP_PASSPHRASE='<SFTP_PASSPHRASE>' -- npx -y sftp-mcp

### What are the best alternatives to SFTP?

The closest alternatives to SFTP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/sftp
