Back to MCP directory
publicPublicdnsLocal runtime

Filesystem (Rust)

Rust实现的MCP文件系统工具集

article

README

🚀 rs_filesystem:MCP Rust 文件系统工具

rs_filesystem 是一套简单的文件系统工具集合,可在 Claude 桌面或其他 MCP 客户端中使用,为用户提供便捷的文件系统操作体验。

🚀 快速开始

✨ 主要特性

  • CLI 选项丰富:提供多种命令行选项,满足不同的使用需求。
    • --mcp:启用 MCP 服务器。
    • --resources:显示资源。
    • --prompts:显示提示。
    • --tools:显示工具。

📦 安装指南

文档未提及安装步骤,暂不展示安装指南。

💻 使用示例

基础用法

在 Claude Desktop 中使用 MCP CLI 服务器的步骤如下:

  1. 编辑 claude_desktop_config.json:进入 Claude 桌面 -> 设置 -> 开发者 -> 编辑配置
  2. servers 部分添加以下配置:
{
   "mcpServers": {
      "rs_filesystem": {
         "command": "/path/to/rs_filesystem",
         "args": [
            "--mcp"
         ],
         "env": {
            "MCP_RS_FILESYSTEM_ALLOWED_DIRECTORIES": "/path/number/one:/path/number/two"
         }
      }
   }
}

⚠️ 重要提示

  • 请确保使用实际路径到 rs_filesystem 可执行文件。
  • 请确保 MCP_RS_FILESYSTEM_ALLOWED_DIRECTORIES 环境变量设置为用冒号分隔的允许目录列表,工具仅在这些目录内有效。

如果你想检查 MCP 日志,请使用 tail -n 20 -f ~/Library/Logs/Claude/rs_filesystem.logs.jsonl

📚 详细文档

参考资料

  • MCP 规范:https://spec.modelcontextprotocol.io/
  • Model Context Protocol (MCP):https://modelcontextprotocol.io/introduction
  • rpc-router:JSON-RPC 路由库 - https://github.com/jeremychone/rust-rpc-router/
  • Zed context_server:https://github.com/zed-industries/zed/tree/main/crates/context_server
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