这是一个强大的模型上下文协议(Model Context Protocol)服务器,专门用于从 CSV 和 Excel 文件更新数据库。它能有效解决数据更新难题,为数据库管理提供便捷、高效的解决方案。
本服务器可用于从 CSV 和 Excel 文件更新数据库。以下是使用示例:
使用 update_database
工具,参数如下:
{
"filePath": "/path/to/your/file.csv",
"databaseType": "PostgreSQL",
"connectionString": "postgresql://user:pass@localhost:5432/db",
"tableName": "target_table"
}
update_database
- 使用 CSV/Excel 文件更新数据库
create_note
- 创建和管理笔记(用于文档)
安装依赖:
npm install
构建服务器:
npm run build
带有自动重建功能的开发:
npm run watch
要在 Claude Desktop 上使用,请添加服务器配置:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json%
{
"mcpServers": {
"database-updater": {
"command": "/path/to/database-updater/build/index.js"
}
}
}
由于 MCP 服务器通过 stdio 进行通信,调试可能会有挑战。我们推荐使用 MCP Inspector:
npm run inspector
Inspector 会提供一个访问浏览器中的调试工具的 URL。