Back to MCP directory
publicPublicdnsLocal runtime

mcp_server_filesystem

这是一个非官方的MCP文件系统服务器实现,作为概念验证展示如何通过Claude Desktop访问本地文件系统。项目允许配置多个目录路径,严格限制访问范围,仅供教育研究使用。

article

README

🚀 MCP 文件系统服务器

本项目是一个未经官方认可的Claude文件系统MCP服务器实现的端口,仅作为概念验证(POC)。它可用于演示和探索MCP服务器功能,但与Anthropic无关,请勿在生产环境中使用。

🚀 快速开始

使用UVX进行安装,具体命令如下:

uv venv
.venv\Scripts\activate  # Windows系统上运行
uv pip install -e .

💻 使用示例

基础用法

在Claude Desktop中使用该文件系统服务器,需按以下步骤操作:

1. 编辑配置文件

编辑 claude_desktop_config.json 文件,示例如下:

{
  "mcpServers": {
    "myFiles": {
      "command": "mcp-server-filesystem",
      "args": [
        "D:/"  // 用你想要的目录替换此处
      ]
    }
  }
}

你也可以添加多个目录,示例如下:

{
  "mcpServers": {
    "myFiles": {
      "command": "mcp-server-filesystem",
      "args": [
        "D:/",
        "C:/Users/YourUsername/Documents",
        "~/Desktop"
      ]
    }
  }
}

2. 重启应用

重启Claude Desktop以应用更改。

3. 访问服务器

在Claude Desktop中:

  • 点击纸clip图标
  • 选择MCP菜单(两个连接的电插头)
  • 你的文件系统服务器将在集成选项中显示

高级用法

暂无高级用法相关内容。

⚠️ 安全注意事项

args数组中指定的目录将可访问。服务器会严格执行路径验证,以防止访问允许目录之外的内容。

🛠️ 故障排除

命令未找到

  • 确保已安装包,可使用 uv pip list 检查。
  • 确认Python环境已激活。

访问被拒绝

  • 验证args中的目录是否存在。
  • 确保你对指定目录具有读取权限。

服务器未在Claude Desktop中显示

  • 检查配置文件语法是否正确。
  • 在配置更改后重启Claude Desktop。

⚠️ 重要提示

这是一个未经官方认可的Claude文件系统MCP服务器实现的端口,仅作为概念验证(POC),与Anthropic无关,请勿在生产环境中使用。

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