io.github.andezdev

tokenlite-mysql-mcp

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

stdiocommunityapplication

Package Details

Transportstdio

Environment Variables

DB_HOST(str)

MySQL Host address (defaults to localhost)

DB_PORT(str)

MySQL Port (defaults to 3306)

DB_USER(str)

MySQL Username (defaults to root)

DB_PASSWORD(str)
Secret

MySQL Password (defaults to empty string)

DB_NAME(str)
Required

MySQL Database name

MCP_SAFE_QUERY_MAX_ROWS(str)

Threshold for EXPLAIN to block unindexed Full Table Scans (defaults to 1000)

MCP_SAFE_QUERY_ENABLE_BLOCKING(str)

Enable or disable the EXPLAIN guardrail (defaults to true)

MCP_METADATA_PATH(str)

Absolute path to your custom metadata.json dictionary

MCP_TEMPLATES_PATH(str)

Absolute path to your custom templates.json pre-approved queries

TOOL_PREFIX(str)

Prefix for tool names, e.g., to run multiple instances (defaults to random prefix like db_a1b2_)

MYSQL_QUERY_TIMEOUT(str)

Max execution time for a query in milliseconds to protect against DoS (defaults to 15000)

MYSQL_CONNECTION_LIMIT(str)

Max concurrent pool connections (defaults to 10)

MYSQL_CONNECT_TIMEOUT(str)

Max time to wait for a connection socket to establish in milliseconds (defaults to 10000)

MYSQL_RETRY_ATTEMPTS(str)

Max retries on transient connection errors (defaults to 3)

MYSQL_RETRY_DELAY_MS(str)

Base delay in milliseconds for exponential backoff between retries (defaults to 1000)

MYSQL_QUEUE_LIMIT(str)

Max queued requests when all pool connections are busy to prevent memory leak (defaults to 50)

MCP_DDL_CACHE_TTL(str)

Time-to-live in seconds for cached DDL statements (defaults to 60)

MCP_LOG_LEVEL(str)

Minimum severity level for MCP log notifications (defaults to info). Levels: debug, info, notice, warning, error, critical, alert, emergency

ALLOW_INSERT_OPERATION(str)

Enable INSERT and REPLACE queries (defaults to false)

ALLOW_UPDATE_OPERATION(str)

Enable UPDATE queries (defaults to false)

ALLOW_DELETE_OPERATION(str)

Enable DELETE and TRUNCATE queries (defaults to false)

ALLOW_DDL_OPERATION(str)

Enable Data Definition Language queries like CREATE, ALTER, DROP, RENAME (defaults to false)