SFTP
SFTP-only file access for AI: browse, edit, transfer and sync with no shell
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 1.1.4
- Listing updated
- today
Similar MCP servers
About SFTP
SFTP is an open-source MCP server for files and documents. It runs locally on your machine and is started by your AI client.
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.
Install
Run in a terminal
claude mcp add sftp-mcp --env SFTP_PASSWORD='<SFTP_PASSWORD>' --env SFTP_PASSPHRASE='<SFTP_PASSPHRASE>' -- npx -y sftp-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"sftp-mcp": {
"command": "npx",
"args": [
"-y",
"sftp-mcp"
],
"env": {
"SFTP_PASSWORD": "<SFTP_PASSWORD>",
"SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"sftp-mcp": {
"command": "npx",
"args": [
"-y",
"sftp-mcp"
],
"env": {
"SFTP_PASSWORD": "<SFTP_PASSWORD>",
"SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"sftp-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"sftp-mcp"
],
"env": {
"SFTP_PASSWORD": "<SFTP_PASSWORD>",
"SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"sftp-mcp": {
"command": "npx",
"args": [
"-y",
"sftp-mcp"
],
"env": {
"SFTP_PASSWORD": "<SFTP_PASSWORD>",
"SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"sftp-mcp": {
"command": "npx",
"args": [
"-y",
"sftp-mcp"
],
"env": {
"SFTP_PASSWORD": "<SFTP_PASSWORD>",
"SFTP_PASSPHRASE": "<SFTP_PASSPHRASE>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
SFTP_HOSTSSH host (single-server mode).SFTP_PORTSSH port.SFTP_USERSSH username (single-server mode).SFTP_PASSWORDPassword authentication.SFTP_PRIVATE_KEYPath to a private key file.SFTP_PASSPHRASEPassphrase for the private key.SFTP_SERVERS_FILEPath to a JSON map of server id to connection, for multiple servers. Replaces the single-server variables.SFTP_READ_ONLYDeny every remote mutation.SFTP_ALLOW_DESTRUCTIVESet to false to deny delete, rmdir, rename and non-dry-run sync.SFTP_ALLOWED_WRITE_PREFIXAbsolute remote path prefix that mutations are limited to.SFTP_ALLOWED_READ_PREFIXAbsolute remote path prefix that reads are limited to.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
- 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.
What it does
- 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
Pricing
Open source
SFTP 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.


