modelcontextprotocol/filesystem

MCP Server

MCP Filesystem Server - secure file operations (read, write, search)

Official MCP filesystem server. Secure file read, write, search, and directory operations with configurable access. The tap's image-view capability exposes only read_media_file, which returns an image file as an MCP image block so the model can see it.

MCP Server

  • Package: @modelcontextprotocol/server-filesystem (pinned in the capability file)
  • Transport: stdio
  • Command: npx -y @modelcontextprotocol/[email protected] /path/to/allowed/dir
  • Runtime: Node.js 20+
  • Pin note: image-view stays on 2025.8.21; later releases duplicate the image payload in structuredContent

Authentication

None (filesystem path restriction via args)

VariableRequiredDescription
——No environment variables required

Available Tools

ToolDescription
read_file / read_text_fileRead file content
read_media_fileRead an image or audio file; returns base64 data with its MIME type (image block for images)
write_fileWrite file
list_directoryList directory
search_filesSearch files
create_directoryCreate directory
move_fileMove/rename file

Configuration Example

toml
[[mcp.servers]]
name = "image-view"
type = "stdio"
command = "sh"
args = ["-c", "exec npx -y @modelcontextprotocol/[email protected] \"$PWD\""]
timeout_seconds = 60
tools = []