Skip to main content
Glama

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

-
security - not tested
-
license - not tested
-
quality - not tested

Related MCP Servers

  • A
    security
    -
    license
    A
    quality
    MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.
    Last updated -
    33,516
    73,064
    MIT License
  • -
    security
    A
    license
    -
    quality
    This server offers secure, read-only access to directory files via the MCP, supporting file searching, .gitignore compliance, path traversal protection, and MIME type detection using the 'file://' URI scheme.
    Last updated -
    22
    MIT License
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.
    Last updated -
    1
    6
    MIT License
  • A
    security
    F
    license
    A
    quality
    An MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.
    Last updated -
    9
    2
    2

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mtunell/mcp-filesystem-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server