MySQL DatabaseSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://smithery.ai/server/@enemyrr/mcp-mysql-server)
A Model Context Protocol server that provides MySQL database operations. This server enables AI models to interact with MySQL databases through a standardized interface.
Installation & Setup for Cursor IDE
Installing via Smithery
To install MySQL Database Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @enemyrr/mcp-mysql-server --client claude
Installing Manually
- Clone and build the project:
git clone https://github.com/enemyrr/mcp-mysql-server.git cd mcp-mysql-server npm install npm run build
- Add the server in Cursor IDE settings:
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Search for "MCP: Add Server"
- Fill in the fields:
- Name:
mysql - Type:
command - Command:
node /absolute/path/to/mcp-mysql-server/build/index.js
Note: Replace /absolute/path/to/ with the actual path where you cloned and built the project.Database Configuration
You can configure the database connection in three ways:
- Database URL in .env (Recommended):
DATABASE_URL=mysql://user:password@host:3306/database
- Individual Parameters in .env:
DB_HOST=localhost DB_USER=your_user DB_PASSWORD=your_password DB_DATABASE=your_database
- Direct Connection via Tool:
use_mcp_tool({
server_name: "mysql",
tool_name: "connect_db",
arguments: {
url: "mysql://user:password@host:3306/database"
// OR
workspace: "/path/to/your/project" // Will use project's .env
// OR
host: "localhost",
user: "your_user",
password: "youf0069876262aOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-mysql-server -- npx -y [email protected]
{
"mcpServers": {
"mcp-mysql-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (24)
13 read · 7 write · 4 destructive. Blast radius: 4 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_column | write | Add a new column to an existing table |
alter_column | write | Modify an existing column (type, nullable, default, or rename) |
columns | read | Comma-separated list of columns (default: all) |
connect_db | read | Connect to a MySQL database using URL, workspace config, or direct parameters |
create_table | write | Create a new table with specified columns and indexes |
describe_table | read | Get detailed structure of a table including columns, types, and constraints |
drop_column | destructive | Remove a column from a table |
drop_table | destructive | Delete a table (requires confirmation) |
execute | destructive | Execute an INSERT, UPDATE, or DELETE query |
explain-schema | read | Get a natural language explanation of a table structure |
generate-insert | write | Generate an INSERT statement template for a table |
generate-select | read | Generate a SELECT query for a table with optional filters |
generate-update | write | Generate an UPDATE statement template for a table |
get_foreign_keys | read | List all foreign key relationships for a table |
get_indexes | read | List all indexes on a table |
limit | read | Maximum number of rows to return |
list_databases | read | List all accessible databases on the server |
list_tables | read | List all tables in the connected database |
orderBy | write | ORDER BY column(s) |
query | write | Execute a SELECT query and return results |
suggest-indexes | read | Analyze a table and suggest potential indexes for optimization |
table | read | The table name to query |
truncate_table | destructive | Remove all rows from a table (requires confirmation) |
where | read | WHERE clause conditions (e.g., |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
drop_column, drop_table, execute, truncate_table
@modelcontextprotocol/sdk, dotenv, mysql2, zod, @types/node, typescript
Gates applied: no_behavioural_pass.
f0069876262afull audit observations/trust-audit/mcp-server/enemyrr__mysql-database.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | f0069876262a | SAFE | B | 89 | first audit |
Questions
What tools does MySQL Database expose?
24 in total: 13 read-only, 7 that write, and 4 that can delete or overwrite (drop_column, drop_table, execute, truncate_table). Every one is listed on this page with its risk.
Is MySQL Database safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 4 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does MySQL Database need?
No credential environment variables were found in its source, so it appears to need none.
How does MySQL Database run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-mysql-server at 0.2.0.
How current is this page?
The grade is for one exact copy of the source (f0069876262a), read on 2026-10-08. The repository is watched and re-audited when it changes.