这是一个强大的文件系统工具包,遵循 [Model Context Protocol](https://github.com/Modelคณะกรรม parchain/model-context-protocol) 标准。它借助标准的输入输出协议,为 AI 代理或其他有高效文件操作需求的应用,提供对文件系统的强大控制能力。
文件系统 MCP 服务器是一个遵循标准协议的工具包,能为 AI 代理等应用提供强大的文件系统控制能力。以下是快速使用的示例:
import { createClient } from '@sylphlab/filesystem-mcp';
const client = createClient();
// 示例:列出当前目录下的文件和子目录
client.listFiles({
path: '.',
recursive: false,
showHidden: true,
}).then((result) => {
console.log('操作结果:', result);
});
这个服务器为您的 AI 代理提供了丰富的文件系统工具箱,具体功能如下:
所有工具均支持批处理操作,且每个操作都会返回详细的执行结果报告。
npm install @sylphlab/filesystem-mcp
import { createClient } from '@sylphlab/filesystem-mcp';
const client = createClient();
// 示例:列出当前目录下的文件和子目录
client.listFiles({
path: '.',
recursive: false,
showHidden: true,
}).then((result) => {
console.log('操作结果:', result);
});
git clone https://github.com/sylphlab/filesystem-mcp.git
cd filesystem-mcp && pnpm install
pnpm run build
pnpm run dev
此仓库使用 GitHub Actions 自动化发布流程:
v*.*.*
) 推送到 main
分支时,自动发布到 npm。需要在 GitHub 仓库设置中配置以下秘密:
NPM_TOKEN
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
欢迎贡献!请通过 GitHub 仓库 提交问题或拉取请求。
本项目以 MIT License 发布。