text2sql

Ask any SQL database in natural language. Agent explores schema, writes SQL, self-corrects.

stdiocommunityapplication

Package Details

Transportstdio

Environment Variables

TEXT2SQL_DATABASE_URL(str)
Required

SQLAlchemy connection URL, e.g. sqlite:///mydb.db or postgresql://user:pass@host/db

ANTHROPIC_API_KEY(str)
Secret

Anthropic API key (required if using the default Anthropic model)

OPENAI_API_KEY(str)
Secret

OpenAI API key (required when TEXT2SQL_MODEL is set to an openai:* model)

TEXT2SQL_MODEL(str)

Optional LangChain model id (default: anthropic:claude-sonnet-4-6)