dataql
by adrianolaselva
Overview
Query and transform data across multiple formats using SQL, specifically designed for efficient integration with Large Language Models.
Installation
dataql mcp serveEnvironment Variables
- PGHOST
- PGPORT
- PGUSER
- PGPASSWORD
- PGDATABASE
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_DATABASE
- MONGODB_URI
- MONGODB_DATABASE
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
- AWS_REGION
- AWS_ENDPOINT_URL
- GOOGLE_APPLICATION_CREDENTIALS
- GOOGLE_CLOUD_PROJECT
- AZURE_STORAGE_ACCOUNT
- AZURE_STORAGE_KEY
- AZURE_STORAGE_CONNECTION_STRING
- AZURE_STORAGE_SAS_TOKEN
Security Notes
The system directly executes SQL queries and utilizes file paths (for both input and output) provided by the LLM or user. This design, while enabling powerful functionality, poses significant security risks. Specifically: 1. Arbitrary File Read/Write/Delete: The `source` and `export` parameters allow the tool to read from, write to, and remove arbitrary files on the local file system (e.g., `os.Remove` in export functions). An attacker (or a misbehaving LLM) could craft paths to sensitive system files (e.g., `/etc/passwd`, `/root/.ssh/authorized_keys`) for exfiltration, modification, or deletion, assuming appropriate process permissions. 2. SQL Injection / Local File Exploits: Although SQL queries run against an embedded SQLite database, SQLite has capabilities for file I/O (e.g., `readfile`, `writefile` if extensions are loaded or custom functions are registered). A malicious SQL query could attempt to read or write local files. Additionally, providing connection strings for external databases (PostgreSQL, MySQL, MongoDB) directly from user/LLM input introduces a risk of exploiting vulnerabilities in those database systems or their drivers. 3. Resource Exhaustion: Processing large remote files from URLs or cloud storage (S3, GCS, Azure) specified by an attacker could lead to excessive disk/memory usage. It is critical to run this tool in a tightly sandboxed environment (e.g., a Docker container with restricted volume mounts, limited network access, and a non-privileged user) and only with trusted LLM inputs.
Similar Servers
sqrl
A build tool and CLI for compiling, running, and testing DataSQRL projects, including the deployment of GraphQL, REST, and Micro-Context Protocol (MCP) API servers, Flink stream processing jobs, and database interactions.
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
nlp2sql
Converting natural language queries to optimized SQL for enterprise databases using multiple AI providers.
database-ontology-mcp
Analyzes relational database schemas, generates semantic ontologies (RDF/OWL, R2RML), and provides tools for Text-to-SQL convenience, secure query execution, and data visualization.