Skip to main content
Glama

MCP Server for MySQL

MIT License
5,426
418
  • Linux
  • Apple
//evals.ts import { EvalConfig } from 'mcp-evals'; import { openai } from "@ai-sdk/openai"; import { grade, EvalFunction } from "mcp-evals"; const mysqlQueryToolEval: EvalFunction = { name: 'mysql_query Tool Evaluation', description: 'Evaluates the MySQL query execution functionality', run: async () => { const result = await grade(openai("gpt-4"), "Please execute the following SQL query and return the results: SELECT * FROM employees WHERE status='ACTIVE';"); return JSON.parse(result); } }; const mysqlQueryGenerationEval: EvalFunction = { name: 'mysql_query Tool Generation Evaluation', description: 'Evaluates the MySQL query tool for correct SQL generation and execution', run: async () => { const result = await grade(openai("gpt-4"), "Use the mysql_query tool to select all rows from the 'users' table where isActive = 1. Provide the SQL query in the correct format."); return JSON.parse(result); } }; const mysqlQueryColumnsEval: EvalFunction = { name: 'mysql_query Columns Evaluation', description: 'Evaluates the mysql_query tool for column selection', run: async () => { const result = await grade(openai("gpt-4"), "Please provide a SQL query to retrieve the id, name, and email columns for all records in the users table."); return JSON.parse(result); } }; const config: EvalConfig = { model: openai("gpt-4"), evals: [mysqlQueryToolEval, mysqlQueryGenerationEval, mysqlQueryColumnsEval] }; export default config; export const evals = [mysqlQueryToolEval, mysqlQueryGenerationEval, mysqlQueryColumnsEval];

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benborla/mcp-server-mysql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server