New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@mcpolyglot/connector-sql

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcpolyglot/connector-sql

Shared SQL connector for mcpolyglot with Postgres, MySQL/MariaDB, and SQLite dialects. Read-only-by-default with per-dialect enforcement.

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
37
-7.5%
Maintainers
1
Weekly downloads
 
Created
Source

@mcpolyglot/connector-sql

SQL connector for mcpolyglot. One package, three dialects: Postgres, MySQL/MariaDB, and SQLite. Read-only by default with per-dialect enforcement at the database boundary.

Tools exposed

For every SQL source mcpolyglot generates:

  • <id>.list_tables — every table across non-system schemas, with columns.
  • <id>.describe_table — one table's columns, types, and primary key.
  • <id>.query — read-only SQL with parameterized args, row cap, and timeout.

(Opt-in per-table tools like users.find_by_email are scaffolded by mcpolyglot init and land fully in Wave 3.)

How read-only is enforced

DialectEnforcement
PostgresBEGIN READ ONLY transaction; rolled back at the end of every call.
SQLitePRAGMA query_only = 1; database opened read-only when possible.
MySQLAST gate (node-sql-parser mysql grammar) + SET SESSION TRANSACTION READ ONLY + MAX_EXECUTION_TIME hint.

The AST gate matters on MySQL because SET TRANSACTION READ ONLY is partially honored — the parser refuses anything whose top-level statement isn't a read.

Drivers are optional deps

The dialect drivers (pg, mysql2, better-sqlite3) are declared as optionalDependencies. Install only what you use.

Docs

MIT licensed.

FAQs

Package last updated on 28 Sep 2026

Related posts