🚀 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
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-qualityThis is an MCP server for PostgREST. It allows LLMs perform database queries and operations on Postgres databases via PostgREST. This server works with both Supabase projects (which use PostgREST) and standalone PostgREST servers.Last updated -4971,278TypeScriptApache 2.0
- -securityFlicense-qualityA server that enables interaction with PostgreSQL, MySQL, MariaDB, or SQLite databases through Claude Desktop using natural language queries.Last updated -Python
- -securityAlicense-qualityAn MCP server that enables natural language querying of Supabase PostgreSQL databases using Claude 3.7, allowing users to inspect schemas, execute SQL, manage migrations, and convert natural language to SQL queries.Last updated -PythonMIT 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 -Python