This project consists of two main components: a MCP server for handling SQLite database operations via Ollama, the easiest way to get up and running with large language models, and a web application for interacting with the database through a chat interface.
.
├── server/ # Backend SQLite server
└── gpt-db-chat/ # Frontend React application
The server component is a TypeScript-based backend application that:
- Handles SQLite database operations
- Provides a REST API for database interactions
- Includes database initialization scripts
First, install Ollama and download the model qwen2.5:latest
ollama run qwen2.5:latestFeel free to install and use other models
Setup server
cd server
npm install
npm run init:db # Initalize the databaseKey files:
server.ts- Main server implementationinit-db.ts- Database initialization script
The application provides a chat interface for interacting with the SQLite database.
cd gpt-db-chat
npm installKey directories:
app/- Core application codeapp/chat/- Chat interface implementationapp/components/- Reusable UI componentsapp/infra/- Infrastructure code including API clients
- Start the server:
cd server
npm run start- Start the web application:
cd gpt-db-chat
npm run dev- TypeScript
- Node.js
- SQLite
- React
- Vite
- React Router