MCP 文件查找器
一个用 Python 编写的 MCP 服务器,用于根据路径片段查找文件。
快速入门
安装
- 确保已安装 Python 3.8 或更高版本。
- 克隆仓库: git clone https://github.com/cavil2015/mcp-file-finder.git cd mcp-file-finder
- 安装依赖: pip install -r requirements.txt
启动服务器
运行以下命令启动服务:
python mcp_server.py
服务将运行在以下地址:
示例请求
-
查找包含 "test" 的所有文件: http://127.0.0.1:5000/find?query=test&dir=.
-
返回结果示例: [ { "name": "testfile.txt", "path": "/home/user/projects/testfile.txt", "size": 1024, "created_at": "Tue Mar 11 12:34:56 2025" } ]