Build an MCP Server to Connect to 200+ Data Sources

A unified MCP server for all your data (100% local).

👉
Hey! Enjoy our free data science newsletter! Subscribe below and receive a free data science PDF (530+ pages) with 150+ core data science and machine learning lessons.

TODAY'S ISSUE

TODAY’S DAILY DOSE OF DATA SCIENCE

Build an MCP Server to Connect to 200+ Data Sources

Organizational data lives everywhere—Slack, Gmail, SQL, Drive, and whatnot!

We built an MCP server that can connect to 200+ such data sources, and it is 100% local.

Our tech stack:

  • ​MindsDB​ to power our unified MCP server (31k stars on GitHub).
  • Cursor as the MCP host.
  • Docker to self-host the MCP server.

Here's the workflow:

  • User submits a query
  • Agent connects to the MindsDB MCP server to find tools
  • Agent selects an appropriate tool based on the user query and invokes it
  • Finally, it returns a contextually relevant response

We have added a video below that gives a complete walkthrough of this demo.

0:00
/9:27

The GitHub repo with code and instructions is linked later in the issue.

Implementation details

​​MCP Server to Connect to 200+ Data Sources​​

Now, let's dive into the code!

Docker Setup

MindsDB provides Docker images that can be run in Docker containers.

Install MindsDB locally using the Docker image by running the command in your terminal.

Start MindsDB GUI

After installing the Docker image, go to 127.0.0.1:47334 in your browser to access the MindsDB editor.

Through this interface, you can connect to over 200 data sources and run SQL queries against them.

Integrate Data Sources

Let's start building our federated query engine by connecting our data sources to MindsDB.

We use Slack, Gmail, GitHub, and Hacker News as our federated data sources.

0:00
/0:22

Integrate MCP Server with Cursor

After building the federated query engine, let's unify our data sources by connecting them to MindsDB's MCP server.

Go to: File → Preferences → Cursor Settings → MCP → Add new global MCP server

In the JSON file, add the following 👇

Done! Our MindsDB MCP server is live and connected to Cursor!

The MCP server offers two tools:

  • list_databases: Lists all data sources connected to MindsDB.
  • query: Answers user queries on the federated data.

Apart from Claude and Cursor, the MindsDB MCP server also works with the new OpenAI MCP integration:

The usage of list_databases is depicted below. We asked it to list all the data sources it can access and retrieved the four data sources we connected earlier:

Below is another usage, where we asked it to list the available Slack channels.

While this is quite basic, we have shown a much more sophisticated usage in the video attached at the top.

  • We fetched info from Hacker News.
  • We generated a nicely formatted summary of the fetched details and sent that as a message to Slack.
  • We asked the MCP server to fetch the latest email from Gmail, and it did that:
  • and more.

Watch the video below for a detailed walkthrough:

0:00
/9:27

​You can find the code to reproduce this demo in the GitHub repo →​

Thanks for reading!

THAT'S A WRAP

No-Fluff Industry ML resources to

Succeed in DS/ML roles

At the end of the day, all businesses care about impact. That’s it!

  • Can you reduce costs?
  • Drive revenue?
  • Can you scale ML models?
  • Predict trends before they happen?

We have discussed several other topics (with implementations) in the past that align with such topics.

Here are some of them:

  • Learn sophisticated graph architectures and how to train them on graph data in this crash course.
  • So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches here.
  • Run large models on small devices using Quantization techniques.
  • Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust using Conformal Predictions.
  • Learn how to identify causal relationships and answer business questions using causal inference in this crash course.
  • Learn how to scale and implement ML model training in this practical guide.
  • Learn 5 techniques with implementation to reliably test ML models in production.
  • Learn how to build and implement privacy-first ML systems using Federated Learning.
  • Learn 6 techniques with implementation to compress ML models.

All these resources will help you cultivate key skills that businesses and companies care about the most.

Our newsletter puts your products and services directly in front of an audience that matters — thousands of leaders, senior data scientists, machine learning engineers, data analysts, etc., around the world.

Get in touch today →


Join the Daily Dose of Data Science Today!

A daily column with insights, observations, tutorials, and best practices on data science.

Get Started!
Join the Daily Dose of Data Science Today!

Great! You’ve successfully signed up. Please check your email.

Welcome back! You've successfully signed in.

You've successfully subscribed to Daily Dose of Data Science.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.