tokenlite-mysql-mcp

v5.0.0
io.github.andezdev/tokenlite-mysql-mcp Checked 2 days ago Published 13 days ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mcpkg_smoke_placeholder_search_schema

CRITICAL TOOL FOR SCHEMA EXPLORATION: Use this FIRST before writing queries. Fuzzy-searches a table name and returns its DDL plus direct parent/child table DDLs (Auto-Join Context), inferred FK hints, and semantic dictionary entries from metadata.json when configured. If templates.json is loaded, reminds you to use the 'query_templates' prompt for business metrics. Do NOT use execute_safe_query for schema exploration.

ParameterTypeDescription
query *stringThe name of the table or entity to search for (e.g. 'users', 'invoices').

mcpkg_smoke_placeholder_execute_safe_query

Executes SQL against the database with AST validation. SELECT results are capped by MCP_QUERY_ROW_LIMIT (default 500, AST-injected LIMIT) and include a '-- rows: N (truncated at LIMIT X)' footer when the cap is reached. Unindexed full table scans above MCP_EXPLAIN_MAX_SCAN_ROWS are blocked before execution. Only the configured schema is reachable: SHOW statements, information_schema/mysql/performance_schema/sys, other schemas, server variables, SELECT ... INTO and functions such as LOAD_FILE or SLEEP are rejected by the server. To explore the schema use 'search_schema'.

ParameterTypeDescription
sql *stringSQL SELECT statement to execute.

mcpkg_smoke_placeholder_refresh_schema

Rebuilds the internal Schema Graph from the live database and notifies subscribed MCP resources. Use when search_schema or execute_safe_query fail with missing table/column errors after a schema change.

mcpkg_smoke_placeholder_ping

Health check: verifies the database connection is alive. Returns JSON with status, MySQL server version, and connection pool stats (active, idle, queued).

mcpkg_smoke_placeholder_explain_query

Returns MySQL EXPLAIN output as CSV for a validated SELECT query. SQL is AST-validated and timeout-protected; ANALYZE and non-SELECT statements are blocked. Unlike execute_safe_query, this does NOT block full table scans — use it to diagnose why a query was blocked or to verify index usage before executing.

ParameterTypeDescription
sql *stringThe SELECT query to analyze.