Back to Home
KeeVor icon

mysql-mcp-server

by KeeVor

Overview

Enables AI assistants within the Cursor editor to directly query and interact with MySQL databases via the Model Context Protocol (MCP).

Installation

Run Command
npx -y @keevor/mysql-mcp-server

Environment Variables

  • DB_HOST
  • DB_USER
  • DB_DATABASE

Security Notes

The server directly executes user-provided SQL queries (`args.sql`) via `conn.execute()` without server-side sanitization or explicit parameter binding for prepared statements, making it highly vulnerable to SQL injection. While the README suggests using read-only or restricted database accounts, the core functionality itself doesn't prevent malicious SQL from being executed if the AI or user input is compromised. It also uses `KILL QUERY` for timeout, which requires specific database permissions and could potentially be abused if the connection ID is guessable, though the risk is lower here as it's killing its own query.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-12-15

Tags

MySQLMCPCursorAIDatabase