MySQL MCP Server

by tqvthu-works

192 downloads
Not rated
GitHub

Description

# MySQL MCP Server A Model Context Protocol (MCP) server for interacting with MySQL databases in Cursor IDE. ## Features - Execute SQL queries (read-only by default). - Inspect database schemas. - Configurable write permissions. ## Installation ```bash npm install ``` ##…

About

# MySQL MCP Server A Model Context Protocol (MCP) server for interacting with MySQL databases in Cursor IDE. ## Features - Execute SQL queries (read-only by default). - Inspect database schemas. - Configurable write permissions. ## Installation ```bash npm install ``` ## Configuration ``` bash Create .env with…

Details

Author
tqvthu-works
Downloads
192
Categories
Database

- Execute SQL queries (read-only by default).
- Inspect database schemas.
- Configurable write permissions for INSERT, UPDATE, DELETE.

Install dependencies with npm install, then create a .env file with your MySQL connection details and write‑permission flags. Add the server configuration to your project’s .cursor/mcp.json, specifying npx ts-node as the command and the required environment variables. The server can then be invoked from Cursor IDE.

MySQL MCP Server

A Model Context Protocol (MCP) server for interacting with MySQL databases in Cursor IDE.

Features

- Execute SQL queries (read-only by default). - Inspect database schemas. - Configurable write permissions.

Installation

npm install

Configuration

`` bash Create .env with: MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=your_username MYSQL_PASS=your_password MYSQL_DB=your_database ALLOW_INSERT_OPERATION=false ALLOW_UPDATE_OPERATION=false ALLOW_DELETE_OPERATION=false

Usage in Cursor

bash Add to .cursor/mcp.json { "mcpServers": { "mysqlMcpServer": { "command": "npx", "args": ["ts-node", "path/to/src/index.ts"], "env": { "MYSQL_HOST": "<host>", "MYSQL_PORT": "<port>", "MYSQL_USER": "<user>", "MYSQL_PASS": "<pass>", "MYSQL_DB": "db", "ALLOW_INSERT_OPERATION": "false", "ALLOW_UPDATE_OPERATION": "false", "ALLOW_DELETE_OPERATION": "false" } } } }
``

License

MIT
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.