一个模型上下文协议(MCP)服务器,用于暴露工作目录中每个文件的资源,并发送更改通知。
⚠️ 预测试版质量 ⚠️
“在我的机器上可以运行”。欢迎反馈问题 ❤️
.gitignore 规则安装 Go:请参阅 https://golang.org/doc/install 的说明
获取或更新此服务器:
go install github.com/isaacphi/mcp-filesystem@latest
在客户端配置中添加以下内容(对于 Claude Desktop,位于 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem",
"args": ["--workspace", "/path/to/your/repository"]
}
}
}
将 /path/to/your/repository 替换为您的项目目录的绝对路径。
您的客户端将能够访问和引用仓库中所有未被忽略的文件作为 MCP 资源。每个文件都被注册为具有适当 MIME 类型的单独资源。
您的客户端需要支持以下 MCP 功能:
notifications/resources/list_changed 事件本项目使用了:
.gitignore 文件克隆仓库:
git clone https://github.com/isaacphi/mcp-filesystem.git
cd mcp-filesystem
安装依赖项:
go mod download
构建:
go build
配置您的客户端以使用本地构建:
{
"mcpServers": {
"filesystem": {
"command": "/full/path/to/your/mcp-filesystem/mcp-filesystem",
"args": ["--workspace", "/path/to/repository"],
"env": {
"DEBUG": "1"
}
}
}
}
请尽可能详细地提交问题。
设置 DEBUG 环境变量以启用详细日志记录:
"env": {
"DEBUG": "1"
}
.gitignore)info、create、edit 和 delete 工具