MySQL MCP Server

by tqvthu-works

192 downloads Not rated yet

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…

Explore

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

npm install

`` 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"
}
}
}
}
``

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.