JoyfulSQL_MCP
A Model Context Protocol (MCP) server that allows AI assistants like Cascade to interact with both local and remote MySQL databases.
The MySQL MCP Server is designed to facilitate seamless interaction between AI assistants and MySQL databases, both local and remote. It supports secure connections through SSH tunneling, allowing for both read-only and read-write operations. The server can automatically detect and list available databases, providing an interactive workflow that prompts users to select a database before executing queries. This ensures that queries are executed with the correct context, enhancing both security and usability. The server is particularly useful for development environments where secure and efficient database access is required.
Features
- Connect to local MySQL databases
- Connect to remote MySQL databases via SSH tunneling (ODI)
- Execute read-only or read-write queries (configurable)
- Secure access through SSH tunneling for remote databases
- Automatic database detection and listing when no database is specified
MCP Tools
- {'local_mysql_query': 'Execute queries on your local MySQL database'}
- {'odi_mysql_query': 'Execute queries on remote MySQL databases via SSH tunnel'}
Usage with Different Platforms
Using with Cascade
{
"mcpServers": {
"mysql": {
"command": "node",
"args": [
"/path/to/your/server/build/index.js",
"--env-file",
"/path/to/your/env"
]
},
}
}
Running Locally
bash
node build/index.js
ENV
LOCAL_HOST=[host]
LOCAL_USER=[user]
LOCAL_PASSWORD=[password]
LOCAL_PORT=[port]
ODI_SSH_KEY=[path/to/ssh/key]
ODI_USER=[user]
ODI_PASSWORD=[password]
ODI_HOST=[host]
ODI_PORT=[port]
ODI_SSH_PORT=[ssh_tunnel_port]
WRITE_ACCESS=[bool]
Related MCP Servers
View all databases servers →mindsdb
by mindsdb
MindsDB is an open-source server that enables seamless interaction with large-scale federated data using the Model Context Protocol (MCP).
prisma
by prisma
Prisma is a next-generation ORM for Node.js and TypeScript, providing tools for data modeling, migrations, and querying databases.
supabase-mcp
by supabase-community
Connect your Supabase projects to AI assistants using the Model Context Protocol (MCP) server.
postgres-mcp
by crystaldba
Postgres MCP Pro is an open-source Model Context Protocol server designed to enhance database performance and management through advanced tools and features.
mariadb-mcp-server
by rjsalgado
This MCP server provides access to MariaDB / MySQL databases, allowing users to list databases, tables, describe table schemas, and execute SQL queries with security features.
genai-toolbox
by googleapis
MCP Toolbox for Databases is an open source MCP server for databases, designed to simplify and secure the development of database tools.
azure-mcp
by Azure
The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and Azure services.