Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Transports: stdio vs HTTP
  • State of MCP (stats)
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ—„οΈ Databases
  3. Tokenlite Mysql MCP
Tokenlite Mysql MCP logo
Health: ActiveRecent health check succeeded.Last checked 9/23/2026, 2:31:48 AM

Tokenlite Mysql MCP

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View RepositoryVisit Website

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

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "tokenlite-mysql-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@andezdev/tokenlite-mysql-mcp"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing AlternativesπŸ—„οΈ More in Databases

Documentation Overview

TokenLite MySQL MCP

npm version

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.


🌟 Core Pillars

  1. Safe-Query Optimizer (AST & EXPLAIN): Protects production databases by pre-analyzing queries. Blocks unindexed Full Table Scans that exceed configurable thresholds and injects strict LIMIT clauses automatically at the AST level.
  2. Granular AST-Based Write Permissions: By default, TokenLite is 100% Read-Only. You can surgically enable specific write operations (INSERT, UPDATE, DELETE, DDL) via environment variables. The firewall uses strict AST parsing to prevent SQL injection and comment-bypass attacks, and strictly prohibits privilege escalation commands (like GRANT or CALL).
  3. Session-Level Defense in Depth: If the server is configured in strict Read-Only mode (all write variables disabled), TokenLite injects 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.
  4. Business Intelligence Injection: Bridges the gap between raw data and company logic. Automatically attaches semantic dictionaries (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.
  5. Graph-Based Semantic Schema: Avoids sending giant schemas to the LLM that saturate the context window. When a table is searched, the engine uses heuristics to deduce implicit relationships and packages the exact "Auto-Join Context".
  6. CSV Token Compression: Database results are efficiently transformed into tabular CSV markdown with unambiguous NULL representation (βˆ…), 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.
  7. MCP Completions: Table names and template keywords support the official completions/complete capability for resource templates (mysql://tables/{name}) and the query_templates prompt.

πŸ“‹ Requirements

  • Node.js v20 or higher
  • MySQL 5.7 or higher (MySQL 8.0+ recommended)
  • A MySQL user with SELECT and SHOW VIEW privileges.

πŸš€ Installation & Usage

You can use this MCP server with any compatible client. Below are the configurations for the most popular ones.

1. Claude Desktop

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)

config.json
{
  "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"
      }
    }
  }
}

2. Claude Code (CLI)

You can easily integrate this server globally into Claude Code:

Terminal
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

3. Cursor IDE

To use within Cursor IDE:

  1. Open Cursor Settings > Features > MCP.
  2. Click + Add New MCP Server.
  3. Set the Type to command.
  4. Name it tokenlite-mysql.
  5. Set the command to:
    Terminal
    npx -y @andezdev/tokenlite-mysql-mcp
    

(Note: Cursor handles environment variables directly in the IDE UI, make sure to add your DB credentials there).


βš™οΈ Environment Variables Reference

Understanding Query Limits (two independent knobs)

execute_safe_query applies two separate limits. Do not confuse them:

VariableWhat it controlsDefaultExample
MCP_EXPLAIN_MAX_SCAN_ROWSSecurity gate: blocks queries whose EXPLAIN plan shows a full table scan (type: ALL) with more estimated rows than this threshold. The query is rejected before execution.10005000 allows scanning tables up to ~5000 rows without an index
MCP_QUERY_ROW_LIMITResult cap: max rows returned to the LLM. Injected as LIMIT at the AST level. When reached, CSV includes -- rows: N (truncated at LIMIT X).5001000 returns up to 1000 rows per SELECT

Deprecated alias: MCP_SAFE_QUERY_MAX_ROWS still works as a fallback for MCP_EXPLAIN_MAX_SCAN_ROWS only. It does not control the result LIMIT.

Worked example with MCP_EXPLAIN_MAX_SCAN_ROWS=5000 and MCP_QUERY_ROW_LIMIT=500 on a customers table (~1502 rows):

  1. SELECT * FROM customers β†’ passes EXPLAIN (1502 < 5000), executes with LIMIT 500, returns 500 rows + truncation footer.
  2. Same config but table has 8000 rows β†’ blocked by EXPLAIN before execution.
VariableDescriptionDefaultRequired
DB_HOSTMySQL Host addresslocalhostNo
DB_PORTMySQL Port3306No
DB_USERMySQL UsernamerootNo
DB_PASSWORDMySQL Password''No
DB_NAMEMySQL Database nametestYes
MCP_EXPLAIN_MAX_SCAN_ROWSEXPLAIN guardrail: max estimated rows for unindexed full table scans before blocking.1000No
MCP_QUERY_ROW_LIMITMax rows returned per SELECT (AST-injected LIMIT + truncation footer).500No
MCP_SAFE_QUERY_ENABLE_BLOCKINGEnable or disable the EXPLAIN guardrail.trueNo
MCP_METADATA_PATHAbsolute path to your custom metadata.json dictionary.(Disabled)No
MCP_TEMPLATES_PATHAbsolute path to your custom templates.json queries.(Disabled)No
TOOL_PREFIXPrefix for tool names (useful when running multiple instances).Derived from DB_NAME (e.g., mydb_). Random fallback only if DB_NAME is unset.No
MCP_RATE_LIMIT_RPMMax tool invocations per minute (sliding window). Set to 0 to disable.60No
MYSQL_QUERY_TIMEOUTMax execution time for a query (in ms). Aborts heavy queries to protect against DoS.15000No
MYSQL_CONNECTION_LIMITMax concurrent pool connections.10No
MYSQL_CONNECT_TIMEOUTMax time to wait for a socket to establish (in ms).10000No
MYSQL_RETRY_ATTEMPTSMax retries on transient connection errors (ECONNREFUSED, PROTOCOL_CONNECTION_LOST, etc.).3No
MYSQL_RETRY_DELAY_MSBase delay (ms) for exponential backoff between retries (1s, 2s, 4s...).1000No
MYSQL_QUEUE_LIMITMax queued requests when all pool connections are busy. Prevents unbounded growth if MySQL is down.50No
MCP_DDL_CACHE_TTLTime-to-live (in seconds) for cached DDL statements. Reduces latency on repeated search_schema calls. Invalidated by refresh_schema.60No
MCP_LOG_LEVELMinimum severity for MCP log notifications: debug, info, notice, warning, error, critical, alert, emergency.infoNo
ALLOW_INSERT_OPERATIONEnable INSERT and REPLACE queries.falseNo
ALLOW_UPDATE_OPERATIONEnable UPDATE queries.falseNo
ALLOW_DELETE_OPERATIONEnable DELETE and TRUNCATE queries.falseNo
ALLOW_DDL_OPERATIONEnable Data Definition Language (CREATE, ALTER, DROP, RENAME).falseNo
DB_SSLEnable TLS for the MySQL connection (recommended for managed/cloud databases).falseNo
DB_SSL_REJECT_UNAUTHORIZEDReject self-signed or untrusted TLS certificates when DB_SSL=true.trueNo

πŸ›‘οΈ Business Intelligence Features (Opt-in)

TokenLite can teach the LLM about your company's business rules. To enable this, map the absolute paths of two JSON files via .env or your MCP client config:

metadata.json (Semantic Dictionary)

Translate integer statuses or internal jargon so the LLM understands the data.

config.json
{
  "orders.status": {
    "pending": "The order is waiting for payment validation",
    "shipped": "The order has left the warehouse"
  }
}

Custom Relationships

Define FK mappings the heuristic engine can't auto-detect (e.g., created_by β†’ users). Add a _relationships key to your metadata.json:

config.json
{
  "orders.status": { "pending": "...", "shipped": "..." },
  "_relationships": {
    "orders.created_by": "users.id",
    "categories.parent_id": "categories.id"
  }
}

These are treated as authoritative (not heuristic) and take priority over automatic detection.

The heuristic engine also assigns a confidence score (0–100) to each inferred FK based on name matching (+40), data type validation (+30), primary key verification (+20), and index presence (+10). Only FKs scoring β‰₯70 are accepted.

templates.json (Pre-approved SQL)

Stop the LLM from hallucinating complex metrics by providing vetted templates.

config.json
[
  {
    "name": "Customer Lifetime Value (LTV)",
    "description": "Calculates total revenue generated by delivered orders per customer.",
    "sql": "SELECT c.id, SUM(oi.price) FROM customers c JOIN orders o... WHERE o.status='delivered'"
  }
]

πŸ“ˆ Benchmarks & Token Savings

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Databases View all alternatives
  • MCP Toolbox for Databases logoMCP Toolbox for Databases

    MCP Toolbox for Databases enables your agent to connect to your database.

    πŸ—„οΈ Databases1 views
    Compare vs MCP Toolbox for Databases β†’
  • Pg Aiguide logoPg Aiguide

    Comprehensive PostgreSQL documentation and best practices, including ecosystem tools

    πŸ—„οΈ Databases0 views
    Compare vs Pg Aiguide β†’
  • Genai Toolbox logoGenai Toolbox

    Open source MCP server specializing in easy, fast, and secure tools for Databases.

    πŸ—„οΈ Databases5 views
    Compare vs Genai Toolbox β†’
  • Supabase logoSupabase

    MCP server for interacting with the Supabase platform

    πŸ—„οΈ Databases1 views
    Compare vs Supabase β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

npm downloads
200
Package downloads in the last 30 days.
Last commit
13d ago
Most recent push to the default branch.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Tokenlite Mysql MCP

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "tokenlite-mysql-mcp": { "command": "npx", "args": ["-y","@andezdev/tokenlite-mysql-mcp"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTokenlite Mysql MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/tokenlite-mysql-mcp?style=directory)](https://allmcps.com/mcp/tokenlite-mysql-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/tokenlite-mysql-mcp"><img src="https://allmcps.com/api/badge/tokenlite-mysql-mcp?style=directory" alt="Tokenlite Mysql MCP on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ—„οΈDatabases
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedSep 10, 2026
6/7 checks healthy over the last 45d
Views1
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars0
GitHub Star CountTotal stargazers on GitHub representing community popularity (0 stars).
Last commit13d ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Sep 10, 2026
npm downloads200/mo
Monthly npm DownloadsAverage monthly package installs recorded from npm registry statistics.
41Quality signal: Fair Β· 41/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools15/30
Adoption & activity6/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev Β· @andezdev/tokenlite-mysql-mcp (npm)

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ—„οΈ Databases β†’Best MCP servers for Databases β†’Best MySQL MCP servers β†’Alternatives to Tokenlite Mysql MCP β†’Install in Claude DesktopInstall in CursorInstall in VS CodeSetup guides for all 13 MCP clients