MindsDB MCP server

MindsDB allows applications to answer questions over large-scale federated data—spanning databases, data warehouses, and SaaS applications.
Back to servers
Setup instructions
Provider
MindsDB
Release date
Apr 01, 2025
Language
Python
Stats
37.0K stars

MindsDB provides an MCP (Model Context Protocol) server that enables connecting, unifying, and responding to questions over large-scale federated data sources including databases, data warehouses, and SaaS applications. It allows both humans and AI applications to get accurate answers across diverse data sources.

Getting Started with MindsDB Server

Installation Options

Using Docker Desktop

This is the fastest and recommended way to get started with MindsDB:

  1. Visit the MindsDB Docker Desktop installation guide: Docker Desktop Setup

  2. Follow the instructions to install and configure MindsDB through Docker Desktop

Using Docker

For more flexibility and customization options:

  1. Visit the MindsDB Docker installation guide: Docker Setup

  2. Follow the step-by-step instructions to deploy MindsDB using Docker commands

Core Features and Usage

Connecting Your Data

MindsDB can connect to hundreds of enterprise data sources:

-- Example of connecting to a MySQL database
CREATE DATABASE mysql_connection
WITH ENGINE = 'mysql',
PARAMETERS = {
    "user": "your_user",
    "password": "your_password",
    "host": "your_host",
    "port": 3306,
    "database": "your_database"
};

Visit the data integrations documentation for specific connection details for each supported data source.

Unifying Your Data

MindsDB offers tools to prepare and unify data before generating responses:

Creating Knowledge Bases

-- Example of creating a knowledge base
CREATE KNOWLEDGE BASE my_docs
FROM files
  (PATH = 's3://my-bucket/documents/*.pdf');

Creating Views

-- Example of creating a unified view across different data sources
CREATE VIEW customer_orders AS
SELECT c.customer_id, c.name, o.order_id, o.amount
FROM mysql_db.customers AS c
JOIN postgres_db.orders AS o
ON c.customer_id = o.customer_id;

Responding from Your Data

MindsDB provides mechanisms to get answers from your data:

Configuring Agents

-- Example of creating an agent
CREATE AGENT sales_assistant
USING
  KNOWLEDGE_BASE = 'sales_docs',
  MODEL = 'gpt-4',
  PROMPT_TEMPLATE = 'You are a sales assistant. Answer questions about our products based on the following context: {{context}}. Question: {{question}}';

Using the MCP Interface

The MCP (Model Context Protocol) server is built into MindsDB, allowing applications to connect and get responses from your data.

  1. Connect to the MCP endpoint (typically http://localhost:47334/api/mcp/v1)

  2. Example request to ask a question:

{
  "message": "What were our sales in Q1 2023?",
  "context": {
    "data_sources": ["sales_database", "revenue_reports"]
  }
}

Managing Your MindsDB Server

Checking Server Status

You can check the status of your MindsDB server by accessing:

http://localhost:47334/api/status

Basic Administration

View connected databases:

SHOW DATABASES;

View available models:

SHOW MODELS;

View running jobs:

SHOW JOBS;

Scheduling Automated Tasks

You can automate data synchronization and transformations using jobs:

-- Example of creating a job to refresh a view daily
CREATE JOB refresh_customer_data
BEGIN
  REFRESH VIEW customer_data;
END
START '2023-01-01 00:00:00'
END '2024-01-01 00:00:00'
EVERY 1 DAY;

For more detailed information about using MindsDB's MCP server, visit the MCP documentation.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mindsdb" '{"command":"npx","args":["-y","mindsdb"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mindsdb": {
            "command": "npx",
            "args": [
                "-y",
                "mindsdb"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mindsdb": {
            "command": "npx",
            "args": [
                "-y",
                "mindsdb"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later