数据库更新器 MCP 服务器是一个强大的工具,它可以从 CSV 和 Excel 文件更新数据库。借助模型上下文协议(MCP),该服务器为数据库更新操作提供了高效、灵活的解决方案。
update_database
:此工具可使用 CSV 或 Excel 文件更新数据库。
create_note
:用于创建和管理笔记,主要用于文档记录。
使用 update_database
工具时,需要指定以下参数:
{
"filePath": "/path/to/your/file.csv",
"databaseType": "PostgreSQL",
"connectionString": "postgresql://user:pass@localhost:5432/db",
"tableName": "target_table"
}
要在 Claude Desktop 上使用该服务器,请在配置文件中添加相关信息:
~/Library/Application Support/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。
npm install
npm run build
npm run watch