usql-mcp
Verified Safeby jvm
Overview
Enables AI assistants and other Model Context Protocol (MCP) clients to query a wide range of databases via the usql universal SQL CLI.
Installation
npx usql-mcpEnvironment Variables
- USQL_CONFIG_PATH
- USQL_QUERY_TIMEOUT_MS
- USQL_DEFAULT_CONNECTION
- USQL_BINARY_PATH
- USQL_BACKGROUND_THRESHOLD_MS
- USQL_JOB_RESULT_TTL_MS
- USQL_<CONNECTION_NAME>
- DEBUG
Security Notes
The server implements robust security features including credential sanitization in logs and error messages, and a comprehensive query safety analyzer (`query-safety-analyzer.ts`). This analyzer detects and can block dangerous operations like `DROP`, `TRUNCATE`, and `DELETE`/`UPDATE` without a `WHERE` clause, configurable via settings (`allowDestructiveOperations`, `blockHighRiskQueries`, `blockCriticalRiskQueries`, `requireWhereClauseForDelete`). SQL queries are executed via `child_process.spawn`, which is safer than direct shell execution as it avoids shell injection risks with properly separated arguments. No 'eval' or obvious obfuscation is present in the provided source. Rate limiting is also available to prevent abuse. Overall, strong security practices are in place.
Similar Servers
db-mcp-server
Provides AI assistants with structured access to multiple database systems (MySQL, PostgreSQL, SQLite, TimescaleDB) through the Model Context Protocol (MCP).
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
mcp-use-cli
An interactive command-line interface (CLI) tool for connecting to and interacting with Model Context Protocol (MCP) servers using natural language, acting as an AI client that orchestrates LLM responses with external tools.
mcp-mysql-server
Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.