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

@siddharth.sharma/db-mcp

v1.0.6

Published

Database MCP integration package

Readme

@siddharth.sharma/db-mcp

Database MCP server for MySQL-compatible environments. This package runs as a stdio MCP server.

Cursor mcp.json setup

{
  "mcpServers": {
    "db-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@siddharth.sharma/db-mcp",
        "stdio"
      ],
      "env": {
        "DB_SECRET_JSON_FILE": "/Users/<you>/.mcp-secrets/db-secret.json"
      }
    }
  }
}

Secrets and environment

Use one of the following:

  • DB_SECRET_JSON_FILE (recommended): absolute path to a secret JSON file.
  • DB_SECRET_JSON: inline JSON secret.
  • MCP_DB_CONFIG_PATH: absolute path to a MySQL-style INI config file.

When using DB_SECRET_JSON_FILE or DB_SECRET_JSON, configure allowed operations per environment:

{
  "environments": [
    {
      "name": "prod-readonly",
      "host": "db.example.com",
      "port": 3306,
      "user": "readonly_user",
      "password": "replace-me",
      "database": "app_db",
      "allowed_operations": ["SELECT", "SHOW"]
    },
    {
      "name": "dev-local",
      "host": "127.0.0.1",
      "port": 3306,
      "user": "app_user",
      "password": "replace-me",
      "database": "app_db",
      "allowed_operations": ["SELECT", "SHOW", "INSERT", "UPDATE", "DELETE", "DDL"],
      "max_rows": 100000,
      "require_where_for_updates": false
    }
  ]
}

allowed_operations accepts a JSON array or comma-separated string. Valid values: SELECT, SHOW, INSERT, UPDATE, DELETE, DDL.

If omitted, environments default to read-only (SELECT, SHOW). You can also use access_level (read_only, read_write, full) as shorthand instead of listing operations.

Guardrails enforce injection prevention and block SQL keywords for operation types that are not listed in allowed_operations for that environment.

Available tools

  • help: quick usage and safety guide.

Dedicated db_* tools (one per operation):

  • db_list_environments, db_connect, db_disconnect
  • db_execute_query, db_execute_write
  • db_list_tables, db_describe_table, db_get_table_sample
  • db_explain_query, db_get_database_info
  • db_search_columns, db_get_table_relationships, db_get_access_info

Recommended usage flow

  1. Call help.
  2. Call db_list_environments.
  3. Call db_connect with the target environment name.
  4. Use read tools first (db_execute_query, db_list_tables, db_describe_table).
  5. Use db_execute_write only after explicit approval with confirmed: true.