Server data from the Official MCP Registry
Read-only MySQL MCP server with multi-connection profiles and safe SELECT queries.
About
Read-only MySQL MCP server with multi-connection profiles and safe SELECT queries.
Security Report
This is a legitimate MySQL MCP server with no exfiltration, obfuscation, or hardcoded secrets, and its permissions (profile file read, env vars, DB network access) match its stated purpose. The main concern is that the advertised read-only design is enforced only by convention: execute_sql passes any statement to the database and commits writes, so safety depends on the user configuring a read-only account. The LIMIT requirement is likewise only a model instruction and is not enforced by the server. Supply chain analysis found 2 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue.
6 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
What You'll Need
Set these up before or after installing:
Environment variable: MCP_DB_PROFILES_FILE
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"jj-mcp-mysql": {
"command": "uvx",
"args": [
"jj-mcp-mysql==0.1.0"
],
"env": {
"MCP_DB_PROFILES_FILE": "your-mcp-db-profiles-file-here"
}
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
mcp-mysql
A small, dependency-light Model Context Protocol server that gives MCP clients (Trae, Cursor, Claude Desktop, ...) read-only access to one or more MySQL databases through a single db_profiles.json file.
- Multiple connections in one server (production / test / reporting ...), each with its own credentials
- Per-database notes and usage rules returned to the model before it writes SQL
- Two tools only:
list_connectionsandexecute_sql - Any SQL client can be used, but the server is designed for read-only accounts
Install
pipx install jj-mcp-mysql
# or
pip install jj-mcp-mysql
The distribution is named jj-mcp-mysql; the installed command is mcp-mysql.
Configure
Copy the sample profile file and fill in your connections:
cp db_profiles.sample db_profiles.json
{
"default_connection": "my_conn",
"connections": {
"my_conn": {
"description": "Test database",
"usage": "Read-only account. Only SELECT is allowed.",
"host": "127.0.0.1",
"port": 3306,
"user": "readonly",
"password": "change-me",
"charset": "utf8mb4",
"databases": ["your_database"],
"default_database": "your_database"
}
}
}
Keys starting with _ are treated as samples and are skipped.
Run
export MCP_DB_PROFILES_FILE=/absolute/path/to/db_profiles.json
mcp-mysql
If MCP_DB_PROFILES_FILE is not set, the server looks for db_profiles.json in the current working directory.
MCP client configuration
{
"mcpServers": {
"mcp-mysql": {
"command": "mcp-mysql",
"env": {
"MCP_DB_PROFILES_FILE": "/absolute/path/to/db_profiles.json"
}
}
}
}
Tools
| Tool | Purpose |
|---|---|
list_connections | List connections, their usage notes and available databases |
execute_sql | Run SQL on a chosen connection and database; omit connection / database to use the defaults |
The server injects usage notes into the MCP instructions, so the model knows which connection and database to pick. SELECT statements are expected to carry an explicit LIMIT (100 rows by default in prompts).
Security notes
- Use a read-only MySQL account; the server does not block writes on its own.
db_profiles.jsoncontains credentials and is git-ignored. Never commit it.- Prefer environment variables or a file outside the repository for production credentials.
Development
python -m venv .venv
.venv/Scripts/pip install -e .
python -m mcp_mysql
Release
python -m build
twine upload dist/*
mcp-publisher validate
mcp-publisher publish
mcp-publisher publishes server.json to the official MCP Registry. Update name, repository and version fields before publishing.
Reviews
No reviews yet
Be the first to review this server!
More Data & Analytics MCP Servers
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
mcp-creator-python
Freeby mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Lharries · Communication
Read, search, and send WhatsApp messages through your AI assistant
FinAgent
Freeby mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.
Memory
Freeby Modelcontextprotocol · Productivity
Knowledge graph-based persistent memory across sessions
