Tokenlite Mysql MCP
A secure, efficient, and intelligent MySQL server for the Model Context Protocol
- Pricing
- Open source
- Runs
- Locally
- Version
- 4.1.0
- Listing updated
- 4 days ago
About Tokenlite Mysql MCP
Tokenlite Mysql MCP is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add tokenlite-mysql-mcp --env DB_PASSWORD='<DB_PASSWORD>' --env DB_NAME='<DB_NAME>' -- npx -y @andezdev/tokenlite-mysql-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"tokenlite-mysql-mcp": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<DB_PASSWORD>",
"DB_NAME": "<DB_NAME>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"tokenlite-mysql-mcp": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<DB_PASSWORD>",
"DB_NAME": "<DB_NAME>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"tokenlite-mysql-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<DB_PASSWORD>",
"DB_NAME": "<DB_NAME>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"tokenlite-mysql-mcp": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<DB_PASSWORD>",
"DB_NAME": "<DB_NAME>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"tokenlite-mysql-mcp": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<DB_PASSWORD>",
"DB_NAME": "<DB_NAME>"
}
}
}
}Configuration
DB_HOSTMySQL Host address (defaults to localhost)DB_PORTMySQL Port (defaults to 3306)DB_USERMySQL Username (defaults to root)DB_PASSWORDMySQL Password (defaults to empty string)DB_NAMEMySQL Database nameRequiredMCP_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_ROWSMCP_SAFE_QUERY_ENABLE_BLOCKINGEnable or disable the EXPLAIN guardrail (defaults to true)MCP_METADATA_PATHAbsolute path to your custom metadata.json dictionaryMCP_TEMPLATES_PATHAbsolute path to your custom templates.json pre-approved queriesTOOL_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, emergencyALLOW_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)
Pricing
Open source
Tokenlite Mysql MCP FAQ
Is Tokenlite Mysql MCP free?
Yes. Tokenlite Mysql MCP is open source, so you can use and self-host it for free.
How do I add Tokenlite Mysql MCP to Claude Code?
Run this command in your terminal: claude mcp add tokenlite-mysql-mcp --env DB_PASSWORD='<DB_PASSWORD>' --env DB_NAME='<DB_NAME>' -- npx -y @andezdev/tokenlite-mysql-mcp
What are the best alternatives to Tokenlite Mysql MCP?
The closest alternatives to Tokenlite Mysql MCP are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.
Alternatives to Tokenlite Mysql MCP

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

PlatypusDB
MCP serverGives MCP clients access to your PlatypusDB database connections, scoped per agent
Runs locally- Open source
- Databases

Lorebase
MCP serverLets agents read and change a governed, versioned Postgres knowledge graph
Runs locally- Open source
- Knowledge and memory
Sovaria
MCP serverManage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant
Not checked yet- 4 tools
- Remote
- Freemium
- Databases

model2data studio
MCP serverGenerate realistic connected test data, dbt projects and dashboards from a schema
- Remote
- Freemium
- Databases

semlayer
MCP serverInfers a semantic layer from your data warehouse and serves it to agents
Runs locally- Free
- Databases