mysqlInteractior
mysqlInteractior是一个简单的MCP服务器,可以与任何具有MCP客户端的主机(例如:claude桌面)配合使用。它允许与mysql服务器中的任何数据库直接交互。
结果
更新mysql凭据
在index.ts中,输入您的主机、用户和密码:
const connection = await mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'root',
database: db
});然后运行:
npm run buildClaude桌面集成
将此添加到claude_desktop_config.json(文件->设置->开发人员->克劳德设置->配置):
"mysql-interactor": {
"command": "node",
"args": [
"path\\to\\mysqlInteractor\\build\\index.js"
]
}用法
Give me the number of flights by departure airport in flights booking database