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

@danexplore/mcp-mysql

v1.0.2

Published

MCP server for MySQL — connect your database to Claude AI

Readme

mcp-mysql

Setup tool que conecta seu banco MySQL/TiDB ao Claude Code via MCP.

Como usar

1. Rodar o setup

node index.js

Escolha entre CLI (terminal) ou Web (abre em http://localhost:3333).

Informe as credenciais do banco:

  • Host, porta, usuário, senha, nome do banco
  • (Opcional) configuração SSL

O setup vai:

  1. Testar a conexão
  2. Gerar server.js e .env em ~/mcp-mysql/
  3. Instalar dependências (npm install)
  4. Registrar o servidor em ~/.claude/claude.json

2. Reiniciar o Claude Code

Feche e abra o Claude Code para ele carregar o novo MCP.

3. Verificar

No Claude Code, pergunte algo como:

Liste as tabelas do banco

Fluxo simplificado

node index.js
    └─→ coleta credenciais
    └─→ testa conexão
    └─→ gera ~/mcp-mysql/server.js + .env
    └─→ npm install em ~/mcp-mysql/
    └─→ atualiza ~/.claude/claude.json
          └─→ Claude Code inicia node server.js automaticamente

Ferramentas MCP expostas

| Ferramenta | Descrição | |---|---| | list_tables | Lista todas as tabelas | | get_table_schema | Colunas e tipos de uma tabela | | execute_select | Executa SELECT | | execute_write | Executa INSERT, UPDATE ou DELETE |


Desenvolvimento

# Rodar setup via CLI diretamente
node setup.js

# Rodar setup via Web diretamente
node web-ui.js

# Rodar testes
npm test

Estrutura

index.js          # Menu principal (CLI ou Web)
setup.js          # Setup via terminal
web-ui.js         # Setup via navegador
server.js         # Servidor MCP (usado após setup)
lib/
  db.js           # validateSQL, testConnection
  generator.js    # Gera server.js e package.json
  config.js       # Lê/escreve ~/.claude/claude.json
tests/            # 33 testes (node:test)

Segurança

  • Queries validadas: apenas SELECT/INSERT/UPDATE/DELETE permitidos
  • DDL bloqueado: DROP, TRUNCATE, ALTER, CREATE rejeitados
  • Multi-statement bloqueado: ; não permitido
  • Web UI vinculada em 127.0.0.1 (só acesso local)
  • Credenciais em .env (nunca no código)