Skip to main content

Filesystem MCP Server (v0.1)

A simple MCP server for filesystem operations with directory sandboxing and read-only mode support.

Early version (0.1) - not thoroughly tested/reviewed, use with caution

Quick Start

Install dependencies:

git clone <repo_url>
uv sync

Run the server:

# Normal mode - full filesystem access
uv run main.py /path/to/allowed/directory

# Read-only mode - no write operations  
uv run main.py --read-only /path/to/allowed/directory

Features

  • Directory sandboxing (operations restricted to allowed paths)
  • --read-only flag disables write operations
  • Gitignore support for searches
  • Human-readable error messages

Usage Examples

Normal Mode

uv run main.py ~/projects
# Provides: create_file, delete_file, move_file, edit_file, create_directory + read tools

Read-Only Mode

uv run main.py --read-only ~/projects
# Provides only: read_text_file, list_directory, search_files, grep, directory_tree

Multiple Directories

uv run main.py /home/user/docs /tmp/workspace
uv run main.py --read-only /var/log /etc/config

Available Tools

Read Operations (always available):

  • read_text_file - Read file contents
  • list_directory - List directory contents
  • directory_tree - JSON directory structure
  • search_files - Find files by pattern
  • grep - Search text in files
  • read_multiple_files - Bulk file reading

Write Operations (disabled in --read-only):

  • create_file - Create new files
  • delete_file - Delete files
  • move_file - Move/rename files
  • edit_file - Edit file contents
  • create_directory - Create directories

Dependencies

From pyproject.toml:

  • fastmcp>=2.11.2 - MCP framework
  • pathspec>=0.12.1 - Gitignore patterns

Security Notes

  • All paths resolved with Path.resolve() to prevent traversal
  • Operations restricted to allowed directories only
  • Binary files rejected for text operations

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_fs_mcp_py-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_fs_mcp_py-0.1.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_fs_mcp_py-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for iflow_mcp_fs_mcp_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5f5db615a32cadf613dc15e42eab9aedc4f93487747cf6b37d1ee788550671de
MD5 e5c1efb0cf959a0a0889835597bfe73f
BLAKE2b-256 9a1d760c5707a60500f6f0332ef1df0b652b3eccca26da41730521d0a4ec0db3

See more details on using hashes here.

File details

Details for the file iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed5c171ed4e65240ca49edeeddea2082785a260a10ac5a376f98fcbc82a79141
MD5 19d70d23774a05cd7771da042b70a4b5
BLAKE2b-256 1b8b5982e9c4598588e6d8cb53d21d55604b1180f3c30072e2c99a96fba4ad91

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page