Discover the epic journey of how PeopleWorks GPT evolved from a simple SQLite experiment into a multi-database powerhouse supporting SQL Server, PostgreSQL, MySQL, Oracle, MCP integration, and now exploring legacy database frontiers with Visual FoxPro.
Every great journey begins with a single step. For PeopleWorks GPT, that step was SQLite – the simplest database that taught us the most.
SQLite was our laboratory – a zero-configuration, serverless database that let us focus purely on the AI-to-SQL translation challenge without infrastructure complexity. It taught us that simplicity enables innovation. Every line of code we wrote had to work; there was nowhere to hide mistakes.
With SQLite, we validated our core hypothesis: AI can reliably translate natural language to SQL when given proper schema context. Our SQLite provider achieved 94% accuracy on test queries, proving the concept was not just viable – it was transformative.
SQLite's simplicity forced us to create clean abstractions from day one. The
IDatabaseGptProvider interface was born here – a contract that would
later enable our multi-database revolution. What started as convenience became
our greatest architectural asset.
public class SqliteDatabaseGptProvider(SqliteDatabaseGptProviderConfiguration settings) : IDatabaseGptProvider { private readonly SqliteConnection connection = new(settings.ConnectionString); public string Name => "SQLite"; public string Language => "SQLite"; // The elegance of simplicity: SQLite uses PRAGMA for schema discovery public async Task<IEnumerable<string>> GetTablesAsync(...) { var tables = await connection.QueryAsync<string>(@" SELECT TBL_NAME AS Tables FROM sqlite_schema WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%'"); return tables; } // PRAGMA_TABLE_INFO: SQLite's gift for schema introspection public async Task<string> GetCreateTablesScriptAsync(...) { var query = @" SELECT '[' || NAME || '] ' || UPPER(TYPE) || ' ' || CASE WHEN [NOTNULL] = 0 THEN 'NULL' ELSE 'NOT NULL' END FROM PRAGMA_TABLE_INFO(@table)"; // Build CREATE TABLE script for AI context... } }
From proof-of-concept to enterprise-ready platform – every phase built upon the lessons of the last.
Zero-configuration testing ground. Proved AI could reliably translate natural language to SQL. Established the provider pattern that would scale to enterprise databases.
The enterprise leap. Full T-SQL support with intelligent version detection spanning 17 years of SQL Server releases. Foreign key relationship discovery for intelligent JOINs.
Open source powerhouse. PL/pgSQL dialect support with cloud-native architecture for AWS Aurora, Google Cloud SQL, and Azure PostgreSQL deployments.
Web ecosystem dominance. Complete MySQL dialect support with backtick identifier handling and GROUP_CONCAT for relationship queries.
Enterprise tier completion. PL/SQL optimization with Oracle's unique dual-table queries and ALL_TAB_COLUMNS metadata extraction.
Universal AI bridge. 8 specialized tools exposing DatabaseGPT to any MCP-compatible AI assistant. The "USB-C for AI" architecture.
Data liberation mission. Exploring MCP-powered access to Visual FoxPro, dBASE, and other legacy systems. Decades of institutional knowledge unlocked.
One interface to rule them all. The IDatabaseGptProvider contract enables universal database support without changing application code.
namespace DatabaseGpt.Abstractions; /// <summary> /// The contract that enables universal database support. /// Every database provider must implement these 6 methods. /// </summary> public interface IDatabaseGptProvider : IDisposable { // Identity - What database is this? string Name { get; } // e.g., "SQL Server", "PostgreSQL" string Language { get; } // e.g., "T-SQL", "PL/pgSQL" // Schema Discovery - What tables exist? Task<IEnumerable<string>> GetTablesAsync( IEnumerable<string> includedTables, IEnumerable<string> excludedTables, CancellationToken cancellationToken); // Schema Context - Build CREATE TABLE scripts for AI Task<string> GetCreateTablesScriptAsync( IEnumerable<string> tables, IEnumerable<string> excludedColumns, CancellationToken cancellationToken); // Query Hints - Database-specific optimization tips Task<string?> GetQueryHintsAsync(CancellationToken cancellationToken); // Normalization - Pre-process queries before execution Task<string> NormalizeQueryAsync(string query, CancellationToken cancellationToken); // Execution - Run the generated SQL Task<DbDataReader> ExecuteQueryAsync(string query, CancellationToken cancellationToken); }
Each provider speaks its database's native language while presenting a unified face to the application layer.
| Database | Table Discovery Method | System Schema Exclusion | Identifier Quoting |
|---|---|---|---|
| SQLite | sqlite_schema WHERE type IN ('table','view') |
name NOT LIKE 'sqlite_%' |
[brackets] |
| SQL Server | INFORMATION_SCHEMA.TABLES |
None (user tables by default) | [brackets] |
| PostgreSQL | INFORMATION_SCHEMA.TABLES |
NOT IN ('pg_catalog', 'information_schema') |
[brackets] or "quotes" |
| MySQL | INFORMATION_SCHEMA.TABLES |
NOT IN ('information_schema', 'mysql', ...) |
`backticks` |
| Oracle | ALL_TABLES WHERE owner = USER |
USER filter excludes system | "quotes" or none |
| Feature | SQLite | SQL Server | PostgreSQL | MySQL | Oracle |
|---|---|---|---|---|---|
| Schema Discovery | ✓ | ✓ | ✓ | ✓ | ✓ |
| Column Metadata | ✓ | ✓ | ✓ | ✓ | ✓ |
| Primary Key Detection | ✓ | ✓ | ✓ | ✓ | ✓ |
| Foreign Key Discovery | ✗ | ✓ | ✓ | ✓ | ✓ |
| Schema.Table Support | ✗ | ✓ | ✓ | ✓ | ✓ |
| Type Precision | Basic | Full | Full | Full | Full |
| Query Hints | ✗ | Planned | Planned | Planned | Planned |
From natural language question to executed SQL results – a journey through intelligent processing.
Establish database connection and retrieve available tables using
GetTablesAsync(). Respect inclusion/exclusion filters
to focus the AI on relevant data.
AI analyzes the natural language query against available tables to determine which tables are needed. This step prevents overwhelming the AI with unnecessary schema information.
Build detailed CREATE TABLE scripts via GetCreateTablesScriptAsync(),
including column names, data types, nullability, primary keys, and foreign key
relationships for intelligent JOIN suggestions.
AI generates database-specific SQL using the schema context and database hints. The generated query is optimized for the target dialect (T-SQL, PL/pgSQL, MySQL, PL/SQL).
Validate the generated SQL, normalize if needed via
NormalizeQueryAsync(), then execute with
ExecuteQueryAsync(). Return results through
a standard DbDataReader interface.
The Model Context Protocol Server exposes DatabaseGPT capabilities to any MCP-compatible AI assistant – the "USB-C for AI".
Secure JWT-based authentication with session management
List and manage available database connections
Execute natural language queries with full audit trail
Explore database structure, tables, and relationships
Access and manage database-specific query hints
Get AI-powered question suggestions based on schema
Detailed explanations of generated SQL queries
Advanced analytics and pattern discovery
[McpServerToolType] public sealed class QueryExecutionTool { private readonly SessionManager _sessionManager; private readonly QueryExecutionService _queryExecutionService; private readonly AuditLogger _auditLogger; [McpServerTool(Name = "ExecuteQueryAsync")] [Description("Execute a natural language query against a database")] public async Task<string> ExecuteQueryAsync( [Description("Session token from authenticate()")] string sessionToken, [Description("Database connection ID")] long connectionId, [Description("Natural language query")] string query, [Description("Include hints in context")] bool includeHints = true) { // Validate session var (isValid, userId, _) = _sessionManager.ValidateToken(sessionToken); if (!isValid) return JsonSerializer.Serialize(new { success = false, error = "Invalid token" }); // Execute query through DatabaseGPT infrastructure var (sql, results) = await _queryExecutionService .ExecuteNaturalLanguageQueryAsync(connection, query, includeHints); // Log audit trail await _auditLogger.LogQueryAsync(userId, connectionId, query, sql, ...); return JsonSerializer.Serialize(new { success = true, generated_sql = sql, results = results, row_count = results.Count }); } }
Decades of institutional knowledge locked in legacy databases. MCP opens the door to data liberation.
Millions of records sit in legacy systems like Visual FoxPro, dBASE, and Paradox – systems that powered businesses for decades. Through MCP, we envision giving AI assistants the ability to query these treasure troves of historical data, without requiring migration or modernization.
.DBF + .FPT + .CDX
.DBF Files
.DB Files
.MDB / .ACCDB
.NTX Indexes
Imagine asking Claude: "Show me customer trends from our 1998 FoxPro database compared to current SQL Server data" – and getting instant, unified answers without any migration effort. That's the power of MCP-enabled legacy access.
Experience universal database support firsthand. From SQLite to Oracle, from MCP integration to legacy data liberation – PeopleWorks GPT opens every door.