MindsDB is an MCP server that enables your MCP applications to answer questions over large-scale federated data spanning databases, data warehouses, and SaaS applications.Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Start MindsDB as an MCP Server
Follow the steps below to use MindsDB as an MCP server.- Install MindsDB locally via Docker or Docker Desktop.
-
Connect your data source and/or upload files to MindsDB in order to ask questions over your data.
Sample Data
You can use our sample dataset that stores the sales manager data. -
Start MindsDB MCP server.
-
Without authentication (suitable for local tools):
-
With PAT authentication (suitable for remote):
Get a Bearer token:Use this token as
Authorization: Bearer <token>in your MCP client. -
With OAuth 2.0 (for enterprise deployments): configure
MINDSDB_MCP_OAUTH_ENABLED=truealong withMINDSDB_MCP_OAUTH_ISSUER_URL,MINDSDB_MCP_OAUTH_CLIENT_ID, andMINDSDB_MCP_OAUTH_CLIENT_SECRET.
-
Without authentication (suitable for local tools):
-
To confirm the MindsDB MCP server is running use
http://127.0.0.1:47334/mcp/status. A successful response means your MCP environment is ready.
MCP Capabilities
Tools
query — Executes SQL queries against MindsDB using MySQL syntax.
Parameters:
query(required): SQL query stringcontext(optional): Dict with default database, e.g.{"db": "my_postgres"}
{"type": "table", "column_names": [...], "data": [...]}— for SELECT results{"type": "ok", "affected_rows": N}— for INSERT/UPDATE/DELETE{"type": "error", "error_code": N, "error_message": "..."}— on failure
Resources
MCP resources expose schema information for discovery:| Resource URI | Description |
|---|---|
schema://databases | Lists all connected data sources |
schema://databases/{db}/tables | Lists tables in a database |
schema://databases/{db}/tables/{table}/columns | Lists columns with types |
schema://knowledge_bases | Lists knowledge bases |
Prompts
sample_table — Generates instructions to fetch 5 sample rows and describe a table’s structure.
Transport Modes
- HTTP (SSE):
http://127.0.0.1:47334/mcp/sse - HTTP (Streamable):
http://127.0.0.1:47334/mcp/streamable - Stdio: run with
--mcp-stdioflag for local stdio-based transport
Configuration
CORS, rate limiting, DNS rebinding protection, and OAuth settings for the MCP server are configured via theapi.mcp section of config.json or the corresponding environment variables. See Extend the Default MindsDB Configuration for the full parameter reference.