• PREDICTION
  • MANAGEMENT
  • AUTOMATION
  • HUMAN

How to train and run ML models with your AI

Connect MindsDB to your AI client to turn database tables into predictive tools. You use SQL to manage the entire machine learning lifecycle without writing Python.

Ask AI about this page

Short answer

How can I train and run ML models using my AI?

Your AI sends SQL commands to MindsDB to create predictors and pull real-time forecasts from your data. You get predictive intelligence directly through your chat interface. Here is how the process works.

The outcomes

What you get from your requests

Your AI acts as the bridge between your natural language and the MindsDB engine.

PREDICTION

Live model outputs

The AI runs queries that pull real-time forecasts from your trained predictors. You get immediate answers based on your current data.

MANAGEMENT

Model oversight

The AI checks which predictors are active and ready. You can see the status of your models without manual database checks.

AUTOMATION

SQL-driven training

The AI writes the SQL needed to build new predictors. This turns your existing tables into training sets automatically.

HUMAN

Manual validation

You decide which models are accurate enough to trust. The AI provides the data, but you make the final decision on deployment.

The workflow

What your AI does when you ask for machine learning

The AI translates your intent into specific database operations.

  1. Find existing models

    The AI scans your MindsDB environment to see which predictors are already available for use.

    list_models
  2. Check model status

    The AI pulls specific metadata and configuration details for a particular predictor.

    get_model
  3. Build new predictors

    The AI generates the SQL required to train a new model using your database tables.

    execute_sql_query
  4. Generate forecasts

    The AI sends queries to the database to produce real-time predictions from your models.

    execute_sql_query

Try it

Copy these to start.

Use these prompts to kick off your first ML task.

Starting points

Replace the table and column names with the ones from your actual database.

MindsDB Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_wo8z4btUozCcWNcaSyNerjmMILAoiY0Mm4LOh9m9/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — MindsDB capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "mindsdb-ai-database-predictors-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_wo8z4btUozCcWNcaSyNerjmMILAoiY0Mm4LOh9m9/mcp"
    }
  }
}
Copy into chat04
  • List all the machine learning models in my MindsDB database.

  • Show me the details for the sales_forecast model.

  • Create a new predictor called customer_churn using my users table.

  • Run a prediction for next month's revenue using my sales_forecast model.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect MindsDB once, then ask.

One connection gives your AI direct access to your database's predictive tools. Your credentials stay encrypted on our side.

Connect MindsDB to your AI

FAQ

How this task behaves

  • 01

    Can the AI delete my original data tables?

    No. The AI only has tools to execute queries, list models, and get model details. It cannot perform delete operations on your tables.

  • 02

    Does the AI handle the actual model training math?

    No. The AI sends the SQL command to MindsDB, and MindsDB performs the actual training and computation.

  • 03

    Can I ask the AI to fix a model that is performing poorly?

    The AI can help you identify the model and see its details, but you must decide how to adjust the training parameters in your SQL commands.

  • 04

    Can the AI create new database tables?

    No. The tools are limited to model management and query execution. It cannot alter your database schema.

  • 05

    How does the AI know which models exist?

    The AI uses the list_models tool to scan your MindsDB environment and find available predictors.

  • More questions about MindsDB? The Connector page answers them. See everything the MindsDB Connector can do

Connect MindsDB to Claude, Cursor, ChatGPT & more