MCP文件删除工具添加福利群:解决AI开发者的「MCP实战痛点」一个提供文件删除功能的模型上下文协议(MCP)服务器。该服务器允许AI助手在需要时安全地删除文件,支持相对路径和绝对路径。
要通过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配置文件中:
Windows:
// %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"]
}
}
}
}

将服务器配置添加到您的Cline设置中:
Windows:
// %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 (字符串, 必需): 要删除的文件路径(相对于工作目录或绝对路径)在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 Inspector进行调试:
npm run inspector
这将提供一个URL以便您在浏览器中访问调试工具。
MIT
qpd-v