Back to Home
luiscarbonel1991 icon

nlp2sql

Verified Safe

by luiscarbonel1991

Overview

Converts natural language queries to optimized SQL for enterprise-scale databases, supporting multiple AI providers and robust schema management.

Installation

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

Environment Variables

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • GOOGLE_API_KEY
  • NLP2SQL_DEMO_DB_URL
  • NLP2SQL_LOCAL_DB_URL
  • NLP2SQL_TEST_DB_URL

Security Notes

The server employs good practices by using environment variables for API keys and database URLs and by parameterizing SQL queries in repositories. It cleans LLM output for JSON parsing, but the `QueryGenerationService.validate_sql` relies on the AI provider for validation, which can be a soft spot for robust SQL injection prevention. The `SchemaEmbeddingManager` uses `pickle.load` for metadata, which is a known vulnerability for arbitrary code execution if the local cache files are compromised.

Similar Servers

Stats

Interest Score37
Security Score7
Cost ClassHigh
Avg Tokens1500
Stars9
Forks1
Last Update2025-12-04

Tags

NLPSQL GenerationAIDatabaseEnterpriseMulti-providerSchema ManagementAnalytics