Skip to main content
Glama

Database MCP - Natural Language Database Interface

A modern web application that lets you interact with SQL databases using natural language, powered by the Model Context Protocol (MCP).

Features

  • Natural Language Queries: Ask questions in plain English, get results instantly

  • Multi-Database Support: PostgreSQL, MySQL, MariaDB, MSSQL, SQLite

  • Rich Visualizations: Tables, charts, and formatted code blocks

  • Schema Explorer: Browse database structure with an intuitive sidebar

  • Dark & Light Modes: Modern design with light/dark theme support

  • Responsive Design: Works on desktop, tablet, and mobile

Related MCP server: SQLite MCP Server

Prerequisites

  • Node.js 18+

  • A database (PostgreSQL, MySQL, MSSQL, or SQLite)

  • LLM API key (Groq, OpenAI, or compatible endpoint)

Setup & Installation

1. Install Dependencies

npm install

2. Configure Environment

Copy .env.example to .env and update with your credentials:

cp .env.example .env

Then edit .env with:

  • LLM_API_URL: Your LLM API endpoint (e.g., Groq, OpenAI)

  • LLM_API_KEY: Your API key

  • LLM_MODEL: Model name (e.g., mixtral-8x7b-32768)

  • ENCRYPTION_KEY: A 32-character random key for production

3. Run Development Server

npm run dev

The application will start at http://localhost:3000

Available Scripts

npm run dev        # Development with hot reload
npm run build      # Build TypeScript
npm start          # Run production build
npm run demo:setup # Create demo database
npm run demo:run   # Run with demo data
npm test           # Run tests

Supported Databases

Database

Status

PostgreSQL

MySQL / MariaDB

SQL Server

SQLite

Architecture

Web UI → Chat → MCP Tools → Scanner → Database

Key Components:

  • Frontend (public/): Interactive UI with theme support

  • Server (src/server.ts): Express API and MCP

  • Tools (src/mcp/): MCP protocol implementation

  • Providers (src/providers/): Database adapters

  • Scanner (src/scanner/): Database schema analysis

  • Encryption (src/utils/encryption.ts): Credential encryption

License

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables natural language data exploration and visualization for PostgreSQL databases. It allows users to convert questions into SQL queries and interact with data through a Streamlit web interface featuring automated chart generation.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to query databases via natural language using the Model Context Protocol, with automatic schema discovery, SQL query execution, and read-only safety checks.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Translates natural language to SQL/GraphQL queries and executes them, enabling AI agents to interact with databases through the Model Context Protocol.
    1
    Apache 2.0