Tokenlite Mysql Mcp
by github.com/andezdev · v5.0.0 · updated Nov 20, 2026
A secure, efficient, and intelligent MySQL server for the Model Context Protocol
Run it locally
Install the package and point your AI client at it.
npm
npx -y @andezdev/[email protected]Environment variables
DB_HOSTMySQL Host address (defaults to localhost)
DB_PORTMySQL Port (defaults to 3306)
DB_USERMySQL Username (defaults to root)
DB_PASSWORDsecretMySQL Password (defaults to empty string)
DB_NAMErequiredMySQL Database name
MCP_EXPLAIN_MAX_SCAN_ROWSEXPLAIN guardrail: max estimated rows for unindexed full table scans before blocking (defaults to 1000). MCP_SAFE_QUERY_MAX_ROWS is a deprecated alias.
MCP_QUERY_ROW_LIMITMax rows returned per SELECT; injected as LIMIT at the AST level (defaults to 500)
MCP_SAFE_QUERY_MAX_ROWSDeprecated alias for MCP_EXPLAIN_MAX_SCAN_ROWS
MCP_SAFE_QUERY_ENABLE_BLOCKINGEnable or disable the EXPLAIN guardrail (defaults to true)
MCP_METADATA_PATHAbsolute path to your custom metadata.json dictionary
MCP_TEMPLATES_PATHAbsolute path to your custom templates.json pre-approved queries
TOOL_PREFIXPrefix for tool names, e.g., to run multiple instances (defaults to DB_NAME, e.g. mydb_). Only set to override.
MCP_RATE_LIMIT_RPMMax tool invocations per minute, sliding window (defaults to 60). Set to 0 to disable.
MYSQL_QUERY_TIMEOUTMax execution time for a query in milliseconds to protect against DoS (defaults to 15000)
MYSQL_CONNECTION_LIMITMax concurrent pool connections (defaults to 10)
MYSQL_CONNECT_TIMEOUTMax time to wait for a connection socket to establish in milliseconds (defaults to 10000)
MYSQL_RETRY_ATTEMPTSMax retries on transient connection errors (defaults to 3)
MYSQL_RETRY_DELAY_MSBase delay in milliseconds for exponential backoff between retries (defaults to 1000)
MYSQL_QUEUE_LIMITMax queued requests when all pool connections are busy to prevent memory leak (defaults to 50)
MCP_DDL_CACHE_TTLTime-to-live in seconds for cached DDL statements (defaults to 60)
MCP_LOG_LEVELMinimum severity level for MCP log notifications (defaults to info). Levels: debug, info, notice, warning, error, critical, alert, emergency
ALLOW_INSERT_OPERATIONEnable INSERT and REPLACE queries (defaults to false)
ALLOW_UPDATE_OPERATIONEnable UPDATE queries (defaults to false)
ALLOW_DELETE_OPERATIONEnable DELETE and TRUNCATE queries (defaults to false)
ALLOW_DDL_OPERATIONEnable Data Definition Language queries like CREATE, ALTER, DROP, RENAME (defaults to false)
DB_SSLEnable TLS for the MySQL connection (defaults to false)
DB_SSL_REJECT_UNAUTHORIZEDReject self-signed or untrusted TLS certificates when DB_SSL is true (defaults to true)
More MCP servers
ImgEdify: AI Image Editor, AI Image Generator, AI Video Generator, AI Video Editor & AI Video Maker
github.com/andida
Generate and edit images, create videos, quote credit costs, and retrieve private results.
Vulnicheck
github.com/andrasfe
HTTP MCP Server for comprehensive Python vulnerability scanning and security analysis.
Mcp Documentation Server
github.com/andrea9293
Local-first document management and semantic search for AI coding agents
Anomalia
github.com/andreabuttarelli
AI social autopilot: plan, write, design and publish posts, blog/SEO, news radar and leads.
Google Flights
github.com/andreacappelletti97
MCP server for Google Flights: search, price tracking, cabin comparison, emissions, and more.
Openhive Mcp
github.com/andreas-roennestad
Search and contribute to a shared knowledge base of AI-discovered problem-solution pairs.