Filesystem MCP Server は公式ですか?
はい。`modelcontextprotocol/servers` リポジトリのリファレンスサーバーで、npm では `@modelcontextprotocol/server-filesystem` として公開されています。

@modelcontextprotocol
基本情報
Model Context Protocol サーバー
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/filesystem",
"-f",
"src/filesystem/Dockerfile",
"."
]
}
}
}Read complete contents of a file as text
Read a file and return it as a base64-encoded content block with its MIME type
Read multiple files simultaneously
Create new file or overwrite existing (exercise caution with this)
Make selective edits using advanced pattern matching and formatting
Create new directory or ensure it exists
List directory contents with [FILE] or [DIR] prefixes
List directory contents with [FILE] or [DIR] prefixes, including file sizes
Move or rename files and directories
Recursively search for files/directories that match or do not match patterns
Get recursive JSON tree structure of directory contents
Get detailed file/directory metadata
List all directories the server is allowed to access
Filesystem MCP Server は、Model Context Protocol プロジェクトが提供するリファレンス版の filesystem MCP サーバーです。Claude などの MCP クライアントがファイルの読み取り、書き込み、編集、移動、検索を行えるようにする Node.js サーバーで、アクセスは許可したディレクトリ内に限られます。
npm では @modelcontextprotocol/server-filesystem、Docker イメージでは mcp/filesystem として公開されており、ソースは公式の modelcontextprotocol/servers リポジトリ(MIT License)にあります。stdio でローカル実行され、API key は不要です。すべてのツールは、インターネットやその他の外部システムにアクセスしないものとして注釈されています。
前提条件:Node.js(npx 用)または Docker。アカウントや API key は不要です。必須の入力は、許可するディレクトリを少なくとも 1 つ指定することだけです。コマンドライン引数で渡すか、クライアントが MCP Roots で渡します。
コマンドライン引数で許可ディレクトリを指定する場合:
mcp-server-filesystem /path/to/dir1 /path/to/dir2
推奨される方法は MCP Roots です。Roots に対応したクライアントはワークスペースのフォルダーをサーバーに送り、サーバーはそれでコマンドラインのリストを置き換えます。変更は roots/list_changed を通じて実行中に反映され、再起動は不要です。
claude_desktop_config.json に以下を追加し、公開したいフォルダーを列挙します:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
Windows では cmd /c 経由で npx を起動します:
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
Docker を使う場合は、各ディレクトリを /projects 配下にマウントします。ro を付けると、そのマウントはサーバーから読み取り専用になります:
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop",
"--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro",
"mcp/filesystem",
"/projects"
]
}
}
}
コマンドパレットから MCP: Open User Configuration を実行するか、ワークスペースに .vscode/mcp.json を作成して設定を共有します。VS Code では servers キーを使う点に注意してください:
{
"servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"${workspaceFolder}"
]
}
}
}
Docker 版では ${workspaceFolder} を /projects/workspace にマウントし、引数として /projects を渡します。
README にはこれらのクライアント向けの手順はありませんが、どちらも同じ stdio コマンドを実行できます。Claude Code では:
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
Cursor では、上記の Claude Desktop と同じ mcpServers ブロックを Cursor の mcp.json に追加します。
list_allowed_directories で現在有効なディレクトリを確認できます。read_text_file は head/tail による行数制限に対応し、read_media_file は画像と音声を MIME タイプ付きの base64 コンテンツブロックとして返します。edit_file は対象を絞った検索置換を行い、インデントと LF/CRLF の改行コードを保持し、git 形式の diff を返し、dryRun によるプレビューにも対応します。directory_tree。どちらも除外パターンに対応します。ro)。このサーバーは 13 個のツールを 3 つのグループで提供します:
read_text_file、read_media_file、read_multiple_files(1 件の読み取りに失敗しても、バッチ全体は止まりません)。list_directory、list_directory_with_sizes(名前またはサイズで並べ替え可能、合計も表示)、directory_tree、search_files、get_file_info(サイズ、日時、種類、権限)、list_allowed_directories。write_file はファイルを作成または上書きし、edit_file は部分的な編集を行い、create_directory は入れ子のフォルダーを作成し、move_file は移動または名前変更を行います(移動先が既に存在する場合は失敗します)。削除ツールはありません。README では write_file、edit_file、move_file が破壊的な操作として示されています。
getUser の呼び出しをすべて fetchUser に変更して、先に diff を見せて。」args に許可ディレクトリを少なくとも 1 つ追加してください。list_allowed_directories で現在のリストを確認してください。Roots はコマンドラインのディレクトリを完全に置き換える点にも注意してください。/projects 配下にマウントする必要があり、README の例のとおり /projects をディレクトリ引数としてサーバーに渡します。npx が見つからない: 上記の cmd /c npx ... の形式を使ってください。はい。`modelcontextprotocol/servers` リポジトリのリファレンスサーバーで、npm では `@modelcontextprotocol/server-filesystem` として公開されています。
はい。MIT License のオープンソースで、ローカルで動作し、API key や有料サービスは不要です。
許可するディレクトリを引数で渡すか、Roots 対応のクライアントに指定させます。すべての操作はそれらのパス内に制限されます。Docker では必要なものだけをマウントし、読み取り専用にするには `ro` を付けます。
削除ツールは提供されていません。ただし、`write_file` はファイルを上書きし、`edit_file` は内容を変更し、`move_file` は移動元を取り除くため、書き込み権限の扱いには注意が必要です。
はい。`edit_file` で `dryRun` を `true` にすると、ファイルを変更せずに diff を取得できます。README でもまずこれを行うことが推奨されています。
はい。標準的な stdio MCP サーバーです。README には Claude Desktop と VS Code の手順が記載されており、Claude Code と Cursor でも同じ `npx` コマンドを実行できます。
ローカルです。お使いのマシン上で stdio により動作し、許可ディレクトリ内のローカルファイルシステムにのみアクセスします。
`read_media_file` は画像と音声を image または audio コンテンツとして返し、それ以外のファイル形式は埋め込みの base64 resource として返します。
Blazing-fast, asynchronous MCP server for seamless filesystem operations.
📄 The PDF intelligence layer for AI agents — Agent Document Twin, evidence-first extraction, visual crops, OCR provenance, trust reports, and benchmark-gated releases. MCP server for Claude, Cursor, VS Code, and any MCP client.
Go server implementing Model Context Protocol (MCP) for filesystem operations.
Official MCP server for pdfAssistant. Connect Claude, ChatGPT, or any MCP client to perform professional PDF processing like OCR, permanent redactions, secure encryption, format conversions, and 40+ advanced operations p
A Model Context Protocol (MCP) server for platform-agnostic file capabilities, including advanced search/replace and directory tree traversal
コメント