A secure, efficient, and intelligent MySQL server for the Model Context Protocol
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"tokenlite-mysql": {
"env": {
"DB_HOST": "localhost",
"DB_NAME": "your_database",
"DB_PORT": "3306",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_password",
"MCP_QUERY_ROW_LIMIT": "500",
"MCP_EXPLAIN_MAX_SCAN_ROWS": "1000",
"MCP_SAFE_QUERY_ENABLE_BLOCKING": "true"
},
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A robust and secure MySQL database server implemented under Anthropic's Model Context Protocol (MCP). Designed specifically to solve the shortcomings of current generic MCP servers through Graceful Degradation, Active Performance Protection, and Aggressive Token Optimization.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@andezdev/tokenlite-mysql-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @andezdev/tokenlite-mysql-mcp against OSV.dev.
Click any tool to inspect its schema.
templatesPre-approved SQL query templates from templates.json for analytical queries and business metrics
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data / ai-ml
Query and manage PostgreSQL databases directly from AI assistants
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
Manage Supabase projects — databases, auth, storage, and edge functions
MCP Security Weekly
Get CVE alerts and security updates for io.github.andezdev/tokenlite-mysql-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A robust and secure MySQL database server implemented under Anthropic's Model Context Protocol (MCP). Designed specifically to solve the shortcomings of current generic MCP servers through Graceful Degradation, Active Performance Protection, and Aggressive Token Optimization.
LIMIT clauses automatically at the AST level.GRANT or CALL).SET SESSION TRANSACTION READ ONLY directly into the connection pool sockets. This guarantees that even if a theoretical bypass exists in the AST parser, the MySQL engine itself will physically reject any data modification.metadata.json) to database schema exploration, and exposes Semantic Templates via the official MCP Prompts API (templates.json) so the LLM uses pre-approved analytical queries instead of hallucinating them.∅), saving up to 50% of Output Tokens compared to verbose JSON. When results hit the applied LIMIT, a -- rows: N (truncated at LIMIT X) footer is appended so the LLM does not assume a complete dataset.completions/complete capability for resource templates (mysql://tables/{name}) and the query_templates prompt.SELECT and SHOW VIEW privileges.You can use this MCP server with any compatible client. Below are the configurations for the most popular ones.
Edit your claude_desktop_config.json (usually located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add the following:
Using NPX (Recommended)
{
"mcpServers": {
"tokenlite-mysql": {
"command": "npx",
"args": [
"-y",
"@andezdev/tokenlite-mysql-mcp"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_password",
"DB_NAME": "your_database",
"MCP_EXPLAIN_MAX_SCAN_ROWS": "1000",
"MCP_QUERY_ROW_LIMIT": "500",
"MCP_SAFE_QUERY_ENABLE_BLOCKING": "true"
}
}
}
}
You can easily integrate this server globally into Claude Code:
claude mcp add tokenlite_mysql \
-e DB_HOST="127.0.0.1" \
-e DB_PORT="3306" \
-e DB_USER="root" \
-e DB_PASSWORD="your_password" \
-e DB_NAME="your_database" \
-- npx -y @andezdev/tokenlite-mysql-mcp
To u