FTP MCP Server

FTP MCP Server

Enables managing files across multiple FTP servers through a single MCP interface, supporting upload, listing, deletion, and public URL generation.

Category
Visit Server

README

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)。

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外への書き込み・削除を防ぐため)。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured