npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mysql-mcp-core

v1.0.0

Published

Professional MySQL MCP server with integrated security guardrails, schema introspection, and performance auditing.

Readme

MYSQL MCP

License: MIT TypeScript MCP Protocol Install with Smithery

A professional, high-performance Model Context Protocol (MCP) server for MySQL. Built for enterprise AI agents, it features interactive security guardrails, native schema introspection, performance auditing, and big data streaming.


Features

1. Interactive Guardrails (Safety-First)

Prevents accidental data loss by intercepting destructive queries (UPDATE, DELETE, DROP, ALTER, TRUNCATE). The server blocks execution and requires explicit human confirmation before proceeding.

2. Native Schema Resources

Exposes the full database schema as an MCP Resource (mysql://localhost/schema). This allows the LLM to contextually understand your tables and columns without consuming token-heavy tool calls.

3. Performance & Security Auditing

Built-in MCP Prompts (performance_audit, security_review) instruct the AI to analyze your schema for missing indexes, normalization issues, and security vulnerabilities.

4. Big Data Streaming Export

Avoid chat overflow when querying thousands of rows. The stream_export tool pipes query results directly to local CSV or JSON files on your disk.


Quick Start

You don't need to clone the repository. If you have Node.js installed, use npx directly in your MCP client configuration.

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "mysql-mcp": {
      "command": "npx",
      "args": ["-y", "mysql-mcp-core"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "your_user",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Note: If your MySQL server is running inside a Docker container while Claude Desktop is on your host, use host.docker.internal instead of localhost for MYSQL_HOST.


Technical Specifications

Environment Variables

| Variable | Description | Default | | :--- | :--- | :--- | | MYSQL_HOST | Database host | localhost | | MYSQL_USER | Database user | root | | MYSQL_PASSWORD| Database password | (empty) | | MYSQL_DATABASE| Database name | test |

MCP Tools

  • query: Execute a SQL query. (Destructive operations require confirm: true).
  • inspect_table: Get detailed schema and index information for a specific table.
  • analyze_performance: Run EXPLAIN on a SELECT query to see the execution plan.
  • stream_export: Export large query results to a local CSV/JSON file.

MCP Resources

  • mysql://localhost/schema: Full JSON representation of the current database schema.

MCP Prompts

  • performance_audit: Triggers an AI review of your schema for indexing opportunities.
  • security_review: Triggers an AI review of your schema for primary keys and sensitive data.

Best Practices

Do not use the root user. For security, create a dedicated user for the MCP server:

CREATE USER 'mcp_agent'@'localhost' IDENTIFIED BY 'secure_password';
GRANT SELECT, INSERT, UPDATE, DELETE ON your_database.* TO 'mcp_agent'@'localhost';
FLUSH PRIVILEGES;

Contributing

We welcome contributions! Please check the issues page or open a Pull Request.

Built for the global AI community.