Back to Mindsdb

Starting MindsDB's MCP API

docs/use-cases/mcp_api/mindsdb_mcp_server.mdx

26.1.01.3 KB
Original Source

This sections provides instructions on how to start MindsDB with its MCP API enabled.

Enable MindsDB as an MCP Server

  1. Install MindsDB locally via Docker or Docker Desktop.

  2. The MCP API is enabled by default, as part of the HTTP API, at path /mcp/.

To enable the HTTP API explicitly, you can use the MINDSDB_APIS environment variable:

bash
export MINDSDB_APIS='http,mysql'

Or, specify it when starting MindsDB:

bash
python -m mindsdb --api http,mysql
<Tip> If this is your first time using MindsDB, make sure to [connect your data source](/mindsdb_sql/sql/create/database) and/or [upload files](/mindsdb_sql/sql/create/file), so that you can ask questions over your data as shown in the following steps.

To get you started quickly, use our sample dataset that stores the sales manager data.

sql
CREATE DATABASE sales_manager_data
WITH ENGINE = "postgres",
PARAMETERS = {
    "user": "demo_user",
    "password": "demo_password",
    "host": "samples.mindsdb.com",
    "port": "5432",
    "database": "sales_manager_data"
};
</Tip>
  1. MindsDB's MCP server is available at localhost:47334/mcp/sse.