MindsDB: the All-in-One MCP Server for Almost Everything

Learn to use MindsDB, an open-source MCP server, to query 200+ sources like Slack and databases with SQL or natural language. This tutorial covers setup, data connection, and AI-powered queries!

Ashley Goolam

Ashley Goolam

26 May 2025

MindsDB: the All-in-One MCP Server for Almost Everything

Are you tired of juggling a dozen tools to make sense of your scattered data? Meet MindsDB, the open-source AI data platform that’s like a superhero for your data chaos. With a built-in Model Context Protocol (MCP) server, MindsDB lets you query over 200 sources—think Slack, Gmail, databases, or even that dusty data warehouse—using plain English or SQL. Boasting 28K+ GitHub stars, it’s a game-changer for building AI apps or just chatting with your data. In this tutorial, I’ll walk you through setting up MindsDB with Docker, connecting a PostgreSQL database, and querying it like you’re texting a friend. Ready to simplify your data game? Let’s dive in!

💡
Still Using MkDocs or Docusaurus? Need to document your APIs? Try APIdog for a sleek, interactive way to create and share API docs—perfect for your MindsDB projects!
button

What is MindsDB? Your Data’s Best Friend

MindsDB is an open-source AI platform that acts as a federated query engine, letting you connect and query data from over 200 sources—databases (PostgreSQL, MySQL), SaaS apps (Slack, Gmail), and more—using SQL or natural language. Its MCP server makes it a unified gateway for AI apps, allowing seamless queries across federated data without moving it. Key features include:

Whether you’re a developer building AI apps or a business analyst digging for insights, MindsDB makes data access a breeze. Let’s get it running

mindsdb

Setting Up Your MindsDB Environment

Before we query data with MindsDB, let’s prep your system. This is beginner-friendly, and I’ll keep it simple.

1. Check System Requirements:

docker

2. Create a Project Folder: Stay organized:

mkdir mindsdb-project
cd mindsdb-project

3. Prepare a Data Source: We’ll use a sample PostgreSQL database provided by MindsDB. No setup needed for this tutorial, but you can connect your own database later (e.g., MySQL, MongoDB).

Installing MindsDB with Docker

Let’s get MindsDB up and running using Docker—the fastest way to start, per the GitHub repo.

1. Pull and Run MindsDB: In your mindsdb-project folder, execute:

docker run -p 47334:47334 -p 47335:47335 --name mindsdb mindsdb/mindsdb

This command:

It takes a few minutes to download. Check it’s running: docker ps. Look for mindsdb/mindsdb.

install mindsdb

2. Access the MindsDB GUI: Open your browser and go to http://127.0.0.1:47334. You’ll see the MindsDB web interface. Log in with the default credentials (username: mindsdb, password: leave blank) or sign up for a new account. If it doesn’t load, ensure the container is running (docker logs mindsdb) and port 47334 is free.

mindsdb interface

Connecting a Data Source to MindsDB

With MindsDB running, let’s connect a sample PostgreSQL database to query some data.

1. Connect the Demo Database: In the MindsDB GUI:

Click “Add Data” or “Connect Data Source” in the sidebar.

Select “PostgreSQL” from the list of 200+ connectors.

Use these parameters for the demo database:

CREATE DATABASE demo_postgres_db
WITH ENGINE = "postgres",
PARAMETERS = {
  "user": "demo_user",
  "password": "demo_password",
  "host": "samples.mindsdb.com",
  "port": "5432",
  "database": "demo",
  "schema": "demo_data"
};

Alternatively, run this SQL in the GUI’s query editor (top-right code icon). Click “Run” or press Ctrl+Enter.

MindsDB fetches data directly from the source, keeping it live without copying.

mindsdb integrations

2. Verify the Connection: In the sidebar, under “Databases,” you’ll see demo_postgres_db. Click it to preview tables (e.g., house_sales). I connected this demo and saw tables with home sale data—perfect for testing!

Querying Data with MindsDB: Natural Language Magic

Now for the fun part—querying data with MindsDB! Let’s use natural language to ask about home sales in the demo database.

1. Run a Natural Language Query:

In the MindsDB GUI, open the query editor.

Type: “What are the average home prices by city in the demo database?”

Click “Run” or hit Ctrl+Enter.

MindsDB translates this to SQL and queries demo_postgres_db. You’ll see a table like:

City Average_Price
Seattle $450,000
Portland $380,000
Austin $420,000

I ran this and got clean results in seconds, way easier than writing SQL joins!

2. Try SQL for Precision: Prefer SQL? Query the same data:

SELECT city, AVG(price) as average_price
FROM demo_postgres_db.house_sales
GROUP BY city;

3. Explore Knowledge Bases: Create a Knowledge Base for RAG:

4. Sample Output:

mindsdb sample output

Exploring MindsDB’s Features

MindsDB is packed with tools to supercharge your data work. Here’s how to make the most of it:

CREATE JOB daily_sales_report AS
SELECT city, AVG(price)
FROM demo_postgres_db.house_sales
GROUP BY city
EVERY 1 day;

Documenting Your APIs with APIdog

Using MindsDB’s MCP server and want to share its APIs? APIdog is a stellar tool for creating interactive API documentation. Its user-friendly interface and self-hosting options make it ideal for documenting your MindsDB workflows—check it out!

apidog documentation

Troubleshooting and Tips

How to Use Browser Tools MCP Server
Learn to set up Browser tools mcp in this tutorial! Automate browser tasks like form filling and data scraping with Cursor IDE—perfect for developers of all levels.

Why Choose MindsDB?

MindsDB is a data nerd’s dream:

I queried Slack and PostgreSQL together and felt like a data superhero—no more late-night ETL runs!

Wrapping Up: Unleash Your Data with MindsDB

You’ve just set up MindsDB, connected a database, and queried data like a pro! With its MCP server, MindsDB makes accessing 200+ sources a breeze, whether you’re building AI apps or hunting insights. Try connecting more sources, building agents, or documenting your APIs with APIdog! Happy querying

button

Explore more

How to Use Amazon EKS MCP Server

How to Use Amazon EKS MCP Server

Discover how to install and use Amazon EKS MCP Server with Cline in VS Code. Create EKS clusters, deploy NGINX, and troubleshoot pods with AI-driven ease!

19 June 2025

What Cursor’s Pro Plan "Unlimited-with-Rate-Limits" Means

What Cursor’s Pro Plan "Unlimited-with-Rate-Limits" Means

Cursor’s Pro plan is now unlimited with rate limits. Learn what that means, how rate limits work, what burst and local limits mean and why users are confused.

19 June 2025

Cursor Pro Plan Goes Unlimited (with Rate Limits)

Cursor Pro Plan Goes Unlimited (with Rate Limits)

Cursor’s new Pro plan promises an unlimited-with-rate-limits model, but what does that really mean? Dive into the details, user concerns, and find out whether it is a smart upgrade or sneaky shift.

19 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs