Back to MCP directory
publicPublicdnsLocal runtime

mcp_server_filesystem_01

一个基于MCP协议的文件系统服务,提供安全的项目目录文件操作API,支持AI助手进行代码读写、编辑和管理。

article

README

🚀 MCP 文件系统服务器配置指南

本指南将详细介绍 MCP 文件系统服务器的配置过程,包括安装步骤、测试说明、运行方法等,帮助你快速搭建并使用该服务器。

🚀 快速开始

按照以下步骤完成 MCP 文件系统服务器的安装与配置。

📦 安装指南

适用于 Windows

REM 克隆仓库
git clone https://github.com/MarcusJellinghaus/mcp_server_filesystem.git
cd mcp-server-filesystem

REM 创建并激活虚拟环境
python -m venv .venv
.venv\Scripts\activate

REM 安装依赖项
pip install -e .

REM 安装开发依赖项
pip install -e ".[dev]"

📚 详细文档

测试说明

项目包含基于 pytest 的单元测试,位于 tests/ 目录中。有关测试结构和执行的详细信息,请参阅 tests/README.md

对于 LLM 基于的测试,请参阅 tests/LLM_Test.md。该文件包含可以直接粘贴到 LLM 以验证 MCP 服务器功能的测试说明。

使用 MCP 开发工具运行

# 设置 PYTHONPATH 并使用 mcp dev 运行服务器模块
set PYTHONPATH=. && mcp dev src/server.py

📄 许可证

本项目采用 MIT 许可证,详情请查看 LICENSE 文件。

MIT 许可证是一种宽松的许可,允许在最少限制的情况下进行重复使用。它允许使用、复制、修改和分发,并附有适当的归属说明。

🔗 相关链接

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
Environment variableslockValues stay in this browser tab and are not uploaded or saved
Claude Desktop
{
  "mcpServers": {
    "filesystem": {
      "command": "C:\\path\\to\\mcp_server_filesystem\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\path\\to\\mcp_server_filesystem\\src\\main.py",
        "--project-dir",
        "C:\\Users\\YourUsername\\Documents\\Projects\\MyProject",
        "--log-level",
        "INFO"
      ],
      "env": {
        "PYTHONPATH": "C:\\path\\to\\mcp_server_filesystem\\"
      }
    }
  }
}
Save toclaude_desktop_config.json
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client