
Filesystem
@modelcontextprotocol
Filesystem について
Model Context Protocol Servers
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/filesystem",
"-f",
"src/filesystem/Dockerfile",
"."
]
}
}
}ツール
13Read 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
概要
What is Filesystem?
Filesystem is a Node.js server that implements the Model Context Protocol (MCP) for filesystem operations. It enables AI assistants to read, write, and manage files and directories on the local machine within configurable sandboxed directories. Published as @modelcontextprotocol/server-filesystem, it is intended for developers who want to give MCP clients controlled filesystem access.
How to use Filesystem?
Install via npm or run using npx or Docker. Specify allowed directories as command-line arguments when starting the server. Alternatively, use MCP Roots for dynamic directory updates without restarting the server. Example for Claude Desktop or VS Code uses JSON configuration with npx -y @modelcontextprotocol/server-filesystem followed by allowed directory paths.
Key features of Filesystem
- Read and write text and media files
- Create, list, and delete directories
- Move or rename files and directories
- Search files recursively using glob patterns
- Get detailed file metadata and directory trees
- Dynamic directory access control via MCP Roots
Use cases of Filesystem
- Editing source code files in a project directory
- Organizing files by creating and moving directories
- Reading image or audio files for AI processing
- Searching for files matching specific patterns
- Previewing file edits with dry-run mode before applying changes
FAQ from Filesystem
How does directory access control work?
Directories can be specified at startup via command-line arguments or dynamically via MCP Roots. Roots completely replace any server-side allowed directories when provided. If neither is available, the server throws an error.
What happens if no directories are specified?
If the server starts without command-line arguments and the client does not support the roots protocol (or provides empty roots), the server will throw an error during initialization. At least one allowed directory is required to operate.
Can I preview edits before applying them?
Yes, the edit_file tool supports a dryRun parameter. When set to true, it returns a diff of changes without modifying the file. The README recommends always using dryRun first.
What runtime and dependencies are required?
The server is a Node.js application published on npm. It requires Node.js to run and has no external runtime dependencies beyond standard npm packages.
Where do files and data actually live?
All operations are restricted to the allowed directories specified by the user. The server never accesses the internet or external systems; it only works on the local filesystem within those sandboxed paths.
「ファイルとストレージ」の他のコンテンツ
Filesystem
chrisdocManage your Hevy workouts, routines, folders, and exercise templates. Create and update sessions faster, organize plans, and search exercises to build workouts quickly. Stay synced with changes so your training log is always up to date.
MCP Filesystem Server
mark3labsGo server implementing Model Context Protocol (MCP) for filesystem operations.
Filesystem MCP Server SSE
ysthinkThe SSE version of the MCP service is modified from the Filesystem MCP server
mcp-rquest
xxxbrianA MCP server providing realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints for bypassing anti-bot measures. It also supports converting PDF and HTML documents to Markdown for easier processing by LLMs.
Mcp Directory
chatmcpdirectory for Awesome MCP Servers
コメント