Chat with 100+ Big Data Sources with MindsDB Agents and MCP

Chat with 100+ Big Data Sources with MindsDB Agents and MCP

Model-Context Protocol (MCP) is a game-changing technology that's transforming how AI agents interact with information. It allows AI agents to communicate with various systems and analyze data from different sources on the fly, even without the user knowing their exact structure beforehand.

When dealing with large datasets, we encounter numerous challenges due to the limited context windows of LLMs, as well as the adapters and transformations required to simply query the data.

Fortunately, an incredible open-source project called MindsDB can simplify all this. It offers a unified SQL interface over all your data sources, whether they're on S3, BigQuery, Redshift, PostgreSQL, a vector database, or many others.

You can find the whole list of supported data sources here. https://docs.mindsdb.com/integrations/support

One of the most significant updates to MindsDB is its recent native support for AI agents and MCP.

This means you can now query over 200 data sources using just one MCP server.

Any chatbot that supports MCP, like Claude and LibreChat, can use this server to understand your database configurations, discover their structures, and most importantly, query them on demand.

In this blog post, I'll walk you through how to add a customer table (in JSON format) and query it using SQL within the MindsDB UI, and then interact with it on the fly using MCP through Claude Desktop. I'll then demonstrate by asking questions like: "How many customers are in the table?", "How many of them are from a specific city?", or "How many don't have a phone number?"

Let's dive in!

Setting Up MindsDB

Step 1 install mindsdb

To get started, you'll need to run MindsDB using Docker. We'll set up two containers: one for the MCP server and another for the UI.

ai rabbit /tmp/mindsdb $ docker run    -v /tmp/mindsdb:/root/mdb_storage  --name mindsdb_container_mcp -e MINDSDB_APIS='mcp' -e MINDSDB_MCP_ACCESS_TOKEN=abc123 -p 47337:47337     --rm mindsdb/mindsdb
docker run  -v /tmp/mindsdb:/root/mdb_storage --rm  --name mindsdb_container_ui -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

Preparing Your Data

step 2 create the table

First, let's create our JSON table. I used ChatGPT to generate 100 customer records with a structure like this:

Data Privacy | Imprint