Skip to content
Chris edited this page Jul 6, 2026 · 129 revisions

Schema

Tools Resources Prompts
OAuth 2.1 Code Mode

🚀 Value Proposition

Bulletproof your AI integrations. We mandate strict Zod validation at every I/O boundary. Our Standard Schema compliant architecture guarantees deterministic payloads, eliminating raw exceptions and ensuring predictable, self-healing agent workflows.

  • Safe Parsing: Always use schema.safeParse() instead of .parse() at I/O boundaries to avoid throwing exceptions and to gracefully handle invalid inputs.

Zero-Trust Data Boundary

We frame Zod validation as a Zero-Trust Data Boundary. Every parameter entering the system is strictly validated. Furthermore, z.coerce is used extensively to coerce common LLM hallucinations (such as passing strings for booleans or numbers) into the correct types, ensuring deterministic and resilient workflows.

Enforce Reliability: Enterprise Validation Rules

To provide a secure and robust integration experience, we strictly enforce the following schemas at the MCP boundary:

  1. Strict Error Responses: All tools are guaranteed to return a structured error response upon failure. All errors extend MySQLMcpError (9 categories) and return enriched ErrorResponse via formatHandlerError(). Our resilient design ensures you will never encounter raw, unhandled exceptions, empowering self-healing autonomous workflows. The schema is: { success: false, error: string, code: string, category: string, suggestion: string, recoverable: boolean }
  2. Deterministic Table Queries: Tools that query tables will return { exists: false, table: string } if the table does not exist, enabling graceful fallback handling in your LLM workflows.
  3. Sandboxed File Operations: File system interactions are strictly bounded by ALLOWED_IO_ROOTS to prevent directory traversal and ensure isolated, secure execution.
  4. Zod 4 Base-to-Derived Pattern: Tools use a plain z.object() Base schema for MCP parameter visibility, and a Derived schema wrapper for handler parsing to support aliases and coercion without breaking standard JSON Schema generation.

Build with Confidence: Integration Guide

Please refer to the repository source for Zod schemas (src/adapters/mysql/schemas/). We highly recommend using schema.safeParse() when building custom MCP tool execution handlers or client integrations to handle validation errors gracefully without throwing exceptions.

For runtime schema introspection, see the Code Mode documentation, which allows you to programmatically discover API parameters and return types using the .schema() introspection method.

MySQL MCP Documentation

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.

🏠 Home


Launch Your Setup


Connect Ecosystem Tools


Enforce Security & Compliance


Scale Your Operations


Explore External Links

Clone this wiki locally