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. MySQL (security First)
MySQL (security First) logo
Health: ActiveRecent health check succeeded.Last checked 9/22/2026, 6:32:28 PM

MySQL (security First)

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 Repository2 GitHub StarsTotal stargazers on GitHub for the source repository (2 stars).Visit Website

Security-first MySQL MCP server: AST-validated SQL (fail-closed), default-deny whitelist, audit.

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
Manual Client & Custom JSON ConfigExpand JSON โ–พ

Client Config & Setup

Remote HTTP
Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mysql-security-first": {
      "url": "http://127.0.0.1:3001/mcp"
    }
  }
}

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

Install Tool Schemas (8) Directory Badge Claim listing Alternatives๐Ÿ—„๏ธ More in Databases

Capabilities & Tool Schemas (8) ~229 tokensApproximate context cost of this serverโ€™s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server โ€” may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by MySQL (security First).

list_profile

No arguments; return names and descriptions sorted by name as text and structured `{profiles: [{name, description}]}`; no connection probe or credentials

mysql_query

Run one read-only statement (`SELECT` / `SHOW` / `DESCRIBE` / `EXPLAIN`)

mysql_execute

Run one write statement (`INSERT` / `UPDATE` / `DELETE` / DDL โ€” each type must be enabled in config); returns affected rows

mysql_script

Run a `;`-separated multi-statement script atomically in one transaction โ€” all-or-nothing; DDL banned

mysql_explain

Execution plan for a single `SELECT` (`format`: `traditional` / `json` / `tree`; `analyze: true` runs `EXPLAIN ANALYZE`)

mysql_list_tables

List the base tables visible through the whitelist

Documentation Overview

mcp-server-mysql

English | ็ฎ€ไฝ“ไธญๆ–‡

Release License Go Docker

A security-first MySQL MCP server. Every SQL statement must survive a full AST parse by an industrial-grade SQL parser (TiDB parser) before it can touch your database โ€” backed by a read-only transaction fallback and a driver-level multi-statement lockout. Three independent layers of defense-in-depth: let AI query your database, without letting it walk off with your database.

Why this one?

Most MySQL MCP servers enforce "read-only" with regex/keyword matching, or by wrapping queries in a read-only transaction. Both are broken:

  • Regex checks are defeated by SQL comments and creative rewriting.
  • A read-only transaction alone is defeated by COMMIT; DROP TABLE ... stacked-statement injection โ€” the exact attack Datadog demonstrated against the official Postgres reference server, which has since been archived.

This project puts the security boundary on real SQL semantic parsing instead. Every statement is parsed into an AST by the TiDB parser (MySQL 8.0-grammar compatible); anything the parser cannot understand is rejected โ€” fail-closed, so incomplete grammar coverage can only over-block, never under-block. And because the parser sees real MySQL semantics, tricks like hiding a JOIN mysql.user inside a versioned comment /*!80000 ... */ are extracted and checked like any other table reference.

Highlights

  • Independent connection profiles โ€” one process manages multiple MySQL connections, each with its own pool, security rules, audit files, and statistics. Discover names and descriptions with list_profile, then pass an explicit profile to every SQL tool.
  • Statement-class gating โ€” SELECT / INSERT / UPDATE / DELETE / DDL are individually switchable; the default is read-only. SET, GRANT, CALL, USE, LOAD DATA, LOCK TABLES, and transaction control (BEGIN/COMMIT/ROLLBACK) are rejected unconditionally โ€” classification itself is an allowlist, so unknown statement types land on the deny side by construction.
  • Default-deny table whitelist โ€” nothing is visible until whitelisted; patterns like db.*, db.table, app_*.logs (glob per side, case-insensitive). Every table reference is extracted from the AST: JOINs, subqueries, derived tables, CTEs (scope-aware โ€” a CTE name can't shadow a real table to smuggle it past the check), multi-table DML, INSERT ... SELECT, and versioned comments.
  • MCP table-schema resources โ€” after the MCP connection initializes, every privilege-visible, whitelisted base table is exposed as mysql:///schema/{profile}/{database}/{table}. Reading a resource returns live SHOW CREATE TABLE SQL with only the volatile table-level AUTO_INCREMENT=N counter removed.
  • Execution guardrails โ€” hard row cap, per-query timeout, single-statement enforcement, and a tripwire for UPDATE/DELETE without WHERE.
  • Built-in observability โ€” per-query latency and row counts, slow-query flagging, and a mysql_stats tool so you can ask "which query was slowest?" right in the conversation.
  • Structured audit, opt-in โ€” JSONL with daily rotation; denied SQL is recorded with the exact rule that fired. Off by default: no log files unless you enable it.
  • Atomic scripts โ€” mysql_script runs a multi-statement script in a single transaction with every statement individually re-validated; any failure rolls back everything. DDL is banned inside scripts because MySQL's implicit commit would break atomicity.
  • Query-plan analysis โ€” mysql_explain with traditional / json / tree formats and EXPLAIN ANALYZE support.
  • Interactive query results โ€” MCP Apps-capable hosts render mysql_query as a filterable, sortable table with per-view history, selection, column controls, and TSV/CSV/JSON copy; other hosts keep receiving the original text result.
  • Easy to run, small to trust โ€” a single static Go binary with stdio by default, built on the official MCP Go SDK; the Docker image is distroless and runs as a non-root user.

Tools

All seven mysql_* tools require a non-empty profile string matching a configured name. There is no default connection: missing or unknown profiles are rejected before database access. mysql_describe_table defaults its optional database argument to the selected profile's database.

ToolWhat it does
list_profileNo arguments; return names and descriptions sorted by name as text and structured {profiles: [{name, description}]}; no connection probe or credentials
mysql_queryRun one read-only statement (SELECT / SHOW / DESCRIBE / EXPLAIN)
mysql_executeRun one write statement (INSERT / UPDATE / DELETE / DDL โ€” each type must be enabled in config); returns affected rows
mysql_scriptRun a ;-separated multi-statement script atomically in one transaction โ€” all-or-nothing; DDL banned
mysql_explainExecution plan for a single SELECT (format: traditional / json / tree; analyze: true runs EXPLAIN ANALYZE)
mysql_list_tablesList the base tables visible through the whitelist
mysql_describe_tableColumn structure of a whitelisted table
mysql_statsSelected profile's process-lifetime stats window: profile name, totals / denials, average & P95 latency, top-N slow queries, per-table access counts

For example, call list_profile with {}, then mysql_query with {"profile":"dev","sql":"SELECT * FROM myapp.orders LIMIT 10"} or mysql_stats with {"profile":"dev","top_n":5}. Keep the same profile when inspecting, changing, and verifying data.

Resources

The server takes a table snapshot for each profile during MCP initialization/discovery and registers one direct resource per visible base table. Resource names also identify the profile, so identical database and table names on different servers stay distinct:

URIMIME typeContent
mysql:///schema/{profile}/{database}/{table}application/sqlCurrent normalized SHOW CREATE TABLE output

"Visible" is the intersection of what the profile's MySQL account can see and its security.table_whitelist. Views are not registered. Resource discovery is not capped by security.max_rows, and resource reads remain available even when select is absent from allowed_statements, because both operations execute fixed server-owned metadata SQL rather than user-submitted SQL.

The resource set is a discovery-time snapshot: a table created later appears after the next discovery or reconnect, while a dropped or newly inaccessible table returns MCP Resource Not Found. The resource content is live, so ALTER TABLE is reflected on the next read. Resource discovery and reads do not enter the audit log or mysql_stats; a discovery failure is logged with the profile name and clears only that profile's table resources; other profiles, tools, and the shared query-results App remain available.

The root-level resources.enabled switch applies to every profile. Set it to false to disable the entire resource feature. It defaults to true; when disabled, the server does not advertise Resources, register table or MCP App resources, or query any profile's MySQL during initialization/discovery. The interactive MCP App is therefore unavailable, while all eight tools, including mysql_query's text and structured results, remain available.

Quick start

1. Get the binary

Prebuilt โ€” download the tarball for your platform (linux_amd64 / linux_arm64 / darwin_arm64) from Releases (checksums included), or install with Go:

bash
go install github.com/Kurok1/mcp-server-mysql/cmd/mcp-server-mysql@latest

Docker โ€” multi-arch images are published to GitHub Container Registry:

Terminal
docker pull ghcr.io/kurok1/mcp-server-mysql:latest

2. Configure

Copy config.example.yaml and adjust:

bash
mkdir -p ~/.mcp-server-mysql
cp config.example.yaml ~/.mcp-server-mysql/config.yaml

A minimal config:

yaml
resources:
  enabled: true
profiles:
  dev:
    description: Development database
    mysql:
      host: 127.0.0.1
      port: 3306
      user: mcp_dev                  # use a dedicated least-privilege account, not root
      password: ${MYSQL_MCP_PASSWORD}
      database: myapp

    security:
      allowed_statements: [select]   # add insert/update/delete/ddl only if you need them
      table_whitelist:
        - "myapp.*"

Add sibling entries under profiles for other connections; each accepts the same mysql, security, and audit fields. The annotated example includes two profiles. The client examples below use this minimal config; for other configurations, pass every referenced password environment variable to the MCP process.

3. Wire up your MCP client

Claude Code:

Terminal
claude mcp add mysql --env MYSQL_MCP_PASSWORD=your-password -- \
  ~/go/bin/mcp-server-mysql --config ~/.mcp-server-mysql/config.yaml

Claude Desktop or any JSON-configured client:

config.json
{
  "mcpServers": {
    "mysql": {
      "command": "/usr/local/bin/mcp-server-mysql",
      "args": ["--config", "/Users/me/.mcp-server-mysql/config.yaml"],
      "env": { "MYSQL_MCP_PASSWORD": "..." }
    }
  }
}

Docker:

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

Related MCP Servers

View all in Databases View all alternatives
  • MCP Mysql Server logoMCP Mysql Server

    Node.js-based MySQL database integration that provides secure MySQL database operations

    ๐Ÿ—„๏ธ Databases5 views
    Compare vs MCP Mysql Server โ†’
  • Genai Toolbox logoGenai Toolbox

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

    ๐Ÿ—„๏ธ Databases5 views
    Compare vs Genai Toolbox โ†’
  • Legion MCP logoLegion MCP

    Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, BigQuery, Oracle DB, and SQLite.

    ๐Ÿ—„๏ธ Databases5 views
    Compare vs Legion MCP โ†’
  • Influxdb3 MCP Server logoInfluxdb3 MCP Server
    Verified

    Official MCP server for InfluxDB 3 Core/Enterprise/Cloud Dedicated

    ๐Ÿ—„๏ธ Databases10 views
    Compare vs Influxdb3 MCP Server โ†’

Adoption & maintenance

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

GitHub stars
2
Stargazers on the source repository.
Last commit
10d ago
Most recent push to the default branch.
Tools exposed
8
Callable tools this server registers over MCP.

Reviews

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

Frequently Asked Questions about MySQL (security First)

MySQL (security-first) is a hosted MCP server. Add it as a remote server in your client's config: "mcpServers": { "mysql-security-first": { "url": "http://127.0.0.1:3001/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 PreviewMySQL (security First) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mysql-security-first?style=directory)](https://allmcps.com/mcp/mysql-security-first)
HTML Embed
<a href="https://allmcps.com/mcp/mysql-security-first"><img src="https://allmcps.com/api/badge/mysql-security-first?style=directory" alt="MySQL (security First) on AllMCPs" /></a>

Technical Specs & Signals

Category๐Ÿ—„๏ธDatabases
More technical detailsExpand โ–พ
TransportSSE (Remote)
Last updatedSep 15, 2026
5/9 checks healthy over the last 46d
Views0
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 stars2
GitHub Star CountTotal stargazers on GitHub representing community popularity (2 stars).
Last commit10d ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Sep 15, 2026
53Quality signal: Good ยท 53/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 & tools25/30
Adoption & activity5/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.

โ˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore 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 MySQL (security First) โ†’Install in Claude DesktopInstall in CursorInstall in VS CodeSetup guides for all 13 MCP clients