Back to Home
luiscarbonel1991 icon

nlp2sql

Verified Safe

by luiscarbonel1991

Overview

Converting natural language queries to optimized SQL for enterprise databases using multiple AI providers.

Installation

Run Command
python /path/to/nlp2sql/mcp_server/server.py

Environment Variables

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • GOOGLE_API_KEY
  • NLP2SQL_DEFAULT_DB_URL
  • NLP2SQL_DEMO_DB_URL
  • NLP2SQL_LOCAL_DB_URL
  • NLP2SQL_TEST_DB_URL
  • NLP2SQL_PROD_DB_URL
  • NLP2SQL_EMBEDDINGS_DIR
  • NLP2SQL_MAX_SCHEMA_TOKENS
  • NLP2SQL_CACHE_ENABLED
  • NLP2SQL_LOG_LEVEL

Security Notes

The server implements robust SQL injection prevention by strictly allowing only SELECT, WITH, and EXPLAIN queries and blocking all DDL/DML operations (INSERT, UPDATE, DELETE, DROP, etc.). It also prevents multiple statements in a single query and enforces row limits to mitigate resource exhaustion. API keys and database credentials are read from environment variables, which is a secure practice. No 'eval' or obvious malicious patterns were found. The primary risk would be from a highly sophisticated bypass of the SQL validation regex, which is a general challenge for such systems.

Similar Servers

Stats

Interest Score37
Security Score9
Cost ClassMedium
Avg Tokens328
Stars8
Forks1
Last Update2026-01-17

Tags

Natural Language to SQLAIDatabase Query GenerationMulti-ProviderEnterprise Analytics