Text2sql MCP Server

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

Local serverstdio

What is the Text2sql MCP Server?

Text2sql is an MCP integration. Ask any SQL database in natural language. Agent explores schema, writes SQL, self-corrects.

Packages and local setup

The published pypi package is text2sql-mcp, version 0.1.2. Its declared MCP transport is stdio.

The package declares TEXT2SQL_DATABASE_URL (required): SQLAlchemy connection URL, e.g. sqlite:///mydb.db or postgresql://user:pass@host/db; ANTHROPIC_API_KEY: Anthropic API key (required if using the default Anthropic model); OPENAI_API_KEY: OpenAI API key (required when TEXT2SQL_MODEL is set to an openai: model); TEXT2SQL_MODEL: Optional LangChain model id (default: anthropic:claude-sonnet-4-6).

Before connecting

Check the maintainer’s instructions for account access, authentication and the supported client configuration. Once connected, inspect the tools your client receives and try a small task that matches the server’s stated purpose. The registry description does not include a verified, complete tool list.

Project and source

View the publisher’s registry entry · Project repository. This profile uses version 0.1.2 from the registry. Registration identifies the publisher namespace; it does not establish that this is a first-party integration for every service it connects.

Browse related databases MCP servers for tools that cover the same kind of work.

Configuration

VariableDescriptionRequired
TEXT2SQL_DATABASE_URLSQLAlchemy connection URL, e.g. sqlite:///mydb.db or postgresql://user:pass@host/dbYes
ANTHROPIC_API_KEYAnthropic API key (required if using the default Anthropic model)Optional
OPENAI_API_KEYOpenAI API key (required when TEXT2SQL_MODEL is set to an openai: model)Optional
TEXT2SQL_MODELOptional LangChain model id (default: anthropic:claude-sonnet-4-6)Optional