Utilized for visualizing and documenting the prompt-to-SQL workflow in the application
Integrates with Ollama to translate natural language queries into SQL, enabling non-technical users to query databases without SQL knowledge
Enables querying PostgreSQL databases with both raw SQL and natural language queries, with results available for analysis, charting, and export
Powers the user interface with interactive dashboards for visualizing query results, generating charts, and exporting data to CSV
🚀 MCP-Powered Streamlit Dashboard with Ollama + PostgreSQL
A modern data analysis tool that lets you:
- Query your PostgreSQL database with natural language
- Run SQL manually or generate it using LLMs (Ollama)
- Analyze data with charts, statistics, and export to CSV
🧠 Prompt-to-SQL Flow
📦 Architecture
- Streamlit – UI + charting
- MCP (FastMCP) – Tools/resources for SQL query and table listing
- PostgreSQL – Stores your company data
- Ollama – LLM that translates natural language prompts to SQL
📌 Features
✅ Natural language → SQL
✅ Charting (bar/line/time series)
✅ CSV download
✅ Statistical summary
✅ Prompt explainability with raw output
✅ Auto-detect date/time fields
✅ LLM integration with llama3
(configurable)
🛠️ Getting Started
- Access UI: http://localhost:8501
- MCP API: http://localhost:3333/mcp
⚙️ Env Configuration
📤 Prompt Example
“List departments with average salary > 50000”
👉 Translated to SQL:
Why is this a good use case for MCP?
🔗 MCP makes it dead simple to expose structured tools like SQL queries to LLMs. 🎯 Agents can discover and call your tools without hardcoding logic. 💬 You get the best of both worlds — interpretability, flexibility, and control.
Whether you're building internal tools, research dashboards, or intelligent agents — this pattern is reusable, secure, and 100% local.
📄 License
MIT
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A FastMCP server that enables natural language querying of PostgreSQL databases through LLM integration, allowing users to generate SQL queries from plain English and visualize the results.
Related MCP Servers
- -securityAlicense-qualityFastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.Last updated 6 months ago3PythonMIT License
- -securityFlicense-qualityA FastMCP server that provides natural language interaction with MS SQL databases, enabling users to query data, list tables, describe structures, and execute database operations through a conversational AI interface.Last updated 4 months agoPython
- -securityAlicense-qualityMCP-Server from your Database optimized for LLMs and AI-Agents. Supports PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle Database, SQLite, ElasticSearch, DuckDBLast updated 7 days ago428GoApache 2.0
- -securityAlicense-qualityA FastMCP-based server that enables executing Microsoft SQL Server data queries and table structure queries through a standardized MCP protocol interface.Last updated 2 months ago3PythonMIT License