Skip to main content
Glama
Secure MySQL MCP Server

Secure MySQL MCP Server

by Kavi-200312

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_SSLNotrue, false, or auto (auto-enables SSL for port 25060 or cloud hosts).auto
DB_HOSTNoMySQL server host (or localhost if using SSH tunnel).127.0.0.1
DB_NAMENoTarget development database name.
DB_PORTNoMySQL port (e.g. 25060 for DigitalOcean, 3306 standard).3306
SSH_HOSTNoRemote SSH IP or hostname.
SSH_PORTNoRemote SSH port.22
SSH_USERNoRemote SSH username.
LOG_LEVELNoStructured logging level (info, debug, warn).info
DB_MAX_ROWSNoMax rows returned per query to prevent memory bloat.500
POLICY_MODENostrict (Prompt everything), prompt (Permissive with prompts), or autonomous (AI executes allowed ops with zero prompts).strict
SSH_ENABLEDNoSet to true to tunnel connections through a remote VPS/Droplet.false
SSH_KEY_PATHNoPath to private key (e.g. ~/.ssh/id_ed25519).
DB_READER_USERNoLeast-privilege user for read tools.ai_agent_reader
DB_WRITER_USERNoDedicated user for write tools.ai_agent_writer
SSH_LOCAL_PORTNoLocal forwarding port.13306
POLICY_ALLOW_DDLNoEnable CREATE, ALTER, DROP, TRUNCATE.false
DB_READER_PASSWORDNoPassword for reader user.
DB_WRITER_PASSWORDNoPassword for writer user.
DB_QUERY_TIMEOUT_MSNoQuery execution timeout (15s).15000
POLICY_ALLOW_DELETENoEnable DELETE statements (still requires WHERE).false
DB_MAX_PAYLOAD_BYTESNoPayload size cap (512 KB).524288
POLICY_REQUIRE_WHERENoEnforce mandatory WHERE clause on UPDATE and DELETE.true
APPROVAL_EXPIRY_SECONDSNoLifetime of write approval tokens (5 min).300
POLICY_AUTO_APPROVE_DDLNoAuto-execute DDL (CREATE, ALTER) without asking user confirmation.false
POLICY_AUTO_APPROVE_DELETENoAuto-execute DELETE without asking user confirmation.false
POLICY_AUTO_APPROVE_INSERTNoAuto-execute INSERT without asking user confirmation.false
POLICY_AUTO_APPROVE_UPDATENoAuto-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

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 10 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues