MCP Filesystem Python
by gary109
README.md
# 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:
```bash
uv add mcp-filesystem-python
```
## Usage
Run the server:
```bash
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](LICENSE)
TDQS
B3.4/5.0
Scored across 3 tools
Disambiguation5/5
Each tool has a clearly distinct purpose: deleting, searching, and writing files. No overlap or ambiguity.
Naming Consistency5/5
All tool names follow a consistent verb-noun pattern with hyphens (e.g., delete-file, search-files). No mixing of conventions.
Tool Count3/5
With only 3 tools, the server is on the lower end of the ideal range. While each tool is distinct, the count feels thin for a filesystem server.
Completeness2/5
Fundamental operations like reading file content or listing directories are missing. Agents cannot perform basic file access, leading to significant gaps.
Maintenance
ActivityInactive
ResponsivenessNo issues