文本保存器 MCP 是一个 Claude MCP(模型上下文协议)服务器,它能让 Claude 将文本保存到您本地文件系统的文件中,为文本保存提供了便捷的解决方案。
文本保存器 MCP 允许您借助 Claude,轻松地将文本保存到本地文件系统。完成安装和配置后,就能使用自然语言指令让 Claude 保存文本。
pip install -r requirements.txt
~/Library/Application Support/Claude/claude_desktop_config.json
C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"text-saver": {
"command": "/full/path/to/python",
"args": [
"/full/path/to/text_saver_mcp.py"
],
"cwd": "/path/to/writable/directory",
"host": "127.0.0.1",
"port": 8080,
"timeout": 30000
}
}
}
请确保将路径替换为您系统上的实际位置。 4. 重启Claude Desktop。
设置完成后,您可以使用自然语言要求Claude保存文本到文件,例如:
文本将保存到配置中指定的目录。
# 查找您的Python路径
which python
# 然后在配置中使用该路径
chmod 755 /path/to/save/directory
该脚本包含详细的日志记录以帮助诊断问题。查看Claude Desktop开发者控制台中的日志。