MCP-SQL-Server
by joaoGabriel55
Overview
This server provides a natural language interface to query an SQLite database using a local large language model (Ollama) to convert questions into SQL queries, accessible via a chat-based web application.
Installation
cd server && npm run startSecurity Notes
CRITICAL: The server directly executes SQL queries generated by the Ollama LLM based on user input. This poses a significant SQL injection risk, as a malicious or improperly prompted LLM could generate harmful SQL commands (e.g., DROP TABLE, data manipulation) that would be executed against the database. There are no explicit sanitization or validation layers for the generated SQL before execution. The Ollama host and model are hardcoded, and the server runs on a fixed port. No hardcoded API keys or external secrets were found, but the direct execution of LLM-generated SQL makes it unsafe for environments with untrusted input.
Similar Servers
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
sqlite-mcp
A Model Context Protocol (MCP) server that enables LLMs to interact with SQLite databases by providing tools and resources for querying and managing data.
Little_MCP
A local AI assistant leveraging Retrieval-Augmented Generation (RAG) and multi-tool agents for document Q&A, real-time information, and SQL database interaction.
mcp
Execute MySQL, Redis, ClickHouse, SQLite, and Prometheus database commands and queries through a natural language AI assistant, including support for SSH tunneling.