MindsDB Query Engine · Open-source

One SQL dialect across 200+ data sources.

Query databases, SaaS apps, documents, and vector stores through SQL or MCP. Add Knowledge Bases for search, and Jobs or Triggers for updates.

What it does

Three primitives for the data layer.

Register sources, query structured and unstructured data, and keep it current with scheduled or event-driven SQL.

01 · Connect

Query 200+ sources with SQL.

Register databases, SaaS accounts, file stores, and vector databases as sources in MindsDB. Query across them with joins, aggregates, and subqueries. Each connector is an open-source handler.

CREATE DATABASE postgres_prod
WITH ENGINE = 'postgres',
PARAMETERS = {
  "host": "db.internal",
  "user": "readonly",
  "password": "${POSTGRES_PWD}",
  "database": "analytics"
};

SELECT customer_id, total_arr
FROM postgres_prod.accounts
WHERE region = 'EU';
02 · Unify

Search documents as queryable data.

A Knowledge Base chunks and embeds PDFs, Confluence pages, support tickets, and other text. Query it with semantic search, metadata filters, or joins against structured tables.

CREATE KNOWLEDGE_BASE customer_docs
USING
  embedding_model = 'openai.text-embedding-3-small',
  content_columns = ['body'],
  metadata_columns = ['author', 'source_url', 'updated_at'];

INSERT INTO customer_docs
SELECT body, author, source_url, updated_at
FROM s3_bucket.support_pdfs;

SELECT chunk_content, source_url
FROM customer_docs
WHERE content LIKE 'invoice dispute resolution'
  AND author = 'support-team'
LIMIT 5;
03 · Automate

Refresh data with Jobs and Triggers.

Run SQL on a schedule with Jobs, or react to data changes with Triggers. Use them to refresh a Knowledge Base, sync a derived table, or process a new record.

CREATE JOB refresh_docs (
  INSERT INTO customer_docs
  SELECT body, author, source_url, updated_at
  FROM s3_bucket.support_pdfs
  WHERE updated_at > (
    SELECT MAX(updated_at) FROM customer_docs
  )
)
EVERY 1 hour;
How it fits together

One interface between agents and data.

MindsDB sits between agents and the systems where data actually lives. Agents speak SQL or MCP to MindsDB; MindsDB speaks each source's native protocol to fetch, join, and return rows.

Agents
  • AI agents
  • Agent harnesses
  • Any SQL client
  • Any MCP client
MindsDB

Query Engine

  • Federated query
  • Knowledge Bases
  • Jobs & Triggers
  • Models & views
Data sources · 200+
  • Postgres, MySQL, Mongo
  • Snowflake, BigQuery
  • Salesforce, HubSpot
  • S3, GCS, files
  • Pinecone, pgvector
Agents (or any SQL client) connect to MindsDB once. MindsDB dispatches queries to the right handler — Postgres, Snowflake, Salesforce, S3, a Knowledge Base — and returns a unified result set.
200+ integrations

Open-source connectors for 200+ sources.

Each integration is a handler in the MindsDB repository and uses the same SQL interface.

Databases & warehouses

Postgres, MySQL, MongoDB, Snowflake, BigQuery, ClickHouse, Redshift, Databricks

Cloud & SaaS platforms

Salesforce, HubSpot, Stripe, Shopify, Slack, Notion, Jira, GitHub

Documents & file-based systems

S3, GCS, Azure Blob, local files, PDF, HTML, Markdown

Enterprise apps & APIs

SAP, Oracle, NetSuite, ServiceNow, custom REST endpoints

Vector stores & AI infrastructure

Pinecone, Weaviate, Chroma, pgvector, OpenAI, Anthropic, Hugging Face

Knowledge Bases

Build document search with SQL.

Declare an embedding model and metadata columns in a CREATE KNOWLEDGE_BASE statement. MindsDB handles chunking, embedding, storage, updates, and hybrid retrieval.

  • Same SQL surface. Query a Knowledge Base like any table — semantic search via LIKE, structured filters via WHERE.
  • Metadata you choose. Author, source, timestamp, custom tags — used for filtering and explainability.
  • Re-embed automatically. A Job can refresh the index on a schedule; a Trigger can re-embed on row change.
  • Embedding-model neutral. Pick OpenAI, an open model, or a self-hosted endpoint per Knowledge Base.
Unstructured input
PDF MD HTML Confluence
1 Chunk 2 Vectorize 3 Tag with metadata
Queryable table
contentauthorsource
invoice dispute…supports3://docs
refund policy…legalconfluence
onboarding step…cs-teams3://docs
SELECT … WHERE content LIKE '…'
Why agents need this

Give agents one consistent data interface.

Use the same query surface for structured records, documents, and application data.

Reduce the number of tools

Give an agent one SQL or MCP interface instead of a separate tool for every source.

Keep context current

Use Jobs and Triggers to refresh Knowledge Bases and derived tables.

Join records with documents

Combine warehouse rows with relevant document passages in one query.

Use existing access controls

Keep permissions and source-of-truth rules in the systems that own the data.

FAQ

Common questions.

What is MindsDB Query Engine?
It is an open-source SQL query engine for more than 200 databases, warehouses, SaaS apps, document stores, and vector databases. It also provides Knowledge Bases, Jobs, and Triggers.
Is MindsDB still maintained?
Yes. The community maintains the standalone project at github.com/mindsdb/engine.
How is MindsDB different from MindsHub?
MindsDB is a self-hosted data engine that you configure and query with SQL. MindsHub provides MindsHub Inference, a hosted model API, and MindsHub Agents, an agent workspace. MindsDB and MindsHub are separate products from the same team.
How does the query engine compare to a traditional database?
MindsDB does not store the source data. It provides a SQL layer across systems you already run and uses each source's native protocol.
How do AI agents use MindsDB?
Agents connect through SQL or the Model Context Protocol and query connected sources with SELECT statements. MindsDB sends each query to the appropriate source handler.
How do Knowledge Bases work?
A CREATE statement defines the embedding model and metadata columns. MindsDB handles chunking, vectorization, storage, and updates. Query content semantically and filter it with structured metadata.
Can I self-host MindsDB?
Yes. MindsDB runs on Linux, macOS, Windows, and Docker. The source is at github.com/mindsdb/engine.
Which AI models does MindsDB support?
MindsDB is model-neutral. You can plug in Anthropic, OpenAI, Google, Hugging Face, or any self-hosted endpoint — both for embeddings inside Knowledge Bases and for LLM-backed queries. Switching providers is a configuration change, not a rewrite.
Where can I find the documentation?
Docs are at mindsdb.github.io/engine. Source is at github.com/mindsdb/engine. For the hosted product, see mindshub.ai or read /mindshub-vs-mindsdb for the rebrand story.

Want a ready-made agent workspace?

MindsHub Agents combines an agent harness, model routing, credentials, and connected tools in one workspace.