
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@cocaxcode/database-mcp
Advanced tools
MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), connection management, schema introspection, query execution with rollback, history, elicitation for destructive ops, and prepared statements. Zero config.
MCP server para conectividad con bases de datos. Multi-DB (PostgreSQL, MySQL, SQLite), gestion de conexiones, introspeccion de schema, ejecucion de queries con rollback e historial.
npm install -g @cocaxcode/database-mcp
Instala el driver que necesites:
# PostgreSQL
npm install -g postgres
# MySQL
npm install -g mysql2
# SQLite
npm install -g sql.js
{
"mcpServers": {
"database": {
"command": "npx",
"args": ["-y", "@cocaxcode/database-mcp"]
}
}
}
{
"mcpServers": {
"database": {
"command": "npx",
"args": ["-y", "@cocaxcode/database-mcp", "--dsn", "postgresql://user:pass@localhost:5432/mydb"]
}
}
}
claude mcp add database-mcp -- npx -y @cocaxcode/database-mcp
| Tool | Descripcion |
|---|---|
conn_create | Crear conexion (PostgreSQL, MySQL, SQLite) |
conn_list | Listar conexiones guardadas |
conn_get | Ver detalles de una conexion (password enmascarado) |
conn_set | Modificar propiedades de una conexion |
conn_switch | Cambiar la conexion activa |
conn_rename | Renombrar una conexion |
conn_delete | Eliminar conexion (requiere confirmacion) |
conn_duplicate | Duplicar una conexion existente |
conn_test | Probar conectividad |
conn_project_list | Listar conexiones asociadas a proyectos |
conn_project_clear | Limpiar conexion activa del proyecto |
| Tool | Descripcion |
|---|---|
search_schema | Buscar tablas, columnas, FK e indices. 3 niveles de detalle: names, summary, full |
| Tool | Descripcion |
|---|---|
execute_query | Ejecutar SELECT (read-only, LIMIT automatico) |
execute_mutation | Ejecutar INSERT/UPDATE/DELETE (captura snapshot para rollback) |
explain_query | Ver plan de ejecucion (EXPLAIN) |
| Tool | Descripcion |
|---|---|
rollback_list | Ver snapshots disponibles |
rollback_apply | Revertir una mutacion (requiere confirmacion) |
| Tool | Descripcion |
|---|---|
history_list | Ver historial de queries con filtros |
history_clear | Limpiar historial |
El servidor expone resources para que agentes AI puedan auto-descubrir el schema:
db://schema — Schema completo de la base activadb://tables/{tableName}/schema — Schema detallado de una tabla (columnas, FK, indices)Esto permite que un agente construya JOINs automaticamente a partir de lenguaje natural.
read-only bloquean mutacionesconfirm: trueconn_get.gitignore~/.database-mcp/ # Conexiones (global)
{proyecto}/.database-mcp/ # Historial y rollbacks (per-project)
La ruta global se puede configurar con la variable de entorno DATABASE_MCP_DIR.
git clone https://github.com/cocaxcode/database-mcp.git
cd database-mcp
npm install
npm test # 88 tests
npm run build # Build con tsup
npm run typecheck # Verificar tipos
MIT
FAQs
MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), connection management, schema introspection, query execution with token-optimized responses, rollback, history, elicitation for destructive ops, and prepared statements. Zero conf
The npm package @cocaxcode/database-mcp receives a total of 137 weekly downloads. As such, @cocaxcode/database-mcp popularity was classified as not popular.
We found that @cocaxcode/database-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.