Skip to main content
Glama
nao9net

FTP MCP Server

by nao9net

FTP MCP Server(マルチサーバー対応版)

複数のFTPサーバーに、1つのMCPサーバーからまとめてファイルをアップロード/一覧/削除するためのローカルサーバーです。

各ツール呼び出し時に server パラメータ(エイリアス)でどのサーバーを操作するか指定します。 アップロード対象はローカルの絶対パスで指定し、ファイルの中身そのものはツール呼び出しの引数に含めません (画像などバイナリデータをLLMのコンテキストに載せずに済ませるため)。

主な用途: 生成した画像をWebサーバー上の公開フォルダにアップロードし、そのURLを wp_upload_media_from_url(wp-mcp)に渡してWordPressのメディアライブラリに正式登録する、 という2段階のフローの前段。


1. セットアップ

cd ftp-mcp
npm install

servers.json.exampleservers.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_filesbase_path 起点の指定フォルダ内のファイル一覧を取得

  • ftp_delete_filebase_path 起点の相対パスを指定してファイルを削除 (WordPressメディアライブラリへの取り込み後、一時ファイルを掃除する用途を想定)

補足

  • 依存ライブラリは basic-ftp を使用(FTP/FTPS対応、Promiseベース)。

  • remote_path.. を含むパスはエラーになります(base_path外への書き込み・削除を防ぐため)。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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.
    14
    MIT
  • F
    license
    A
    quality
    F
    maintenance
    Enables FTP file operations such as upload, download, list, and delete directly from Claude Desktop or Claude CLI.
    15
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to perform FTP/FTPS/SFTP file operations including upload, download, sync, and directory management with multi-server support.
    36
    22
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables accessing and managing files from configured folders with filtering and size limits, allowing listing, reading, and searching files via MCP tools and resources.

View all related MCP servers

Related MCP Connectors

  • File uploads for AI agents. Upload, list, and manage files. No signup required.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • List, share, upload, and manage Slideless HTML presentations from any MCP host.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nao9net/ftp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server