Skip to content
MCP server
Registry

text2sql MCP Server

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

text2sql scores 54 (Fair), licensed MIT and written in Python. It installs as a local process. It does not declare tools yet. Filed under Databases. GitHub shows 1 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by cpenniman12MITPython1 stars
Trust score
54Fair
Trust score 54 of 100, Fair

Fair trust

54 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 54 comes from

22 + 10 + 1 + 10 + 4 + 7 = 54. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance10 / 20

How recently the repository saw a commit or release.

Maintenance: 10 of 20 points.
Popularity1 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 1 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "cpenniman12-text2sql-mcp": {      "command": "uvx",      "args": [        "text2sql-mcp"      ],      "env": {        "TEXT2SQL_DATABASE_URL": "",        "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY",        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",        "TEXT2SQL_MODEL": ""      }    }  }}

Environment variables

NameRequiredNotes
TEXT2SQL_DATABASE_URLRequiredSQLAlchemy connection URL, e.g. sqlite:///mydb.db or postgresql://user:pass@host/db
ANTHROPIC_API_KEYSecretOptionalAnthropic API key (required if using the default Anthropic model)
OPENAI_API_KEYSecretOptionalOpenAI API key (required when TEXT2SQL_MODEL is set to an openai:* model)
TEXT2SQL_MODELOptionalOptional LangChain model id (default: anthropic:claude-sonnet-4-6)

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

text2sql-mcp

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.

Install

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
Postgresuvx 'text2sql-mcp[postgres]'
MySQLuvx 'text2sql-mcp[mysql]'
Snowflakeuvx 'text2sql-mcp[snowflake]'
BigQueryuvx 'text2sql-mcp[bigquery]'
OpenAI modelsadd openai, e.g. uvx 'text2sql-mcp[postgres,openai]'

Configure

Set environment variables in your MCP client config:

VariableRequiredDescription
TEXT2SQL_DATABASE_URLyesSQLAlchemy URL, e.g. sqlite:///mydb.db, postgresql://user:pass@host/db
ANTHROPIC_API_KEY or OPENAI_API_KEYyesLLM provider key
TEXT2SQL_MODELnoLangChain model id (default: anthropic:claude-sonnet-4-6)
TEXT2SQL_INSTRUCTIONSnoBusiness rules / hints, e.g. "Revenue = net of refunds."
TEXT2SQL_EXAMPLESnoPath to a scenarios.md file for the agent's lookup_example tool

Claude Desktop / Cursor / generic MCP

{
  "mcpServers": {
    "text2sql": {
      "command": "uvx",
      "args": ["text2sql-mcp"],
      "env": {
        "TEXT2SQL_DATABASE_URL": "sqlite:///mydb.db",
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Goose CLI

goose configure
# Add Extension → Command-line Extension
# Name: text2sql
# Command: uvx text2sql-mcp
# Env: TEXT2SQL_DATABASE_URL, ANTHROPIC_API_KEY

Tools

  • query(question, max_rows=100) — ask the database a natural-language question. Returns {sql, data, error, row_count, tool_calls_made}.

How it works

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.

License

MIT

Frequently asked questions

What is text2sql MCP Server?

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

How do I install text2sql MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. text2sql MCP Server runs locally from the PyPI package text2sql-mcp with the command uvx text2sql-mcp.

Is text2sql MCP Server free and open source?

Yes. text2sql MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does text2sql MCP Server support remote (HTTP) connections?

No remote endpoint is listed for text2sql MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is text2sql MCP Server's trust score calculated?

text2sql MCP Server scores 54 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server