MySQLBLOCK
A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://mcptoplist.com/server/glama%2Fbenborla%2Fmcp-server-mysql)
[](https://archestra.ai/mcp-catalog/benborla__mcp-server-mysql)
Sponsor — Bloome
[](https://bloome.im/login?ref=2x7GfeSw)
Using mcp-server-mysql to let your AI query MySQL? **Bloome** brings that to your whole team — an AI-agent IM platform where AI agents are members of the chat. Connect your MCP tools and have agents inspect schemas, run queries, and answer data questions for everyone in one thread. Zero local setup, runs in the cloud, on web and mobile.
MCP server that gives Claude and other LLMs access to MySQL — inspect schemas, run queries, and optionally write data, all through the Model Context Protocol.
Key Features
- Read-only by default — write operations opt-in via env flags
- Claude Code integration — optimized for Anthropic's Claude Code CLI
- SSH tunnel support — built-in support for remote databases
- Multi-DB mode — query across multiple databases without reconnecting
- Schema-specific permissions — per-database read/write control
- PII redaction — automatic masking of sensitive data in results
- Remote mode — HTTP transport with bearer token auth
- SSL/TLS support — encrypted connections with mTLS option
Requirements
- Node.js v20+
- MySQL 5.7+ (8.0+ recommended)
- MySQL user with appropriate privileges
Quick Install
Claude Code (simplest):
claude mcp add mcp_server_mysql \ -e MYSQL_HOST="127.0.0.1" \ -e MYSQL_PORT="3306" \ -e MYSQL_USER="root" \ -e MYSQL_PASS="your_password" \ -e MYSQL_DB="your_database" \ -- npx @benborla29/mcp-server-mysql
Claude Desktop / other clients:
{
"mcpServers": {
"mcp_server_mysql"4b3a0b8f3b06OBSERVED · 2026-09-23Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-server-mysql --env MYSQL_PASS=${MYSQL_PASS} --env MYSQL_PASSWORD=${MYSQL_PASSWORD} --env MYSQL_SSL_KEY=${MYSQL_SSL_KEY} --env MYSQL_SSL_REJECT_UNAUTHORIZED=${MYSQL_SSL_REJECT_UNAUTHORIZED} -- npx -y @benborla29/[email protected]{
"mcpServers": {
"mcp-server-mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/[email protected]"
],
"env": {
"MYSQL_PASS": "${MYSQL_PASS}",
"MYSQL_PASSWORD": "${MYSQL_PASSWORD}",
"MYSQL_SSL_KEY": "${MYSQL_SSL_KEY}",
"MYSQL_SSL_REJECT_UNAUTHORIZED": "${MYSQL_SSL_REJECT_UNAUTHORIZED}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Tables | read | List of all MySQL tables |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | FAIL |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (19)
.env
SSH_KEY="${SSH_KEY:-$HOME/.ssh/id_rsa}"-----BEGIN PRIVATE KEY-----
expect(content).toContain('-----BEGIN PRIVATE KEY-----');.env
.env.dist
.env.test
.markdownlint.yml
.markdownlintignore
dotenv.config({ path: path.resolve(__dirname, "../../.env.test") });const SERVER_ENTRY = path.resolve(__dirname, "../../dist/index.js");
} from "../../../dist/src/db/index.js";
} from "../../dist/src/db/index.js";
dotenv.config({ path: path.resolve(__dirname, "../../.env.test") });const SERVER_URL = `http://127.0.0.1:${PORT}/mcp`;@ai-sdk/openai, dotenv, express, mcp-evals, mysql2, node-sql-parser, zod, @types/express
Visit [https://smithery.ai/server/@benborla29/mcp-server-mysql](https://smithery.ai/server/@benborla29/mcp-server-mysql) and follow the on-screen instructions.
.smithery/index.cjs
assets/demo.gif
Gates applied: no_behavioural_pass.
4b3a0b8f3b06full audit observations/trust-audit/mcp-server/benborla__mysql.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-23 | 4b3a0b8f3b06 | BLOCK | D | 69 | source changed, verdict held |
Questions
What is the MySQL MCP server?
A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
What tools does MySQL expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is MySQL safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does MySQL need?
It reads MYSQL_PASS, MYSQL_PASSWORD, MYSQL_SSL_KEY, MYSQL_SSL_REJECT_UNAUTHORIZED and REMOTE_SECRET_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does MySQL run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @benborla29/mcp-server-mysql at 2.0.9.
How current is this page?
The grade is for one exact copy of the source (4b3a0b8f3b06), read on 2026-09-23. The repository is watched and re-audited when it changes.