Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsMay 12, 2026·2 min de lectura

mcp-server-mysql — Read-Only MySQL MCP for Claude Code

mcp-server-mysql is an MCP server for Claude Code that connects to MySQL (optionally via SSH tunnels) so agents can inspect schemas and run read-only SQL.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Needs Confirmation · 62/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp
Instalación
Manual
Confianza
Confianza: Established
Entrada
claude mcp add mcp_server_mysql -- npx @benborla29/mcp-server-mysql
Comando CLI universal
npx tokrepo install 2c4d8def-3374-5876-87e9-73d83580f5f8
Introducción

Connect Claude Code to a MySQL database with explicit read-only guards and optional SSH tunnel automation, so queries are auditable and repeatable.

Best for: Database exploration, troubleshooting, and schema QA where you want an agent to run SQL without write access

Works with: Claude Code (or any MCP client); MySQL; optional SSH tunnels for remote DBs

Setup time: 5–10 minutes

Key facts (verified)

  • README shows a Claude Code config with ALLOW_*_OPERATION=false toggles for read-only safety.
  • Supports SSH tunnel workflows and auto start/stop hooks (per README).
  • Uses npx @benborla29/mcp-server-mysql as the standard stdio entrypoint for Claude Code (per README).
  • GitHub: 1,638 stars · 206 forks; pushed 2026-03-10 (GitHub API verified).

Main

A safe pattern for “agent queries” is:

  1. Keep the MCP server read-only (leave ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, ALLOW_DELETE_OPERATION set to false).
  2. Ask the agent to describe intent before executing (e.g., “I will run a SELECT ... LIMIT 50 to validate hypothesis X”).
  3. Use the agent for schema discovery first (tables, columns, indexes) before any large query.
  4. When connecting to a remote DB, use the README’s SSH tunnel support and keep credentials out of version control (prefer env prompts / local secret stores).

If you later need writes (migrations, backfills), flip write flags only for a time-bounded session and keep a human in the loop.

FAQ

Q: Is it read-only? A: By default, yes. The README config shows write operations gated by ALLOW_*_OPERATION env flags.

Q: Can it connect to a remote DB? A: Yes. The README highlights SSH tunnel support for remote MySQL.

Q: How do I verify it’s working in Claude Code? A: Use claude mcp list and then try a small schema query (e.g., list tables) before larger SQL.

🙏

Fuente y agradecimientos

Source: https://github.com/benborla/mcp-server-mysql > License: MIT > GitHub stars: 1,638 · forks: 206

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados