-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Chris edited this page Jun 12, 2026
·
28 revisions
Enterprise-grade MySQL MCP Server with OAuth 2.1 authentication, connection pooling & tool filtering – TypeScript Edition
A MySQL MCP Server that enables AI assistants (Claude, Cursor, etc.) to interact with MySQL databases through the Model Context Protocol with deterministic error handling. It provides 241 Specialized Tools, 19 resources, and 19 AI-powered prompts for database operations, performance analysis, and administration.
| Resource | Description |
|---|---|
| Installation | Prerequisites and setup guide |
| Configuration | Environment variables, MCP client configs |
| Tool-Filtering | Reduce tool count for IDE limits |
| Tool-Reference | Complete list of all 241 tools |
| Code-Mode | Sandboxed code execution (70-90% token savings) |
| Resources | Database observability (19 resources) |
| Prompts | AI-powered workflows (19 prompts) |
| Audit-Trail | JSONL forensic logging & token metrics |
-
PNPM:
pnpm add -g @neverinfamous/mysql-mcp(recommended) -
Docker:
docker run -i --rm writenotenow/mysql-mcp:latest
- 241 MySQL Tools across 28 categories
-
Deterministic Error Handling — structured
{success, error, code, category, suggestion, recoverable}on every tool - Audit Trail & Token Logging — JSONL forensic logging with pre-mutation snapshots
- 19 resources for database observability
- 19 AI-Powered Prompts for guided workflows
-
Sandbox Isolation — Code Mode executes in a separate native C++
isolated-vmengine with host-side references, enforced memory limits, and hard timeouts -
Token-Optimized Payloads — Tools with large responses offer optional
summary,limit, andcompactflags to reduce token usage - Tool Filtering Shortcuts (starter, dev-power, dba-monitor, etc.)
- Connection Pooling via mysql2
- OAuth 2.1 enterprise authentication support
- Advanced Encryption (TLS/SSL, masking, compliance tools)
- Docker Deployment with multi-arch images
| Category | Tools | Description |
|---|---|---|
| Core | 12 | CRUD, schema, tables, indexes |
| Transactions | 7 | BEGIN, COMMIT, ROLLBACK, savepoints |
| JSON | 17 | JSON functions + merge, diff, stats |
| Text | 6 | REGEXP, LIKE, SOUNDEX |
| FULLTEXT | 5 | Natural language search |
| Performance | 11 | EXPLAIN, query analysis, anomaly detection |
| Optimization | 4 | Index hints, recommendations |
| Admin | 8 | OPTIMIZE, ANALYZE, CHECK, insights |
| Monitoring | 7 | PROCESSLIST, status variables |
| Backup | 7 | Export, import, mysqldump, audit backups |
| Replication | 5 | Master/slave, binlog |
| Partitioning | 4 | Partition management |
| Router | 9 | MySQL Router REST API |
| ProxySQL | 11 | Proxy management |
| Shell | 10 | MySQL Shell utilities |
| Schema | 11 | Views, procedures, triggers, constraints |
| Introspection | 6 | Dependency graphs, cascade simulation, snapshots |
| Migration | 6 | Schema versioning, apply, rollback, history |
| Events | 6 | Event Scheduler management |
| sys Schema | 8 | MySQL sys schema diagnostics |
| Statistics | 20 | Statistical analysis, window functions, sampling |
| Spatial/GIS | 12 | Geometry operations, distance, GeoJSON |
| Security | 9 | Audit, SSL, encryption, masking |
| Cluster | 10 | Group Replication, InnoDB Cluster |
| Roles | 8 | MySQL 8.0 role management |
| Document Store | 9 | JSON document collections |
| Code Mode | 1 | Sandboxed code execution (isolated-vm native C++ engine) |
| Topic | Description |
|---|---|
| OAuth | OAuth 2.1 enterprise authentication |
| HTTP-Transport | Dual HTTP transport deployment guide |
| MySQL-Router | Configure MySQL Router tool access |
| ProxySQL | Configure ProxySQL admin access |
| MySQL-Shell | Configure MySQL Shell integration |
| MCP-Inspector | Visual debugging guide |
Status: Production/Stable