OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Text2Sql.net

Text2Sql.Net is an open-source .NET application and MCP server that uses language models, chat history and semantic retrieval to generate SQL from natural-language requests for SQL Server, MySQL, PostgreSQL and SQLite. It includes a Blazor interface, schema and example retrieval, SQL validation, and a workflow that can execute query statements while leaving operation statements for manual execution.

Independent OpenViST project profile, based on linked sources.

Text2Sql.net — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want to explore or query a supported relational database through natural-language requests, either in its Blazor interface or from an MCP-compatible IDE. Its documented workflow can execute query statements and returns operation statements for manual execution.

Who it is for

  • Developers who want natural-language SQL generation within an IDE through MCP.
  • Data analysts exploring supported relational databases with conversational requests.
  • Teams seeking a .NET-based Text-to-SQL project with schema search and editable question-SQL examples.

Documented uses

  • Turn a plain-language request into a database-specific SQL query.
  • Retrieve relevant tables and schema details to provide context for SQL generation.
  • Use chat history to interpret follow-up database questions.
  • Expose schema, query generation and execution tools to an MCP-compatible IDE.
  • Manage reusable question-and-SQL examples, including corrected examples.
Before you choose

Requirements & limits

The project is available as a public GitHub repository under the Apache-2.0 license. Its configuration example requires a language-model API key and endpoint.

  • The README documents four target database types: SQL Server, MySQL, PostgreSQL and SQLite.
  • The application’s supporting configuration can use SQLite or PostgreSQL; the described PostgreSQL vector-store option uses pgvector.
  • The MCP server exposes tools for schema retrieval, SQL generation and execution, among other database tasks.
  • The described workflow automatically executes query statements but leaves operation statements for manual execution.
  • The configuration example includes separate chat and embedding model settings.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Configure Text2Sql.Net database and model settings

Set the documented model-provider and database connection settings for a Text2Sql.Net configuration.

Before you start

  • A model-provider API key.
  • A database choice supported by the configuration example: SQLite or PostgreSQL.

Steps

  1. Set Text2SqlOpenAI.Key to your API key.

  2. Set Text2SqlOpenAI.EndPoint, ChatModel, and EmbeddingModel to the desired provider endpoint and model names; the example shows https://api.antsk.cn/, gpt-4o, and text-embedding-ada-002.

  3. Set Text2SqlConnection.DbType, DBConnection, and VectorConnection for the selected database.

  4. When using PostgreSQL, set VectorSize; the example uses 1536 and notes that SQLite does not require this setting.

Expected outcome

The configuration contains model-provider and database connection settings for the documented SQLite or PostgreSQL setup.

Guide limitations

  • The example provides placeholder credentials and example values, not provider-specific validation or connection-test steps.
  • The configuration example documents SQLite and PostgreSQL; it does not provide setup steps for other database types.
Source-based practical guide

Connect an IDE to the Text2Sql.Net MCP server

Configure an MCP-capable IDE with the documented Text2Sql.Net server entry.

Before you start

  • Text2Sql.Net MCP server available at the configured URL.
  • An IDE that supports MCP, such as Cursor or Trae.

Steps

  1. Add an mcpServers entry named text2sql to the IDE's MCP configuration.

  2. Set the entry's type to sse and its URL to the Text2Sql.Net MCP address, following the documented pattern http://localhost:5000/mcp/sse?connectionId=xxxxxx.

  3. Set the connection ID in the URL to the value for the intended database connection.

  4. After configuration, send a natural-language request in the IDE, such as asking for table structure or recent order data.

Expected outcome

The IDE is configured to connect to Text2Sql.Net's MCP server for natural-language database requests.

Guide limitations

  • The documentation provides a configuration example but no IDE-specific setup instructions or server startup steps.
  • The example URL uses a placeholder connection ID; the correct value must be supplied for the intended connection.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 October 2026
Original website title
shuyu-labs/Text2Sql.Net · Official homepage title · retained in its source language