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

22 lines (19 loc) 591 B
import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { MysqlService } from '../services/MysqlService.js'; export const versionSchema: Tool = { name: 'mysql_version', description: 'Gets the version of the MySQL server', inputSchema: { type: 'object', properties: {}, required: [], }, }; export async function versionHandler(mysqlService: MysqlService): Promise<{ version: string }> { try { const version = await mysqlService.getVersion(); return { version }; } catch (error) { throw new Error(`Failed to get MySQL version: ${error}`); } }