MCP MySQL Server with SSH tunnel

MCP MySQL Server with SSH tunnel

mcp-mysql-carlosfpc•bycarlosfpc

An MCP server that connects to a MySQL database, optionally through an SSH tunnel, and exposes it to MCP clients such as Cursor via stdio transport.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Starts both an SSH tunnel and the MCP server through the start-mcp script.
  • •Connects to MySQL using configurable host, port, user, password and database settings.
  • •Controls which SQL operations are permitted, with SELECT enabled by default and INSERT, UPDATE and DELETE disabled by default.
  • •Uses an SSH tunnel for remote database connections and supports empty SSH configuration for local databases.

BEST FOR

  • •Querying a remote MySQL database from an MCP client through an SSH tunnel.
  • •Using MySQL with Cursor IDE as an MCP server with restricted permissions.

ABOUT MCP-MYSQL-CARLOSFPC

MCP MySQL Server with SSH tunnel is cataloged as an MCP server attributed to carlosfpc. An MCP server that connects to a MySQL database, optionally through an SSH tunnel, and exposes it to MCP clients such as Cursor via stdio transport. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP MySQL Server with SSH tunnel are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which SQL operations are enabled by default?

Only SELECT operations are enabled by default; INSERT, UPDATE and DELETE must be explicitly allowed.

Is an SSH tunnel required for local databases?

No; the SSH configuration can be left empty when using a local database.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1c1b4e2e6766 · 采集于 2026-11-13 12:50:53 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP MySQL Server

Servidor MCP para conexión MySQL con túnel SSH.

Requisitos Previos

  • Node.js (versión 14 o superior)
  • Acceso SSH al servidor remoto
  • Cliente MySQL
  • Cursor IDE

Instalación

  1. Clona este repositorio:
git clone [URL_DEL_REPOSITORIO]
cd [NOMBRE_DEL_DIRECTORIO]
  1. Crea el archivo de configuración:
cp mcp-config.env.example mcp-config.env
  1. Configura las variables en mcp-config.env:

Variables de Configuración MySQL

# Configuración de conexión MySQL
MYSQL_HOST=127.0.0.1     # Host de MySQL (por defecto localhost)
MYSQL_PORT=3306          # Puerto de MySQL (por defecto 3306)
MYSQL_USER=              # Tu usuario de MySQL
MYSQL_PASS=              # Tu contraseña de MySQL
MYSQL_DB=                # Nombre de la base de datos

# Permisos de operaciones
ALLOW_INSERT_OPERATION=false    # Permitir operaciones INSERT
ALLOW_UPDATE_OPERATION=false    # Permitir operaciones UPDATE
ALLOW_DELETE_OPERATION=false    # Permitir operaciones DELETE
ALLOW_SELECT_OPERATION=true     # Permitir operaciones SELECT (consultas)

# Configuración SSH para túnel
SSH_HOST=                # Hostname del servidor SSH
SSH_USER=                # Usuario SSH
SSH_PORT_MAPPING=3306:127.0.0.1:3306  # Mapeo de puertos para el túnel SSH
  1. Instala las dependencias:
npm install

Configuración en Cursor IDE

  1. Localiza o crea el archivo mcp.json en la ruta C:\Users\[TU_USUARIO]\.cursor\mcp.json
  2. Añade la siguiente configuración (ajusta la ruta a la ubicación donde clonaste el repositorio):
{
  "mcpServers": {
    "MySQL": {
      "transportType": "stdio",
      "command": "npm",
      "args": ["--silent", "--prefix", "RUTA_A_TU_PROYECTO", "run", "start-mcp"]
    }
  }
}

Por ejemplo, si clonaste el proyecto en C:\proyectos\mcp-mysql, la configuración sería:

{
  "mcpServers": {
    "MySQL": {
      "transportType": "stdio",
      "command": "npm",
      "args": ["--silent", "--prefix", "C:\\proyectos\\mcp-mysql", "run", "start-mcp"]
    }
  }
}

Uso

Para iniciar el servidor:

npm run start-mcp

Estructura del Proyecto

  • start-mcp.js: Script principal que inicia el túnel SSH y el servidor MCP
  • mcp-config.env: Archivo de configuración (no incluido en el repositorio)
  • package.json: Definición de dependencias y scripts

Notas Importantes

  • No modifiques las versiones de las dependencias en package.json para mantener la compatibilidad
  • Asegúrate de tener acceso SSH configurado correctamente
  • No compartas tu archivo mcp-config.env
  • Por defecto, solo las operaciones SELECT están habilitadas. Modifica los permisos según tus necesidades
  • El túnel SSH es necesario para conexiones a bases de datos remotas. Si estás usando una base de datos local, puedes dejar la configuración SSH vacía

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP MySQL Server with SSH tunnel from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-mysql-carlosfpc)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage