
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
text2sql-mcp
Advanced tools
MCP server for text2sql-framework. Lets any MCP-compatible assistant (Claude Desktop, Cursor, Goose, etc.) ask a SQL database questions in natural language.
MCP server for text2sql-framework. Plugs into Claude Desktop, Cursor, Goose, or any other MCP-compatible assistant and lets it ask a SQL database questions in natural language.
The agent explores the schema, writes SQL, executes it against the real DB, and self-corrects on errors — no RAG layer, no schema descriptions, no pre-computed embeddings.
Out of the box, text2sql-mcp supports SQLite + Anthropic:
pip install text2sql-mcp
# or
uvx text2sql-mcp
For other databases or LLM providers, install with the matching extra so the right driver gets installed:
| You want… | Install command |
|---|---|
| SQLite (default) | uvx text2sql-mcp |
| Postgres | uvx 'text2sql-mcp[postgres]' |
| MySQL | uvx 'text2sql-mcp[mysql]' |
| Snowflake | uvx 'text2sql-mcp[snowflake]' |
| BigQuery | uvx 'text2sql-mcp[bigquery]' |
| OpenAI models | add openai, e.g. uvx 'text2sql-mcp[postgres,openai]' |
Set environment variables in your MCP client config:
| Variable | Required | Description |
|---|---|---|
TEXT2SQL_DATABASE_URL | yes | SQLAlchemy URL, e.g. sqlite:///mydb.db, postgresql://user:pass@host/db |
ANTHROPIC_API_KEY or OPENAI_API_KEY | yes | LLM provider key |
TEXT2SQL_MODEL | no | LangChain model id (default: anthropic:claude-sonnet-4-6) |
TEXT2SQL_INSTRUCTIONS | no | Business rules / hints, e.g. "Revenue = net of refunds." |
TEXT2SQL_EXAMPLES | no | Path to a scenarios.md file for the agent's lookup_example tool |
{
"mcpServers": {
"text2sql": {
"command": "uvx",
"args": ["text2sql-mcp"],
"env": {
"TEXT2SQL_DATABASE_URL": "sqlite:///mydb.db",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
goose configure
# Add Extension → Command-line Extension
# Name: text2sql
# Command: uvx text2sql-mcp
# Env: TEXT2SQL_DATABASE_URL, ANTHROPIC_API_KEY
query(question, max_rows=100) — ask the database a natural-language question. Returns {sql, data, error, row_count, tool_calls_made}.Under the hood this is a thin wrapper around text2sql-framework, which uses LangChain Deep Agents to do iterative tool-calling against a single execute_sql tool. See the framework README for benchmarks (19/20 on Spider zero-shot across 80 tables) and architecture details.
MIT
FAQs
MCP server for text2sql-framework. Lets any MCP-compatible assistant (Claude Desktop, Cursor, Goose, etc.) ask a SQL database questions in natural language.
The pypi package text2sql-mcp receives a total of 27 weekly downloads. As such, text2sql-mcp popularity was classified as not popular.
We found that text2sql-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.