Secure MySQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_SSL | No | true, false, or auto (auto-enables SSL for port 25060 or cloud hosts). | auto |
| DB_HOST | No | MySQL server host (or localhost if using SSH tunnel). | 127.0.0.1 |
| DB_NAME | No | Target development database name. | |
| DB_PORT | No | MySQL port (e.g. 25060 for DigitalOcean, 3306 standard). | 3306 |
| SSH_HOST | No | Remote SSH IP or hostname. | |
| SSH_PORT | No | Remote SSH port. | 22 |
| SSH_USER | No | Remote SSH username. | |
| LOG_LEVEL | No | Structured logging level (info, debug, warn). | info |
| DB_MAX_ROWS | No | Max rows returned per query to prevent memory bloat. | 500 |
| POLICY_MODE | No | strict (Prompt everything), prompt (Permissive with prompts), or autonomous (AI executes allowed ops with zero prompts). | strict |
| SSH_ENABLED | No | Set to true to tunnel connections through a remote VPS/Droplet. | false |
| SSH_KEY_PATH | No | Path to private key (e.g. ~/.ssh/id_ed25519). | |
| DB_READER_USER | No | Least-privilege user for read tools. | ai_agent_reader |
| DB_WRITER_USER | No | Dedicated user for write tools. | ai_agent_writer |
| SSH_LOCAL_PORT | No | Local forwarding port. | 13306 |
| POLICY_ALLOW_DDL | No | Enable CREATE, ALTER, DROP, TRUNCATE. | false |
| DB_READER_PASSWORD | No | Password for reader user. | |
| DB_WRITER_PASSWORD | No | Password for writer user. | |
| DB_QUERY_TIMEOUT_MS | No | Query execution timeout (15s). | 15000 |
| POLICY_ALLOW_DELETE | No | Enable DELETE statements (still requires WHERE). | false |
| DB_MAX_PAYLOAD_BYTES | No | Payload size cap (512 KB). | 524288 |
| POLICY_REQUIRE_WHERE | No | Enforce mandatory WHERE clause on UPDATE and DELETE. | true |
| APPROVAL_EXPIRY_SECONDS | No | Lifetime of write approval tokens (5 min). | 300 |
| POLICY_AUTO_APPROVE_DDL | No | Auto-execute DDL (CREATE, ALTER) without asking user confirmation. | false |
| POLICY_AUTO_APPROVE_DELETE | No | Auto-execute DELETE without asking user confirmation. | false |
| POLICY_AUTO_APPROVE_INSERT | No | Auto-execute INSERT without asking user confirmation. | false |
| POLICY_AUTO_APPROVE_UPDATE | No | Auto-execute UPDATE without asking user confirmation. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List accessible databases on the remote MySQL instance. |
| list_tablesA | List all tables and views in the development database. |
| describe_tableB | Get column details, data types, keys, and nullability for a table. |
| read_queryA | Execute a read-only SELECT query against the development database. AST-enforced, single statement only. Max 500 rows. |
| explain_queryC | Get MySQL query execution plan (EXPLAIN) for a SELECT statement. |
| get_table_relationshipsC | Inspect foreign key relationships and table constraints. |
| get_database_overviewB | Get high-level summary of tables, estimated row counts, storage size, and collation. |
| propose_writeA | Propose an INSERT, UPDATE, DELETE, or DDL statement. Validates SQL AST, shows preview diff of affected rows, and generates an approval token. NEVER executes immediately. |
| write_queryA | Execute a write statement (INSERT, UPDATE, DELETE, or DDL). If the operation is configured for auto-approval in policy, it executes immediately in an atomic transaction; otherwise, it returns a pending approval request. |
| execute_approved_writeA | Execute a previously proposed and user-approved write operation using its short-lived approval token. Strictly requires userConfirmed: true. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Discovery tools (list_databases, list_tables, describe_table, get_database_overview, get_table_relationships) each target a distinct metadata scope, and read_query vs explain_query are clearly separated. The only real friction is the write trio: propose_write and write_query overlap in that write_query may just return a pending approval instead of executing, which could make an agent unsure which to call first, though the descriptions do resolve it.
All ten tools use snake_case verb_noun form (list_databases, describe_table, read_query, propose_write, execute_approved_write) with no camelCase or style mixing. The pattern is predictable enough that an agent can infer naming for unseen operations.
Ten tools is well within the ideal band and each earns its place: introspection, read path, explain, relationships, overview, and a three-stage guarded write lifecycle. Nothing looks redundant padding or conspicuously absent.
The surface covers discovery, read-only querying, plan inspection, and a full propose/approve/execute write lifecycle with DDL support, which is strong for a database server. Minor gaps remain: no index listing, no cancellation/rollback or transaction-status tool, and no way to inspect or list pending approval requests, which an agent would likely want.