Skip to content

joaoGabriel55/MCP-SQL-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

MCP SQL Server with GPT Chat Interface

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.

Screenshots

image

Project Structure

.
├── server/         # Backend SQLite server
└── gpt-db-chat/   # Frontend React application

Server

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

Setup

First, install Ollama and download the model qwen2.5:latest

ollama run qwen2.5:latest

Feel free to install and use other models

Setup server

cd server
npm install

npm run init:db # Initalize the database

Key files:

  • server.ts - Main server implementation
  • init-db.ts - Database initialization script

GPT DB Chat

The application provides a chat interface for interacting with the SQLite database.

Setup

cd gpt-db-chat
npm install

Key directories:

  • app/ - Core application code
  • app/chat/ - Chat interface implementation
  • app/components/ - Reusable UI components
  • app/infra/ - Infrastructure code including API clients

Run apps

  1. Start the server:
cd server
npm run start
  1. Start the web application:
cd gpt-db-chat
npm run dev

Tech Stack

  • TypeScript
  • Node.js
  • SQLite
  • React
  • Vite
  • React Router

About

A simple chat app and local mcp server to use natural language to make SQL queries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published