FTP MCP Server
FTP MCP Server(マルチサーバー対応版)
複数のFTPサーバーに、1つのMCPサーバーからまとめてファイルをアップロード/一覧/削除するためのローカルサーバーです。
各ツール呼び出し時に server パラメータ(エイリアス)でどのサーバーを操作するか指定します。
アップロード対象はローカルの絶対パスで指定し、ファイルの中身そのものはツール呼び出しの引数に含めません
(画像などバイナリデータをLLMのコンテキストに載せずに済ませるため)。
主な用途: 生成した画像をWebサーバー上の公開フォルダにアップロードし、そのURLを
wp_upload_media_from_url(wp-mcp)に渡してWordPressのメディアライブラリに正式登録する、
という2段階のフローの前段。
1. セットアップ
cd ftp-mcp
npm installservers.json.example を servers.json にコピーして、管理する全サーバーの情報を書きます
(このファイルには全サーバーの認証情報が入るので、絶対に公開・共有・Gitコミットしないでください。
.gitignore に含めています)。
cp servers.json.example servers.json{
"mysite": {
"host": "ftp.example.com",
"user": "user@example.com",
"password": "xxxxxxxx",
"base_path": "/resource",
"public_base_url": "https://example.com/resource"
}
}base_path: このサーバーのアップロード先ルートフォルダ(FTPのルートからの絶対パス)。 すべてのツールはこのbase_pathを起点にした相対パスでファイルを指定します。public_base_url:base_pathに対応する公開URLのベース。アップロード後にこれと相対パスを 結合したURLを返します。port(省略可・デフォルト21)、secure(省略可・デフォルトfalse。FTPS(暗黙的TLS)を使う場合はtrue)。
Related MCP server: mcp-ftp-server
2. Claude Codeへの登録
Claude Codeを使っているプロジェクトのルートフォルダ内で .mcp.json にmcpサーバーの情報を追加します。
{
"mcpServers": {
"ftp": {
"command": "node",
"args": ["/MCPの保存パス/ftp-mcp/index.js"],
"env": {
"SERVERS_CONFIG_PATH": "/MCPの保存パス/ftp-mcp/servers.json"
}
}
}
}3. 提供ツール
ftp_list_servers— 設定済みサーバー一覧(エイリアス・ホスト・base_path・public_base_url)を取得ftp_upload_file— ローカルファイル(絶対パス)をアップロードし、公開URLを返す。remote_pathに含まれるサブフォルダは自動作成されるftp_list_files—base_path起点の指定フォルダ内のファイル一覧を取得ftp_delete_file—base_path起点の相対パスを指定してファイルを削除 (WordPressメディアライブラリへの取り込み後、一時ファイルを掃除する用途を想定)
補足
依存ライブラリは
basic-ftpを使用(FTP/FTPS対応、Promiseベース)。remote_pathに..を含むパスはエラーになります(base_path外への書き込み・削除を防ぐため)。
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Browse and manage files in your Moxt AI workspace from any MCP client.
Publish HTML, Markdown, and multi-file sites as shareable URLs instantly via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables users to upload local files to S3-compatible storage and retrieve shareable public URLs. Files are automatically organized into unique UUID-based folders to prevent naming conflicts while preserving original filenames.9 npmMIT
- FlicenseAqualityFmaintenanceEnables FTP file operations such as upload, download, list, and delete directly from Claude Desktop or Claude CLI.15-
- AlicenseBqualityDmaintenanceEnables AI agents to perform FTP/FTPS/SFTP file operations including upload, download, sync, and directory management with multi-server support.3640 npm5MIT
- FlicenseAqualityDmaintenanceEnables accessing and managing files from configured folders with filtering and size limits, allowing listing, reading, and searching files via MCP tools and resources.3-