mcp-filesystem-python

MCP Filesystem Python is an MCP server that provides secure, read-only access to files in a specified directory. It exposes files as MCP resources, offers file search capabilities, respects .gitignore patterns, and includes security features like path traversal protection. It also detects MIME types.

GitHub Stars

19

User Rating

Not Rated

Forks

5

Issues

0

Views

2

Favorites

0

README
MCP Filesystem Python

A Model Context Protocol (MCP) server that provides secure, read-only access to files in a specified directory.

Features
  • Exposes files as MCP resources using `file://` URI scheme
  • Provides file search capabilities through MCP tools
  • Respects .gitignore patterns
  • Security features including path traversal protection
  • MIME type detection
Installation

Using UV:

uv add mcp-filesystem-python
Usage

Run the server:

uv run src/filesystem/server.py /path/to/directory
Claude Desktop Integration
Configuration Examples

Example configurations for Claude Desktop can be found in the `examples` directory:

  • `examples/claude_desktop_config.json`: Example for macOS/Linux
  • `examples/claude_desktop_config_windows.json`: Example for Windows

These files should be placed at:

  • macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  • Windows: `%AppData%\Claude\claude_desktop_config.json`

Make sure to:

  1. Replace the paths with your actual paths
  2. Use forward slashes (`/`) for macOS/Linux and backslashes (`\\`) for Windows
  3. Use absolute paths (not relative paths)
Development
  1. Clone the repository
  2. Create virtual environment and sync requirements, uv sync
License

MIT

Author Information
Frank Fiegel

Engineer turned founder

GlamaMiami, FL

1,141

Followers

1,878

Repositories

1

Gists

2

Total Contributions

Top Contributors

Threads