-
Notifications
You must be signed in to change notification settings - Fork 2
Architecture
MySQL MCP is a production-ready integration engineered for AI agents. It minimizes LLM token consumption by up to 90% via sandboxed Code Mode. It scales reliably through built-in connection pooling. It secures database access using strict OAuth 2.1 validation.
Engineered for AI autonomy. Empower AI Agents with mysql-mcp's Adaptive Instruction Architecture. Built for enterprise environments. Enforce zero-trust security and high scalability. Reduce token consumption with V8 sandboxing. Toggle dynamic transports seamlessly. Lock down data with OAuth 2.1. Rely on strict schema validation powered by Zod 4's .safeParse().
See code-map.md in the main repository for architecture, logic flows, and module trees.
Our Adaptive Instruction Architecture compiles modular markdown. We transmit efficient pointer strings to clients. This reduces token bloat. It unlocks dynamic help via mysql://help resources.
- 200+ Specialized Tools distributed across 28 Tool Groups to handle everything from CRUD to Spatial analysis.
- 16 Shortcuts (Tool Filtering) to easily configure context-friendly setups.
- 23 Observability Resources and 19 AI-Powered Prompts to empower proactive agent workflows.
-
Code Mode Execution: An
isolated-vmsandbox reduces token overhead. This delivers massive cost savings. It includes configurable payload caps and rate limiting. -
Supported Transports: Seamlessly switch between
stdio,http(Streamable HTTP/mcp), andsse(Legacy/sse). - Authentication: We support Simple Bearer Tokens or full OAuth 2.1 (RFC 9728/8414) via Keycloak.
-
fix(security): allow mask data alias validation at MCP boundary. -
docs(tests): strengthen anti-hallucination guardrails across coordinator workflows (list_dir requirements, task.md checklist). -
fix(core): add conditional update aliases for data and conditions. -
fix(security): require at least one filter for audit tool to prevent payload bloat. -
fix(optimization): allow database-wide index audit in indexRecommendation by removing empty payload validation. -
test(http): streamable and http transport tests added.
- Dual-Schema Validation Pattern: Tools use a Base schema for visibility. They use a Derived schema for parsing. This supports aliases without breaking JSON Schema. Integrates Standard Schema interfaces via Zod's safe parsing patterns to strictly enforce tool boundaries. This robustly rejects invalid or hallucinated payloads at the MCP boundary, ensuring predictable AI agent execution.
Unlock autonomous database orchestration with an enterprise-grade MySQL MCP server. Featuring blazing-fast sandboxed Code Mode, uncompromising schema enforcement, and seamless ecosystem integrations to power secure, intelligent AI workflows.
- Installation
- Configuration
- Architecture
- HTTP Transport
- Tool Filtering
- Code Mode
- Tools
- Prompts
- Resources
- Observability & Telemetry