Labsco
alxspiker logo

FTP Access

โ˜… 20

from alxspiker

Provides access to an FTP server for file operations.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MCP Server for FTP Access

This Model Context Protocol (MCP) server provides tools for interacting with FTP servers. It allows Claude.app to list directories, download and upload files, create directories, and delete files/directories on FTP servers.

Features

  • List Directory Contents: View files and folders on the FTP server

  • Download Files: Retrieve file content from the FTP server

  • Upload Files: Create new files or update existing ones

  • Create Directories: Make new folders on the FTP server

  • Delete Files/Directories: Remove files or directories

SSH / SFTP Support

In addition to plain FTP and FTPS, the server supports SFTP โ€” the SSH File Transfer Protocol โ€” which runs over an encrypted SSH connection and is unrelated to FTPS.

Set FTP_PROTOCOL=sftp to switch the server into SFTP mode. The default port changes to 22.

Authentication

SFTP supports two authentication methods, chosen automatically:

  • Private key โ€” if a key is found (see below), it is used for authentication. FTP_PASSPHRASE is used to decrypt the key if it is passphrase-protected.

  • Password โ€” if no key is found, FTP_PASSWORD is used for password authentication.

Key discovery

The server looks for a private key in this order:

  • The path in FTP_PRIVATE_KEY_PATH (if set)

  • ~/.ssh/id_ed25519

  • ~/.ssh/id_rsa

  • ~/.ssh/id_ecdsa

Configuration example

Copy & paste โ€” that's it
{
 "mcpServers": {
 "ftp-server": {
 "command": "node",
 "args": ["/absolute/path/to/mcp-server-ftp/build/index.js"],
 "env": {
 "FTP_HOST": "sftp.example.com",
 "FTP_PORT": "22",
 "FTP_PROTOCOL": "sftp",
 "FTP_USER": "your-username",
 "FTP_PRIVATE_KEY_PATH": "~/.ssh/id_ed25519",
 "FTP_PASSPHRASE": "your-key-passphrase"
 }
 }
 }
}

FTP_PASSPHRASE and FTP_USER both support the enc: encrypted format โ€” see Credential Encryption .

Credential Encryption

Storing plaintext passwords in your Claude config file is a security risk. The server supports AES-256-GCM encryption for FTP_USER and FTP_PASSWORD so the config only ever contains ciphertext.

1. Generate an encryption key

Copy & paste โ€” that's it
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Keep this key secret โ€” treat it like a master password.

2. Encrypt a credential value

Copy & paste โ€” that's it
npm run build
FTP_ENCRYPTION_KEY= npm run encrypt-env -- 

The output is a self-contained encrypted string in the format enc:<iv_hex>:<tag_hex>:<ciphertext_hex>.

3. Use the encrypted values in your config

Set FTP_ENCRYPTION_KEY alongside the encrypted credentials. Values that do not start with enc: are treated as plaintext, so you can encrypt selectively.

Copy & paste โ€” that's it
{
 "mcpServers": {
 "ftp-server": {
 "command": "node",
 "args": ["/absolute/path/to/mcp-server-ftp/build/index.js"],
 "env": {
 "FTP_HOST": "ftp.example.com",
 "FTP_PORT": "21",
 "FTP_USER": "enc:aabbcc...:ddeeff...:112233...",
 "FTP_PASSWORD": "enc:aabbcc...:ddeeff...:112233...",
 "FTP_SECURE": "false",
 "FTP_ENCRYPTION_KEY": " "
 }
 }
 }
}

Available Tools

Tool Name Description list-directory List contents of an FTP directory download-file Download a file from the FTP server upload-file Upload a file to the FTP server create-directory Create a new directory on the FTP server delete-file Delete a file from the FTP server delete-directory Delete a directory from the FTP server

Security Considerations

  • Use the Credential Encryption feature to avoid storing plaintext passwords in your config file.

  • Prefer SFTP (FTP_PROTOCOL=sftp) over plain FTP or FTPS where possible โ€” it uses SSH and does not require certificate management.

  • Consider using FTPS (secure FTP) by setting FTP_SECURE=true if your server supports it but SFTP is unavailable.

  • The server creates temporary files for uploads and downloads in your system's temp directory.

License

MIT