Atlas / MCP servers / benborla / MySQL

MySQLBLOCK

mcp/benborla/mysql

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.

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
1 1r · 0w · 0d
Transport
stdio · streamable-http
License
MIT
Stars
2,129
01

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"
Read from source at commit 4b3a0b8f3b06OBSERVED · 2026-09-23
02

Connect

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-code
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]
claude-desktop
{
  "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}"
      }
    }
  }
}
03

Exposed tools (1)

1 read · 0 write · 0 destructive.

ToolRiskDescription
TablesreadList of all MySQL tables
04

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.

LayerWhat it checksResult
L0Provenance & inventoryFAIL
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

HIGHHard-coded secrets · inv.env_committed · CWE-798, CWE-321
.env
.env
Why it matters. a real .env in the package
Fix. ship .env.example with placeholders only
HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
scripts/start-tunnel-rds.sh:28
SSH_KEY="${SSH_KEY:-$HOME/.ssh/id_rsa}"
Why it matters. touches a credential store
MEDIUMHard-coded secrets · secret.private_key · CWE-798, CWE-321
tests/fixtures/valid-client-key.pem:1
-----BEGIN PRIVATE KEY-----
MEDIUMHard-coded secrets · secret.private_key · CWE-798, CWE-321
tests/unit/ssl-mtls.test.ts:48
expect(content).toContain('-----BEGIN PRIVATE KEY-----');
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env
.env
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env.dist
.env.dist
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env.test
.env.test
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.markdownlint.yml
.markdownlint.yml
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.markdownlintignore
.markdownlintignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/e2e/pii-redaction.test.ts:33
dotenv.config({ path: path.resolve(__dirname, "../../.env.test") });
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/e2e/pii-redaction.test.ts:36
const SERVER_ENTRY = path.resolve(__dirname, "../../dist/index.js");
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/multi-db/multi-db-mode.test.ts:6
} from "../../../dist/src/db/index.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/mysql.test.ts:7
} from "../../dist/src/db/index.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
tests/integration/mysql.test.ts:21
dotenv.config({ path: path.resolve(__dirname, "../../.env.test") });
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/integration/remote-mcp-parallel.test.ts:17
const SERVER_URL = `http://127.0.0.1:${PORT}/mcp`;
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@ai-sdk/openai, dotenv, express, mcp-evals, mysql2, node-sql-parser, zod, @types/express
Why it matters. 20 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.fetch_and_trust · CWE-94, CWE-1427
docs/INSTALLATION.md:5
Visit [https://smithery.ai/server/@benborla29/mcp-server-mysql](https://smithery.ai/server/@benborla29/mcp-server-mysql) and follow the on-screen instructions.
Why it matters. remote text is to be obeyed as instructions
INFOInventory / provenance · inv.oversize · CWE-1104
.smithery/index.cjs
.smithery/index.cjs
Why it matters. 42337766 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
assets/demo.gif
assets/demo.gif
Why it matters. 24807308 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-09-23 · audit v0.4.1 · source sha 4b3a0b8f3b06full audit observations/trust-audit/mcp-server/benborla__mysql.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-234b3a0b8f3b06BLOCKD69source changed, verdict held
06

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.

Advertisement