Tokenlite MySQL MCP Server
by andezdevio.github.andezdev/tokenlite-mysql-mcpv4.1.0
A secure, efficient, and intelligent MySQL server for the Model Context Protocol
context tax
queued
security
queued
cold start
queued
freshness
Slowing4mo ago
Install Tokenlite MySQL MCP server
Install in Claude Code
claude mcp add tokenlite-mysql -e DB_PASSWORD='<db-password>' -e DB_NAME='<db-name>' -- npx -y @andezdev/tokenlite-mysql-mcpInstall in Cursor
{
"mcpServers": {
"tokenlite-mysql": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<db-password>",
"DB_NAME": "<db-name>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"tokenlite-mysql": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<db-password>",
"DB_NAME": "<db-name>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"tokenlite-mysql": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<db-password>",
"DB_NAME": "<db-name>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"tokenlite-mysql": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_PASSWORD": "<db-password>",
"DB_NAME": "<db-name>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| DB_HOST | — | — | MySQL Host address (defaults to localhost) |
| DB_PORT | — | — | MySQL Port (defaults to 3306) |
| DB_USER | — | — | MySQL Username (defaults to root) |
| DB_PASSWORD | — | yes | MySQL Password (defaults to empty string) |
| DB_NAME | yes | — | MySQL Database name |
| MCP_EXPLAIN_MAX_SCAN_ROWS | — | — | EXPLAIN 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_LIMIT | — | — | Max rows returned per SELECT; injected as LIMIT at the AST level (defaults to 500) |
| MCP_SAFE_QUERY_MAX_ROWS | — | — | Deprecated alias for MCP_EXPLAIN_MAX_SCAN_ROWS |
| MCP_SAFE_QUERY_ENABLE_BLOCKING | — | — | Enable or disable the EXPLAIN guardrail (defaults to true) |
| MCP_METADATA_PATH | — | — | Absolute path to your custom metadata.json dictionary |
| MCP_TEMPLATES_PATH | — | — | Absolute path to your custom templates.json pre-approved queries |
| TOOL_PREFIX | — | — | Prefix for tool names, e.g., to run multiple instances (defaults to DB_NAME, e.g. mydb_). Only set to override. |
| MCP_RATE_LIMIT_RPM | — | — | Max tool invocations per minute, sliding window (defaults to 60). Set to 0 to disable. |
| MYSQL_QUERY_TIMEOUT | — | — | Max execution time for a query in milliseconds to protect against DoS (defaults to 15000) |
| MYSQL_CONNECTION_LIMIT | — | — | Max concurrent pool connections (defaults to 10) |
| MYSQL_CONNECT_TIMEOUT | — | — | Max time to wait for a connection socket to establish in milliseconds (defaults to 10000) |
| MYSQL_RETRY_ATTEMPTS | — | — | Max retries on transient connection errors (defaults to 3) |
| MYSQL_RETRY_DELAY_MS | — | — | Base delay in milliseconds for exponential backoff between retries (defaults to 1000) |
| MYSQL_QUEUE_LIMIT | — | — | Max queued requests when all pool connections are busy to prevent memory leak (defaults to 50) |
| MCP_DDL_CACHE_TTL | — | — | Time-to-live in seconds for cached DDL statements (defaults to 60) |
| MCP_LOG_LEVEL | — | — | Minimum severity level for MCP log notifications (defaults to info). Levels: debug, info, notice, warning, error, critical, alert, emergency |
| ALLOW_INSERT_OPERATION | — | — | Enable INSERT and REPLACE queries (defaults to false) |
| ALLOW_UPDATE_OPERATION | — | — | Enable UPDATE queries (defaults to false) |
| ALLOW_DELETE_OPERATION | — | — | Enable DELETE and TRUNCATE queries (defaults to false) |
| ALLOW_DDL_OPERATION | — | — | Enable Data Definition Language queries like CREATE, ALTER, DROP, RENAME (defaults to false) |
| DB_SSL | — | — | Enable TLS for the MySQL connection (defaults to false) |
| DB_SSL_REJECT_UNAUTHORIZED | — | — | Reject self-signed or untrusted TLS certificates when DB_SSL is true (defaults to true) |
Freshness
Slowing — last maintenance signal 4mo ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-06-07 · 4mo ago · GitHub
Latest release
2026-06-07 · 4mo ago · GitHub · tokenlite-mysql-mcp-v4.1.0
Package published
no data · npm/PyPI
Registry entry updated
2026-06-07 · 4mo ago · official registry · v4.1.0
FAQ
›How do I install the Tokenlite MySQL MCP server in Claude Code?
Run: claude mcp add tokenlite-mysql -e DB_PASSWORD='<db-password>' -e DB_NAME='<db-name>' -- npx -y @andezdev/tokenlite-mysql-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Tokenlite MySQL require an API key?
Yes. It expects DB_NAME, DB_PASSWORD, of which 1 is a secret.
›Can I use Tokenlite MySQL as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Tokenlite MySQL in the official MCP registry?
Yes, as io.github.andezdev/tokenlite-mysql-mcp.
Alternatives to Tokenlite MySQL
Other database MCP servers.