We created a MCP (Model Context Protocol) based service that uses OpenAI and LangChain agent framework to query interesting data for the user. The agent is able to call tools and resources to figure out what response the user wants. Then if the user requests or the AI decides to make a chart we visualize it using D3.js otherwise it is simply presented as text in our frontend. We are hosting the service publicly so anyone can try it out (while credits last) at vectorquerycorns.org. ############################################### Here are some cool points of our solution: -It understands natural language -It can generate complex SQL queries based on the users request -It can transform, join and filter the tables of the database to produce accurate responses -It can perform complex deduction based on the data in the database and give suggestions to the user if what they are asking is unclear. -It can create pie and bar charts when applicable -It provides clear answers and explanations to the questions -It was designed with modularity in mind so more tools are easily added and more databases and other sources of information can easily be added without much configuration -We host it ourselves, but it can be easily run locally with npm commands or docker ################################################### Our Tech stack: Backend: Python, FastAPI, SQL, MCP Hosting: CloudFlare, DataCrunch, Traefik, Let’s Encrypt, Docker Frontend: Next.js, React, tailwind Visualization: D3.js LLM: OpenAI Agent Framework: LangChain #################################################### Example complex queries 1. Give me a diagram of the 5 most traded products during the first quarter of 1997 and tell how much money was used to trade each product. Give me the amount of money in your answer. 2. Could you make a pie chart that shows the percentage of total revenue generated per product category and give me the percentages in your answer. 3. Which 5 customers had the largest drop in spending between the first half of 1997 compared to the second half of 1997. Present it as a bar chart. (ps. database only has data from 1996 to 1998) ##################################################### Here is the team behind this project: Samuel Schmidt, Juha Ylikoski, Vesa Haaparanta