Works with the AI Agents you already use

    MySQL Safe MCP

    by Wilson Coc

    1

    A safety-first MySQL MCP skill for read-only database exploration, schema inspection, and query debugging.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    MySQL Safe MCP

    MySQL Safe MCP

    Example session with this skill installed

    Connect to the production database and check why the 'orders' table is slow. Show me the schema and the first 5 high-value orders.

    • Read your context and instructions
    • Compiled the mysql safe mcp

    I have connected to the MySQL instance and performed a schema inspection followed by a performance analysis and a bounded query.

    MySQL Database Audit: 'orders' Table

    Schema Inspection

    ColumnTypeNullKeyDefaultExtra
    idbigintNOPRINULLauto_increment
    user_idbigintNOMULNULL
    total_amountdecimal(10,2)NONULL
    statusvarchar(20)NO'pending'
    created_atdatetimeYESCURRENT_TIMESTAMP

    Performance Analysis (EXPLAIN)

    The query SELECT * FROM orders WHERE total_amount > 1000 is performing a full table scan.
    Recommendation: Add an index to the total_amount column.

    EXPLAIN SELECT id, total_amount, status FROM orders WHERE total_amount > 1000 ORDER BY total_amount DESC LIMIT 5;
    -- Result: type: ALL, rows: 450230, extra: Using filesort
    

    High-Value Orders (Sample)

    Executed Query: SELECT id, user_id, total_amount, status FROM orders WHERE total_amount > 5000 ORDER BY total_amount DESC LIMIT 5;

    iduser_idtotal_amountstatus
    884210212450.00completed
    77215509800.50shipped
    90128828720.00completed
    6631127500.25pending
    82104416200.00completed

    Next steps

    1. Run CREATE INDEX idx_total_amount ON orders(total_amount); after enabling write flags.
    2. Inspect the user_id foreign key for potential orphan records.
    3. Check row counts for status='pending' to verify queue depth.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Cut manual MySQL schema checks, slow-query debugging, and database audits from 20–30 minutes down to under 60 seconds—with zero risk of accidental writes in production.

    Connecting AI agents directly to live databases often leads to runaway SELECT * queries that burn your token budget or dangerous accidental mutations. MySQL Safe MCP pairs a ready-to-build local MCP server with a strict read-only workflow, schema-first inspection, and EXPLAIN performance diagnostics so your agent works like a careful senior backend engineer.

    What it does

    • Enforce Read-Only Safety by Default: Locks INSERT, UPDATE, DELETE, and DDL operations to false via environment flags so you can inspect production or staging databases with peace of mind.
    • Save 20–30 Minutes per Investigation: Inspect tables, column types, approximate row counts, and slow queries in seconds instead of writing repetitive manual SQL.
    • Protect Your Context Window & Token Budget: Enforces explicit column selection, mandatory LIMIT clauses on exploratory queries, and SQL-side aggregations (COUNT, SUM, GROUP BY).
    • Pinpoint Slow Queries & Missing Indexes: Runs EXPLAIN and EXPLAIN ANALYZE automatically before recommending index optimizations.
    • Guarded Write Workflow (Optional): If you manually enable write flags, requires a SELECT COUNT(*) impact preview and explicit user confirmation before executing any modifying query.

    How it works

    1. 2-Minute Setup: Run the included scripts/setup_mcp.ps1 (Windows) or npm install && npm run build (macOS/Linux) to compile and register the local MySQL MCP server.
    2. Schema-First Discovery: Automatically inspects SHOW TABLES, DESCRIBE, and information_schema row counts before touching any data.
    3. Bounded, Token-Safe Queries: Runs targeted SELECT queries with LIMIT and SQL aggregations, returning clean Markdown tables and exact SQL statements.
    4. Actionable Diagnostics: Flags full-table scans, missing indexes, unexpected NULLs, or orphan foreign keys with concrete next steps.

    Frameworks & tools

    Requires Node.js 18+ and access to a local or remote MySQL 5.7 / 8.x / MariaDB instance (including AWS RDS, Railway, DigitalOcean, or local Docker/XAMPP). Compatible with Claude Code, Cursor, Codex, Antigravity, GitHub Copilot, and any MCP-compatible agent.

    Why this beats prompting it yourself

    Generic prompts frequently trigger full-table SELECT * dumps that exhaust context windows or skip safety checks before running risky SQL. This skill hardwires read-only defaults, schema-first discovery, LIMIT caps, and row-count write previews directly into your agent's workflow.

    Use cases

    • Diagnosing slow production queries and identifying missing indexes in under a minute.
    • Safely auditing staging or production data without risking accidental UPDATE or DELETE statements.
    • Onboarding onto unfamiliar legacy databases by mapping schemas and row volumes instantly.
    • Generating ad-hoc operational and financial summaries using SQL-side aggregations.

    Known limitations

    Write operations are intentionally disabled by default and require manually toggling environment flags (ALLOW_*_OPERATION) to enable. Very large BLOB or TEXT columns should be excluded from exploratory queries to keep token usage minimal.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 7 days ago

    Software
    Node.jsMySQLGit

    network access to your configured MySQL host/port (read-only by default), and local environment variables for database credentials.

    Permissions

    Terminal / Shell
    Read Files
    Network Access
    Environment Variables
    Listed7 days ago

    What's inside

    Frequently Asked Questions

    This skill acts as a protective layer that enforces read-only access by default and automatically blocks high-risk operations like DELETE or DROP. It also prevents "token crashes" by mandating query limits and explicit column selection, ensuring your AI doesn't accidentally pull more data than the context window can handle.

    The skill is compatible with any environment running Node.js 18+ and connects to any standard MySQL instance. It is specifically designed for MCP-capable clients such as Claude Code, Cursor, and Antigravity.

    By default, the skill is locked to read-only mode for maximum safety. To perform data modifications, you must manually toggle environment flags and pass a row-count preview check, ensuring no write operation happens without explicit intent.

    No, you do not need to share your database credentials with the marketplace. You configure your connection strings locally via environment variables or a config file during the setup process, keeping your sensitive data private.

    You will receive the full MCP server package, including the core logic for schema inspection and query debugging, as well as the setup scripts required to register the server with your preferred AI client.

    New in Data & Databases

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.