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

gotrasoft-mysql

v1.0.4

Published

A comprehensive Model Context Protocol (MCP) server for MySQL and MariaDB. Enables AI assistants to safely inspect database schemas, execute read-only queries, and analyze table statistics with built-in security protections.

Readme

🐬 Gotrasoft MySQL MCP Server

npm version License: MIT

Unlock the power of your database for AI.
safe, read-only inspection for MySQL & MariaDB.

Connect your AI assistants (Claude, Cursor, GitHub Copilot) to your MySQL data safely. gotrasoft-mysql provides a read-only bridge, allowing LLMs to understand your schema, answer data questions, and generate insights without the risk of accidental modification.


✨ Features

  • 🔒 Safe by Design: Strict read-only policy for execute_query. Destructive commands like DROP, DELETE, and INSERT are blocked at the application level.
  • 👁️ Deep Inspection: Tools to list_tables and describe_table schemas efficiently.
  • 📊 Smart Statistics: Get row counts and storage estimates with get_table_stats.
  • Dynamic Queries: Let the AI write and run SELECT queries to find exactly what you need.
  • 🛠️ Setup Tools: Includes create_database to help you spin up new environments quickly (the only write operation allowed, for setup convenience).

🚀 Quick Start

No installation needed! specific usage via npx is recommended to ensure you're always using the latest version.

npx gotrasoft-mysql

📦 Installation

Option 1: Run via npx (Recommended)

Add this directly to your MCP client configuration (see below). This keeps your system clean and updates automatic.

Option 2: Global Install

If you prefer a local binary:

npm install -g gotrasoft-mysql
# Run it
gotrasoft-mysql

Option 3: From Source

Perfect for contributors or custom modifications.

git clone https://github.com/yourusername/gotrasoft-mysql.git
cd gotrasoft-mysql
npm install
npm run build

⚙️ Configuration

The server is configured via Environment Variables. You can set these in your MCP client configuration.

| Variable | Description | Default | | :--- | :--- | :--- | | DB_HOST | Database hostname | localhost | | DB_USER | Database username | root | | DB_PASSWORD | Database password | (empty) | | DB_PORT | Database port | 3306 | | DB_NAME | Optional. Default target database. | - |


🔌 Connect to Your AI

GitHub Copilot / VS Code

Add this to your mcpServers.json (usually in ~/Library/Application Support/Code/User/globalStorage/ms-vscode.github-copilot-chat/mcpServers.json on macOS):

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "gotrasoft-mysql"],
      "env": {
        "DB_HOST": "127.0.0.1",
        "DB_USER": "root",
        "DB_PASSWORD": "your_secure_password",
        "DB_PORT": "3306"
      }
    }
  }
}

Claude Desktop

Add this to your claude_desktop_config.json (usually in ~/Library/Application Support/Claude/ on macOS):

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "gotrasoft-mysql"],
      "env": {
        "DB_HOST": "127.0.0.1",
        "DB_USER": "root",
        "DB_PASSWORD": "your_secure_password",
        "DB_PORT": "3306"
      }
    }
  }
}

💡 How to Use

Once connected, simply chat with your AI assistant naturally.

🔎 Explore Structure

"What tables are in the ecommerce database?" "Show me the schema for the users and orders tables."

🧠 Analyze Data

"How many users signed up last month?" "Find the top 5 most expensive products in the inventory table." "Join the users and orders tables to show total spend per user."

🛡️ Safe Execution

The AI will use the execute_query tool. Don't worry—if it tries to DELETE or DROP, the server will reject the request.


🛠️ Tool Reference

| Tool Name | Description | Arguments | | :--- | :--- | :--- | | list_tables | Lists all tables in a database. | database (optional) | | describe_table | Shows detailed column/type info. | table_name, database (optional) | | execute_query | Runs a safe, read-only SQL query. | query (SQL string), database (optional) | | get_table_stats | Returns row counts & size metrics. | table_name, database (optional) | | create_database | Creates a new schema. | database_name |


🌟 More from Gotrasoft

Check out gotrasoft-postman!
A generic Postman-like MCP server for testing any API. Supports various authentication methods and is perfect for testing enterprise APIs.


📄 License

MIT © I Komang Gede Yuliana