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

Metadata

Release files for iflow-mcp_fs-mcp-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_fs-mcp-py 0.1.1
File Size Uploaded
iflow_mcp_fs_mcp_py-0.1.1.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_fs-mcp-py 0.1.1
File Interpreter ABI Platform
iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / iflow_mcp_fs_mcp_py-0.1.1.tar.gz

Download URL iflow_mcp_fs_mcp_py-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5f5db615a32cadf613dc15e42eab9aedc4f93487747cf6b37d1ee788550671de
BLAKE2b-256 checksum
How to use checksums
9a1d760c5707a60500f6f0332ef1df0b652b3eccca26da41730521d0a4ec0db3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl

Download URL iflow_mcp_fs_mcp_py-0.1.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed5c171ed4e65240ca49edeeddea2082785a260a10ac5a376f98fcbc82a79141
BLAKE2b-256 checksum
How to use checksums
1b8b5982e9c4598588e6d8cb53d21d55604b1180f3c30072e2c99a96fba4ad91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page