$ account benborla
This is an MCP (Model Context Protocol) server implementation that provides LLMs with MySQL database access. The server exposes a single `mysql_query` tool for executing SQL queries and resources for listing tables and column metadata. It supports both stdio and HTTP transport modes, the latter with bearer token authentication. Key features include multi-database mode (querying across schemas without reconnection), schema-specific write permissions (INSERT/UPDATE/DELETE/DDL per database), SSL/TLS with mTLS, Unix socket connections, and a sophisticated PII redaction system that combines column-name heuristics with regex value scanning and Luhn-verified credit card detection. The architecture is monolithic: a single Express server (or stdio process) manages a mysql2 connection pool and routes all MCP protocol requests through zod-validated schemas. The codebase is well-tested with unit, integration, and end-to-end test suites, and demonstrates careful engineering in areas like query parsing (using node-sql-parser), permission enforcement, and secure defaults (write operations disabled by default).