Skip to main content
Glama
SuryaNangunuri31

DB Analytics & Query Platform

DB Analytics + Query Platform (FastAPI)

Project Structure

  • app/main.py: FastAPI app initialization and router registration

  • app/core: config and security helpers

  • app/db: DB engine/session and init

  • app/models: SQLAlchemy ORM models

  • app/schemas: Pydantic request/response schemas

  • app/api/routes: endpoint routes

  • app/services: business logic services

  • app/mcp: MCP integration stubs

  • alembic: migration configuration

Related MCP server: NLSQL MCP Server

Requirements

  • Python 3.10+

  • SQLite

Install dependencies:

pip install -r requirements.txt

Local Run

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Open docs at http://localhost:8000/docs.

Endpoints

  • POST /api/auth/register: create user

  • POST /api/auth/token: login and retrieve JWT

  • GET /api/auth/me: get current user

  • POST /api/connections/test: validate DB connection

  • POST /api/connections: save connection (admin only)

  • POST /api/queries/execute: execute SQL query

  • GET /api/reports/users/total: return user total

  • GET /api/reports/access-logs

  • GET /api/reports/objects/summary

  • GET /api/metrics/performance

  • GET /api/metrics/top-objects

  • GET /api/metrics/frequency

  • POST /api/mcp/run-query

  • GET /api/mcp/schema

Sample Flow

  1. Register admin

curl -X POST "http://localhost:8000/api/auth/register" -H "Content-Type: application/json" -d '{"username":"admin","email":"admin@example.com","password":"password","role":"admin"}'
  1. Get token

curl -X POST "http://localhost:8000/api/auth/token" -H "Content-Type: application/x-www-form-urlencoded" -d "username=admin&password=password"
  1. Use token for protected endpoints

curl -H "Authorization: Bearer <TOKEN>" "http://localhost:8000/api/reports/users/total"

Expected Register Response

Successful registration returns:

HTTP/1.1 200 OK
{
  "id": 1,
  "username": "admin",
  "email": "admin@example.com",
  "role": "admin",
  "is_active": true,
  "created_at": "2026-03-25T12:34:56.789000"
}

If the user exists:

HTTP/1.1 400 Bad Request
{
  "detail": "User already exists"
}

Alembic migrations

alembic revision --autogenerate -m "init"
alembic upgrade head
F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    An open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.
    Last updated
    12
    75
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    An MCP (Model Context Protocol) server that exposes natural language to SQL functionality, allowing any MCP-compatible client to convert plain English questions into SQL queries for database interaction using AI.
    Last updated
    3
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A versatile MCP server that connects to multiple relational databases (MySQL, PostgreSQL, Oracle, SQL Server, SQLite) and enables secure read-only SQL query execution and metadata access.
    Last updated
    4
  • A
    license
    A
    quality
    A
    maintenance
    A read-only MCP server that exposes SQL database access to LLMs, supporting multiple database types, compact columnar results, pagination, and file export.
    Last updated
    6
    28
    MIT

View all related MCP servers

Related MCP Connectors

  • A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud

  • MCP server for managing Prisma Postgres.

  • MCP server for interacting with the Supabase platform

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SuryaNangunuri31/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server