目录管理服务

一个基于Python和Rust的目录管理服务,通过调用Rust二进制文件快速处理文件操作并返回结果到LLM。

  • by JustAnotherSoloDev
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 JustAnotherSoloDev/dir-mcp

使用说明

目录mcp

这是一个使用FastMCP用python编写的MC服务器。它使用rust二进制文件来执行文件操作。

二进制文件可以通过以下方式下载 链接 当mcp服务器收到任何命令时,它会调用rust二进制文件快速进行处理,并将结果返回给LLM。

如何奔跑。

  1. 设置新环境(可选)

     python -m venv .venv
     .venv\Scripts\activate.bat 
    
  2. 安装依赖项

    pip install requirements.txt
    
  3. 运行服务器 蟒蛇

    python main.py
    

如何连接到lm工作室。

编辑mcp-json并添加本地mcp服务器url

{
  "mcpServers": {
    "summary": {
      "url": "http://127.0.0.1:8000/mcp "
    }
  }
}

这将在集成中添加摘要插件,您将在yur llm中获得可用的工具。

提示

计算目录的大小

calculate size of D:\Python\dir-summary and show me the details of the files and folders in the directory.

get the largest file in D:\Python\dir-summary.

Get a  breakdown of all the files types and their sizes for the directory D:\github\dir-summary and display the summarized data in a table. If a file type occurs multiple time make sure you sum the size and show them as a single record instead of showing two records.