@qpd-v/mcp删除
](https://smithery.ai/server/@qpd-v/mcp-delete)
提供文件删除功能的模型上下文协议(MCP)服务器。该服务器允许AI助手在需要时安全删除文件,并支持相对和绝对路径。
特性
- 使用相对或绝对路径删除文件
- 尝试多条潜在路径的智能路径解析
- 清除包含详细路径解析信息的错误消息
- 删除前的安全文件存在检查
- 与Claude和其他兼容MCP的AI助手配合使用
例子
与Claude Desktop一起使用
与VSCode Roo-Cline扩展一起使用
安装
通过Smithery安装
通过以下方式自动安装Claude Desktop的文件删除 史密瑟里:
npx -y @smithery/cli install @qpd-v/mcp-delete --client claude手动安装
npx @qpd-v/mcp-delete或全局安装:
npm install -g @qpd-v/mcp-delete配置
克劳德桌面
将服务器配置添加到Claude Desktop配置文件中:
窗户:
// %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-delete": {
"command": "npx",
"args": ["@qpd-v/mcp-delete"]
}
}
}MacOS:
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-delete": {
"command": "npx",
"args": ["@qpd-v/mcp-delete"]
}
}
}
}VSCode扩展
将服务器配置添加到Cline设置中:
窗户:
// %APPDATA%/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"mcp-delete": {
"command": "npx",
"args": ["@qpd-v/mcp-delete"]
}
}
}MacOS:
// ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"mcp-delete": {
"command": "npx",
"args": ["@qpd-v/mcp-delete"]
}
}
}
}可用工具
删除文件
删除指定路径下的文件。
参数:
path(string,必填):要删除的文件的路径(相对于工作目录或绝对)
Claude中的示例用法:
You can ask me to delete a file like this:
"Please delete the file example.txt"
I will use the delete_file tool to safely remove the file.路径解析
服务器通过尝试多种方法智能地处理路径解析:
- 提供的确切路径
- 相对于当前工作目录的路径
- 相对于指定基目录的路径
这使得它更便于用户使用,因为文件可以通过相对路径引用,服务器将尝试正确定位它们。
发展
克隆存储库:
git clone https://github.com/qpd-v/mcp-delete.git
cd mcp-delete安装依赖项:
npm install构建服务器:
npm run build对于自动重建的开发:
npm run watch调试
由于MCP服务器通过stdio进行通信,调试可能具有挑战性。使用MCP检查器进行调试:
npm run inspector这将提供一个URL,用于访问浏览器中的调试工具。
许可证
麻省理工学院
作者
qpd-v
