UNPKG

@rolandohuber/mysql-mcp-server

Version:

A comprehensive MCP server for MySQL database operations with 16 tools, multi-transport support, and intelligent test data generation

28 lines 756 B
export const querySchema = { name: 'mysql_query', description: 'Executes any SQL query on the MySQL database', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'SQL query to execute', }, }, required: ['query'], }, }; export async function queryHandler(mysqlService, args) { try { const result = await mysqlService.query(args.query); return { rows: result.rows, affectedRows: result.affectedRows, insertId: result.insertId, }; } catch (error) { throw new Error(`Query execution failed: ${error}`); } } //# sourceMappingURL=query.js.map