Model Context Protocol – MCP is the winner of the MariaDB AI RAG Hackathon integration track

We recently announced the winners of the MariaDB AI RAG hackathon that we organized together with the Helsinki Python meetup group. Let’s deep dive into the integration track winner. David Ramos chose to contribute a MariaDB integration for MCP Server. MariaDB plc was impressed by the results and has picked it up for further development with more features.
David, tell us about yourself and why you decided to join the Hackathon?
I am an aspiring Data Scientist from Colombia. I studied Physics in college, but by the time I graduated, I realized what I enjoyed the most was working with data and programming, so I decided to make the shift to Data Science. Since then I’ve been working on different projects related to things like: predictive maintenance, time series forecasting and large language models. You can check what I have been up to on my LinkedIn.
I joined the hackathon because I saw it as a great opportunity to get hands-on with some concepts and technologies I was reading about, especially RAG and MCP. I was also interested because the hackathon was organised by an open source project like MariaDB. It has been a dream of mine to contribute to open source.
Let’s start, what is MCP?
MCP stands for Model Context Protocol. It’s an open standard released by Anthropic in November 2024 that defines a protocol for connecting language models to external tools, systems, and real-time data sources.
So, it’s like a connector for an LLM to use, for example with MariaDB?
Yes. It’s a lot of work for the database maintainers or framework developers to create integrations with many different databases, APIs, git repositories, command-line tools, and more. MCP offers a simple server and a client architecture to standardize integrations and handle security at the same time. Because MCP is open and extensible, developers can define new tool schemas as needed.
What is a practical example where MCP is used?
MCP is used for example in Cursor AI, an AI-first IDE, where the language model needs to interact with the file system, codebase, or even external documentation in real time. MCP provides a structured way to enable these kinds of contextual extensions in a secure and modular manner.
So what can your MCP-MariaDB integration do?
In my MCP MariaDB integration, I created some tools for an LLM agent to use MariaDB Vector as a vector store. You can create, delete, list the vector stores and do similarity search. These tools can then be used by apps that need vector storage such as AI RAG, semantic search, etc.
The functions you created aren’t exactly the same as for another database, isn’t MCP supposed to be a standard?
There is no exact standard. The LLM figures out what each function can do to meet the user query, so it helps if functions are semantically similar to other integrations.
Take me through the demo you showed at the hackathon!
I made a demo where the user interacts through Claude Desktop. Through my MCP integration, the demo shows how to create a new Vector Store in MariaDB for a RAG use case.
In the demo use case, I used questions from the monthly Python meetup quiz. I asked the LLM to add each question and its answer to a vector store. The LLM, having a description of what each tool in the MCP server does, created a new vector store and added questions to that vector store by calling the appropriate MCP tools. Under the hood, the MCP server creates the embedding using OpenAI’s models and inserts the vectors into the MariaDB database leveraging the Python Connector.
In the usage phase, Claude Desktop can answer the user’s questions with content most relevant for answering the user’s question. How? MCP will use a similarity search in MariaDB Vector for the items closest to the search query, and that text will be given to Claude Desktop to answer the question.
How does Claude Desktop, or MCP know what table columns to use?
The idea is that the LLM figures it out. Regardless if it’s a vector store, or in the future if there is wider support for accessing information from a MariaDB database, the MCP server will offer a tool for checking out the database table schema and with this the LLM will figure out the columns it needs to use for a given query.
How would you restrict MCP to only fetch information meant for the specific user?
This is beyond what I did for the demo, MCP only recently introduced user authentication support, but I’m sure this is the type of thing that will be defined and figured out as the integration is developed further.
Your submission was received well by MariaDB plc – what was it like to contribute to MariaDB?
I got very fast feedback on my pull request from Sergei Golubchik that I implemented, and soon after the pull request was accepted.
This is exciting, I want to try it out!
I submitted my repo as a Pull Request into the MariaDB repo at https://github.com/mariadb/mcp. MariaDB plc is working further on it, so stay tuned for more features to the integration soon.
Great! Thank you David for contributing to MariaDB and sharing more about MCP!