jonortega20
MCP Serverjonortega20public

mcp sql query

A chat-based interface for querying your database using natural language. Built with MCP (Model Context Protocol).

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
JavaScript
Language
-
License

About This Server

A chat-based interface for querying your database using natural language. Built with MCP (Model Context Protocol).

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

DataQuest - Database Query Assistant

A chat-based interface for querying your database using natural language. Built with MCP (Model Context Protocol).

!Preview

Read the full article on Medium here: https://medium.com/@jonortega20/building-a-database-querier-with-mcp-17df0f49a2de

Features

  • Clean, modern UI with responsive design
  • Chat-style interface for natural language database queries
  • Real-time interaction with your PostgreSQL database
  • Supports code block formatting in responses
  • Status indicators and loading animations

Requirements

  • Python 3.11+
  • Flask
  • LangChain OpenAI
  • Postgre MCP

Installation

  1. Clone this repository

  2. Install the required Python packages:

pip install flask flask-cors langchain_openai python-dotenv
  1. Make sure you have MCP installed:
pip install mcp_use
  1. Make sure you have an OpenAI API key and your database connection string in your .env file:
OPENAI_API_KEY=your_api_key_here
DB_LINK=your_database_connection_string_here

Usage

  1. Start the Flask server:
python app.py
  1. Open your browser and navigate to:
http://localhost:5000
  1. Start asking questions about your database!

Example Queries

  • "How many users are in the database?"
  • "Show me a random user's information"
  • "What is the average age of the users?"
  • "What is the percentage of active users?"
  • "How many users are there per country?"

Created By

Jon Ortega

Quick Start

1

Clone the repository

git clone https://github.com/jonortega20/mcp-sql-query
2

Install dependencies

cd mcp-sql-query
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerjonortega20
Repomcp-sql-query
LanguageJavaScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation