Enterprise-grade MySQL MCP Server with OAuth 2.0, 106 tools, and Docker deployment
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
π Full Documentation (Wiki) β’ Changelog β’ Security β’ Release Article
Integrate your AI agents with a production-ready MySQL environment. Deploy MCP v2 stateless architecture via HTTP transport. Optimize token efficiency via Code Mode. Secure your database with OAuth 2.1.
| Feature | Description |
|---|---|
| Specialized Tools | Access specialized tools for core CRUD, JSON, spatial data, document stores, and clusters. |
| Resources | Monitor schema, performance metrics, process lists, replication status, and InnoDB diagnostics in real-time. |
| AI-Powered Prompts | Execute guided workflows for query building, schema design, performance tuning, and infrastructure setup. |
| Code Mode | Reduce LLM token consumption by consolidating operations inside a secure, sandboxed V8 isolate. |
| Token-Optimized Payloads | Maximize token efficiency. Use optional flags to reduce response size for large payloads. |
| OAuth 2.1 Security | Enforce granular access control with RFC compliance, strict scopes, and Keycloak integration. |
| Smart Tool Filtering | Use tool groups and shortcuts to stay within IDE tool limits. |
| Streamable & Stateless HTTP | Support MCP v2 streamable HTTP and stateless HTTP deployments. |
| Connection Pooling | Leverage built-in connection pooling for efficient, highly concurrent database access. |
| Ecosystem Integrations | Manage MySQL Router, ProxySQL, and MySQL Shell utilities directly from your agent. |
| Advanced Encryption | Enforce TLS/SSL connections. Manage data masking, encryption monitoring, and compliance effortlessly. |
| Production-Ready Security | Prevent SQL injection with parameterized queries. Rely on strict input validation and audit logging. |
| Deterministic Errors | Receive structured responses with actionable suggestions. Eliminate silent failures and raw exceptions. |
| Observability | Export Prometheus metrics. Track container logs with Dozzle and audit trails with Grafana Alloy/Loki. |
| Strict TypeScript | Rely on strict TypeScript backed by robust test suites. |
| MCP v2 Compliant | Fully support the MCP v2 specification. This includes stateless routing, caching, safety hints, and notifications. |
This server includes intelligent prompts for guided workflows:
| Prompt | Description |
|---|---|
mysql_tool_index | Complete tool index with categories |
mysql_quick_query | Quick query execution shortcut |
mysql_quick_schema | Quick schema exploration |
mysql_setup_observability | Complete observability stack setup guide (Datadog, etc.) |
Note: This is a subset of available prompts. Use
mysql_tool_indexto discover the full list of guided workflows.
This server exposes a comprehensive set of resources for database observability and telemetry:
| Resource | Category | Description |
|---|---|---|
mysql://schema | Core | Full database schema |
mysql://tables | Core | Table listing with metadata |
mysql://variables | Core | Server configuration variables |
mysql://status | Core | Server status metrics |
mysql://processlist | Core | Active connections and queries |
mysql://pool | Core | Connection pool statistics |
mysql://capabilities | Extended | Server version, features, and tool categories |
mysql://health | Extended | Comprehensive database health status |
mysql://performance | Extended | Query performance metrics |
mysql://indexes | Extended | Index usage and statistics |
mysql://replication | Extended | Replication status and lag |
mysql://innodb | Extended | InnoDB buffer pool and engine metrics |
mysql://events | Domain | Event Scheduler status and scheduled events |
mysql://sysschema | Domain | sys schema diagnostics summary |
mysql://locks | Domain | InnoDB lock contention detection |
mysql://cluster | Domain | Group Replication / InnoDB Cluster status |
mysql://spatial | Domain | Spatial columns and indexes |
mysql://docstore | Domain | Document Store collections |
mysql://insights | Analytics | Business insights memo from mysql_append_insight |
mysql://metrics | Observability | In-memory token usage, latency, and request metrics |
mysql://audit | Observability | Forensic trail and snapshot of system errors |
mysql://help | Documentation | Critical gotchas and high-level API reference |
mysql://help/{group} | Documentation | Dynamic group-specific tool reference (e.g., core, codemode) |
.node-version for the pinned local development version)Run the server:
Or use npx without installing:
Note on Namespaces: The Docker image uses the
writenotenownamespace. The GitHub repo usesneverinfamous.
Linux Users: For
host.docker.internalon Linux, run the container with--add-host host.docker.internal:host-gateway.
Launch the full observability stack using the included template. This includes Datadog, OpenTelemetry, Prometheus, and Grafana. This spins up the MCP server, MySQL database, Redis, and observability sidecars:
http://localhost:3001 (Dashboard pre-loaded).http://localhost:9090.http://localhost:3000.Datadog Constraints:
pup CLI for authentication.tags.datadoghq.com/env, tags.datadoghq.com/service, tags.datadoghq.com/version) to your containers.stop_grace_period: 30s, mem_limit: 1536m, and OpenMetrics timeouts of 10s.DD_HOSTNAME and native /etc/docker/daemon.json cgroup configurations ("default-cgroupns-mode": "host"). Disable DD_EXTRA_PERFORMANCE_METRICS.inotify tailing issues may occur with Docker/WSL2 log mapping.OpenTelemetry Rules:
gen_ai.* semantics.traceparent and tracestate propagation.No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mysql-mcp-2)<a href="https://allmcps.com/mcp/mysql-mcp-2"><img src="https://allmcps.com/api/badge/mysql-mcp-2?style=directory" alt="Mysql MCP on AllMCPs" /></a>