Back to Home
adrianolaselva icon

dataql

by adrianolaselva

Overview

Query and transform data across multiple formats using SQL, specifically designed for efficient integration with Large Language Models.

Installation

Run Command
dataql mcp serve

Environment 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

Stats

Interest Score0
Security Score3
Cost ClassLow
Avg Tokens500
Stars0
Forks0
Last Update2026-01-19

Tags

CLIData TransformationSQLLLM IntegrationData Analysis