Skip to main content
Glama
andezdev

tokenlite-mysql-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_HOSTNoMySQL Host addresslocalhost
DB_NAMEYesMySQL Database name (required)
DB_PORTNoMySQL Port3306
DB_USERNoMySQL Usernameroot
DB_PASSWORDNoMySQL Password
TOOL_PREFIXNoPrefix for tool names
MCP_LOG_LEVELNoMinimum severity for MCP log notificationsinfo
MCP_DDL_CACHE_TTLNoTime-to-live (in seconds) for cached DDL statements60
MCP_METADATA_PATHNoAbsolute path to your custom metadata.json dictionary
MYSQL_QUEUE_LIMITNoMax queued requests when all pool connections are busy50
MCP_TEMPLATES_PATHNoAbsolute path to your custom templates.json queries
ALLOW_DDL_OPERATIONNoEnable Data Definition Language (CREATE, ALTER, DROP, RENAME)false
MYSQL_QUERY_TIMEOUTNoMax execution time for a query (in ms)15000
MYSQL_RETRY_ATTEMPTSNoMax retries on transient connection errors3
MYSQL_RETRY_DELAY_MSNoBase delay (ms) for exponential backoff between retries1000
MYSQL_CONNECT_TIMEOUTNoMax time to wait for a socket to establish (in ms)10000
ALLOW_DELETE_OPERATIONNoEnable DELETE and TRUNCATE queriesfalse
ALLOW_INSERT_OPERATIONNoEnable INSERT and REPLACE queriesfalse
ALLOW_UPDATE_OPERATIONNoEnable UPDATE queriesfalse
MYSQL_CONNECTION_LIMITNoMax concurrent pool connections10
MCP_SAFE_QUERY_MAX_ROWSNoThreshold for EXPLAIN to block unindexed Full Table Scans1000
MCP_SAFE_QUERY_ENABLE_BLOCKINGNoEnable or disable the EXPLAIN guardrailtrue

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": true,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
mydatabase_search_schemaA

CRITICAL TOOL FOR SCHEMA EXPLORATION: Use this tool FIRST to understand the database structure. Searches for a table and returns its exact SQL DDL, along with the DDL of its direct parent and child tables (Auto-Join Context). Do NOT use execute_safe_query for schema exploration.

mydatabase_execute_safe_queryA

Executes a safe SELECT query on the database. Large results are automatically truncated. CRITICAL: NEVER use this tool (e.g., SHOW TABLES or querying information_schema) to understand the database structure. You MUST ALWAYS use the 'search_schema' tool first to understand the relationships and tables before writing any JOIN queries.

mydatabase_refresh_schemaA

Forces the MCP server to rebuild the internal Schema Graph. Use this if you suspect a DBA recently added a table, column, or foreign key and the search_schema or execute queries are failing.

mydatabase_pingA

Health check: verifies the database connection is alive and returns pool stats and server version.

mydatabase_explain_queryA

Returns the MySQL EXPLAIN output for a SELECT query. Use this to understand index usage, join types, and row estimates before rewriting a blocked or slow query.

Prompts

Interactive templates invoked by user choice

NameDescription
mydatabase_query_templatesOfficial company SQL templates for business metrics. Use this as a starting point to avoid writing SQL from scratch.

Resources

Contextual data attached and managed by the client

NameDescription
schemaLists all available tables in the database schema

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andezdev/tokenlite-mysql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server