Server data from the Official MCP Registry
MCP server exposing MySQL database functionalities as tools
MCP server exposing MySQL database functionalities as tools
Valid MCP server (1 strong, 2 medium validity signals). 11 known CVEs in dependencies (2 critical, 6 high severity) Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
5 files analyzed · 12 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Unverified package source
We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-daedalus-mcp-mysql-connector": {
"args": [
"mcp-mysql-connector"
],
"command": "uvx"
}
}
}From the project's GitHub README.
MCP server exposing MySQL database functionalities as tools for LLM agents.
mcp-name: io.github.daedalus/mcp-mysql-connector
mcp-mysql-connector is a Model Context Protocol (MCP) server that provides MySQL database operations as tools for LLM agents. It allows AI assistants to interact with MySQL databases through a standardized protocol, enabling:
pip install mcp-mysql-connector
# Run with stdio transport (default)
mcp-mysql-connector
# Or run programmatically
python -c "from mcp_mysql import mcp; mcp.run()"
Connect to MySQL using the connect tool:
{
"host": "localhost",
"port": 3306,
"user": "root",
"password": "your_password",
"database": "your_database"
}
| Tool | Description |
|---|---|
connect | Connect to a MySQL database |
disconnect | Disconnect from MySQL |
is_connected | Check connection status |
commit | Commit current transaction |
rollback | Rollback current transaction |
| Tool | Description |
|---|---|
execute_query | Execute raw SQL query and return results |
| Tool | Description |
|---|---|
list_databases | List all databases on server |
create_database | Create a new database |
drop_database | Drop a database |
database_exists | Check if database exists |
| Tool | Description |
|---|---|
list_tables | List tables in a database |
describe_table | Get table schema |
create_table | Create a new table |
drop_table | Drop a table |
table_exists | Check if table exists |
| Tool | Description |
|---|---|
show_columns | Show column details |
show_indexes | Show index details |
create_index | Create an index |
drop_index | Drop an index |
| Tool | Description |
|---|---|
create_user | Create a MySQL user |
drop_user | Drop a MySQL user |
grant_privileges | Grant privileges to user |
revoke_privileges | Revoke privileges from user |
show_privileges | Show user privileges |
| Tool | Description |
|---|---|
server_status | Get MySQL server status |
The server provides dynamic resources for database and table metadata:
database://{name} - Database metadata including table listtable://{db}/{table} - Table metadata including schema, columns, and indexes# First, connect to database
connect(host="localhost", user="root", password="secret", database="mydb")
# Execute a query
execute_query(sql="SELECT * FROM users WHERE active = true")
# List all tables
list_tables(database="mydb")
# Create a database
create_database(name="newapp")
# Create a table
create_table(name="users", schema="id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), email VARCHAR(255) UNIQUE")
# Create a new user with password
create_user(username="app_user", host="localhost", password="secure_password")
# Grant privileges
grant_privileges(privileges="SELECT,INSERT,UPDATE,DELETE", on="newapp.*", username="app_user", host="localhost")
# Start transaction
execute_query(sql="BEGIN")
# Execute operations
execute_query(sql="INSERT INTO accounts (balance) VALUES (100)")
# Commit or rollback
commit() # or rollback()
The server supports configuration via environment variables:
export MYSQL_HOST=localhost
export MYSQL_PORT=3306
export MYSQL_USER=root
export MYSQL_PASSWORD=secret
export MYSQL_DATABASE=mydb
# Clone repository
git clone https://github.com/daedalus/mcp-mysql-connector.git
cd mcp-mysql-connector
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -e ".[test]"
# Run tests
pytest
# Format code
ruff format src/ tests/
# Lint
ruff check src/ tests/
# Type check
mypy src/
mcp-mysql-connector/
├── src/mcp_mysql/
│ ├── core/models.py # Data models (QueryResult, TableSchema, etc.)
│ ├── adapters/mysql.py # MySQL connection & pooling
│ ├── services/connection.py # Connection manager
│ ├── tools/mysql_tools.py # MCP tool implementations
│ └── mcp.py # FastMCP server setup
└── tests/ # Test suite
MIT License - see LICENSE for details.
Be the first to review this server!
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.
by Taylorwilsdon · Productivity
Control Gmail, Calendar, Docs, Sheets, Drive, and more from your AI