Skip to main content

Tokenlite Mysql MCP

io.github.andezdev/tokenlite-mysql-mcp

v5.0.0Updated Nov 20, 2026stdio · npm

A secure, efficient, and intelligent MySQL server for the Model Context Protocol

Install

Replace 1 placeholder with your own values.

Run in your terminal. Replace 1 placeholder.

claude mcp add tokenlite-mysql-mcp -e 'DB_NAME=<your-db-name>' -- npx -y @andezdev/[email protected]

Configuration

27 settings.

  • DB_NAME
    Env var· required
    MySQL Database name
  • DB_PASSWORD
    Env var· optional· secret
    MySQL Password (defaults to empty string)
  • DB_HOST
    Env var· optional
    MySQL Host address (defaults to localhost)
  • DB_PORT
    Env var· optional
    MySQL Port (defaults to 3306)
  • DB_USER
    Env var· optional
    MySQL Username (defaults to root)
  • MCP_EXPLAIN_MAX_SCAN_ROWS
    Env var· optional
    EXPLAIN guardrail: max estimated rows for unindexed full table scans before blocking (defaults to 1000). MCP_SAFE_QUERY_MAX_ROWS is a deprecated alias.
Show 21 more
  • MCP_QUERY_ROW_LIMIT
    Env var· optional
    Max rows returned per SELECT; injected as LIMIT at the AST level (defaults to 500)
  • MCP_SAFE_QUERY_MAX_ROWS
    Env var· optional
    Deprecated alias for MCP_EXPLAIN_MAX_SCAN_ROWS
  • MCP_SAFE_QUERY_ENABLE_BLOCKING
    Env var· optional
    Enable or disable the EXPLAIN guardrail (defaults to true)
  • MCP_METADATA_PATH
    Env var· optional
    Absolute path to your custom metadata.json dictionary
  • MCP_TEMPLATES_PATH
    Env var· optional
    Absolute path to your custom templates.json pre-approved queries
  • TOOL_PREFIX
    Env var· optional
    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
    Env var· optional
    Max tool invocations per minute, sliding window (defaults to 60). Set to 0 to disable.
  • MYSQL_QUERY_TIMEOUT
    Env var· optional
    Max execution time for a query in milliseconds to protect against DoS (defaults to 15000)
  • MYSQL_CONNECTION_LIMIT
    Env var· optional
    Max concurrent pool connections (defaults to 10)
  • MYSQL_CONNECT_TIMEOUT
    Env var· optional
    Max time to wait for a connection socket to establish in milliseconds (defaults to 10000)
  • MYSQL_RETRY_ATTEMPTS
    Env var· optional
    Max retries on transient connection errors (defaults to 3)
  • MYSQL_RETRY_DELAY_MS
    Env var· optional
    Base delay in milliseconds for exponential backoff between retries (defaults to 1000)
  • MYSQL_QUEUE_LIMIT
    Env var· optional
    Max queued requests when all pool connections are busy to prevent memory leak (defaults to 50)
  • MCP_DDL_CACHE_TTL
    Env var· optional
    Time-to-live in seconds for cached DDL statements (defaults to 60)
  • MCP_LOG_LEVEL
    Env var· optional
    Minimum severity level for MCP log notifications (defaults to info). Levels: debug, info, notice, warning, error, critical, alert, emergency
  • ALLOW_INSERT_OPERATION
    Env var· optional
    Enable INSERT and REPLACE queries (defaults to false)
  • ALLOW_UPDATE_OPERATION
    Env var· optional
    Enable UPDATE queries (defaults to false)
  • ALLOW_DELETE_OPERATION
    Env var· optional
    Enable DELETE and TRUNCATE queries (defaults to false)
  • ALLOW_DDL_OPERATION
    Env var· optional
    Enable Data Definition Language queries like CREATE, ALTER, DROP, RENAME (defaults to false)
  • DB_SSL
    Env var· optional
    Enable TLS for the MySQL connection (defaults to false)
  • DB_SSL_REJECT_UNAUTHORIZED
    Env var· optional
    Reject self-signed or untrusted TLS certificates when DB_SSL is true (defaults to true)

Listed in the official MCP Registry since Nov 20, 2026. Mirrored daily; last checked Nov 26, 2026.