Skip to main content
Glama
filesystem-mcp

filesystem-mcp

๐Ÿ“‚ filesystem-mcp

Model Context Protocol (MCP) server for file system operations. Enable AI assistants like Claude, Cursor, and others to read, write, and manage files on your local system.

๐Ÿš€ Features

  • ๐Ÿ“– Read files - Read file contents with size limits

  • ๐Ÿ“‚ List directories - View files with metadata (size, type)

  • โœ๏ธ Write files - Create and update files

  • ๐Ÿ—‘๏ธ Delete files - Remove files and directories

  • ๐Ÿ” Search files - Glob pattern matching

  • ๐Ÿ“Š File info - Get detailed metadata

  • ๐Ÿ“ Directory operations - Create, copy, move directories

Related MCP server: Filesystem MCP

๐Ÿ“ฆ Installation

pip install filesystem-mcp

๐Ÿ”ง Usage

CLI Mode

# Start the MCP server (read-write mode)
filesystem-mcp --directory /path/to/your/project

# Start in read-only mode
filesystem-mcp --directory /path/to/your/project --readonly

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "filesystem-mcp",
      "args": ["--directory", "/path/to/your/project"]
    }
  }
}

Cursor

Add to Cursor settings (MCP configuration):

{
  "mcpServers": {
    "filesystem": {
      "command": "filesystem-mcp",
      "args": ["--directory", "/path/to/your/project"]
    }
  }
}

๐Ÿ› ๏ธ Available Tools

Tool

Description

Write

read_file

Read contents of a file

โŒ

list_directory

List files in a directory

โŒ

write_file

Create or write to a file

โœ…

delete_file

Delete a file or directory

โœ…

create_directory

Create a new directory

โœ…

search_files

Search files by glob pattern

โŒ

get_file_info

Get file metadata

โŒ

copy_file

Copy a file or directory

โœ…

move_file

Move or rename a file

โœ…

๐Ÿ“ Example

from filesystem_mcp import FileSystemServer

# Create server instance
server = FileSystemServer(root_directory="/path/to/project")

# Run the server
server.run()

๐Ÿ” Security

  • Path restrictions: All operations are restricted to the specified root directory

  • File size limits: Maximum 1MB for file reads

  • Optional read-only mode: Use --readonly flag to disable all write operations

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

๐Ÿ“„ License

MIT License - see LICENSE for details.

Available Tools

9 tools
copy_fileB

Copy a file or directory

Inputs: source (required), destination (required).

create_directoryB

Create a new directory

Inputs: path (required).

delete_fileB

Delete a file or directory

Inputs: path (required), recursive.

get_file_infoB

Get detailed file metadata

Inputs: path (required).

list_directoryC

List files and directories with metadata

Inputs: path (required), show_hidden.

move_fileB

Move or rename a file or directory

Inputs: source (required), destination (required).

read_fileB

Read contents of a file

Inputs: path (required).

search_filesB

Search files by glob pattern

Inputs: pattern (required), path.

write_fileC

Create or write to a file

Inputs: path (required), content (required), append.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct filesystem operation with no overlap, making selection unambiguous.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, e.g., copy_file, create_directory.

    Tool Count5/5

    9 tools cover essential filesystem operations without being excessive or insufficient.

    Completeness5/5

    The set covers CRUD for files and directories, listing, searching, metadata, and move/rename with no obvious gaps.

    Maintenance

    ActivityInactive
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to read, search, and analyze local file systems with tools for reading file contents, listing directories, searching by patterns, and analyzing folder structures for context-aware queries.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides secure filesystem access for AI assistants with optimizations like file reading limits and depth-limited traversal to improve token efficiency. It enables AI models to read, write, and search files within explicitly allowed directories while automatically skipping large system folders.
      4
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to perform file system operations within a specified project directory, including reading, writing, editing, and managing files, with optional read-only access to reference projects.
      417 PyPI
      49
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI models to securely read, write, and query metadata of local files through a controlled file system interface, with support for local and Azure deployment.
      -