Skip to main content
Glama

MCP Filesystem Python

MIT License
6
  • Apple
  • Linux

MCP 文件系统 Python

模型上下文协议 (MCP) 服务器提供对指定目录中的文件的安全、只读访问。

特征

  • 使用 `file://` URI 方案将文件公开为 MCP 资源
  • 通过 MCP 工具提供文件搜索功能
  • 尊重 .gitignore 模式
  • 安全功能包括路径遍历保护
  • MIME类型检测

安装

使用紫外线:

uv add mcp-filesystem-python

用法

运行服务器:

uv run src/filesystem/server.py /path/to/directory

Claude 桌面集成

配置示例

可以在“examples”目录中找到 Claude Desktop 的示例配置:

  • `examples/claude_desktop_config.json`:macOS/Linux 示例
  • `examples/claude_desktop_config_windows.json`:Windows 示例

这些文件应放置在:

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

请确保:

  1. 用您的实际路径替换路径
  2. 对于 macOS/Linux,使用正斜杠 (`/`);对于 Windows,使用反斜杠 (`\\`)
  3. 使用绝对路径(而不是相对路径)

发展

  1. 克隆存储库
  2. 创建虚拟环境和同步要求, uv sync

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

该服务器通过 MCP 提供对目录文件的安全、只读访问,支持文件搜索、.gitignore 合规性、路径遍历保护以及使用“file://”URI 方案的 MIME 类型检测。

  1. 特征
    1. 安装
      1. 用法
        1. Claude 桌面集成
          1. 配置示例
        2. 发展
          1. 执照

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.
              Last updated -
              Python
              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
              4
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Node.js server that allows browsing Git repositories through MCP, providing tools to view directory structures and read important files from repositories.
              Last updated -
              2
              JavaScript
              MIT License
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              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 -
              5
              1
              JavaScript

            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/punkpeye/mcp-filesystem-python'

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