Follow along with the video if you prefer
This tutorial covers:- Running the database in shared-data mode (1 FE + 1 CN) and MinIO in Docker
- Creating an S3 (MinIO) storage volume for separate storage and compute
- Loading the Olist Brazilian E-Commerce dataset (8 related tables)
- Wiring the database and AIStor MCP servers to Claude
- Asking Claude plain-English questions and rendering charts
Prerequisites
Docker
- Docker (Docker Desktop or engine + compose)
- ~4 GB RAM assigned to Docker
MySQL client
A MySQL client (e.g.mysql) to run the SQL files. This is provided by the database FE server, so all of the SQL commands in this guide are run with docker compose exec.
uv
uv runs the StarRocks MCP server.
Claude Code or Claude Desktop
Claude Code or Claude Desktop connects the MCP servers. Tip This demo includes steps using Claude Code. Other LLMs work with MCP servers, but this demo has only been tested with Claude Code. Please open an issue and let us know what you experience with other LLMs.The Olist dataset
The Olist dataset is downloaded automatically when you load the data viakagglehub (no Kaggle account needed): https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce.
Note
Apple Silicon: the database leans on AVX2 (x86); use an ARM build or expect slower emulation.
A MinIO AIStor license
The instructions for acquiring a free tier license will be provided after you clone the demo repository.Terminology
MCP
The Model Context Protocol (MCP) is an open protocol that lets an AI assistant such as Claude discover and call external tools. This tutorial wires up two MCP servers:- The StarRocks MCP server (
mcp-server-starrocks) exposes tools that let Claude read the schema and run SQL against the database. - The AIStor MCP server (
aistor) exposes tools that let Claude work with the MinIO object storage where the data lives — for example, browsing buckets and inspecting the objects the database writes.
FE
Frontend nodes are responsible for metadata management, client connection management, query planning, and query scheduling.CN
Compute Nodes are responsible for executing query plans in shared-data deployments.Install the prerequisites
uv
uv installation guide for other options. After installing, verify it is on your PATH:
Docker
https://www.docker.com/get-started/Claude Code
https://claude.com/product/claude-codeClone the demo repo
Clone https://github.com/StarRocks/demo:Acquire a MinIO AIStor license
MinIO AIStor requires a license to run. You can use an existing license, or you can request a new MinIO AIStor Free Tier license. To request a new MinIO AIStor Free Tier license, go to the MinIO AIStor pricing page and select Get Started under the Free tier to obtain a free license. The free tier license allows you to run MinIO AIStor on a single compute resource with one or more drives. Save the license file asminio.license in the same directory as the docker-compose.yml file. The Docker Compose file mounts minio.license into the MinIO AIStor container. Without a valid license, MinIO AIStor starts but denies all S3 operations.
For this tutorial, that is the demo/documentation-samples/MCP directory in your local clone of the StarRocks/demo repository.
Bring up the database and MinIO
Create a bucket in MinIO
Open the MinIO console at http://localhost:9001 (loginminiouser / M!n10R0cks), click Add Bucket, and create the bucket my-starrocks-bucket.
Create the storage volume
The filestorage_volume.sql creates a database storage volume in the bucket you created in the previous step and sets it as the default. The contents of the file are explained in detail at the end of this tutorial; for now, run it:
CREATE TABLE.
Create the tables
The specified bucket does not exist you may have skipped part of the previous step. Open the MinIO UI and create the bucket specified above.
Tip
This is a good time to try out the MCP server. Start Claude Code from the current directory and allow the two MCP servers (aistor and mcp-server-starrocks), then ask Claude to list the databases and describe the schema in the olist DB.
Load the data
Download the Olist CSVs from Kaggle with kagglehub — anonymous, no Kaggle account or API token required. It caches the files locally and prints the folder they landed in. Download the data and capture the folder it landed in asCSV_DIR. kagglehub prints a version warning to stdout, so take the last line (the path) with tail -n1:
kagglehub==0.3.12 pin is deliberate: newer releases (1.0.x) pull a kagglesdk build that fails to import (ModuleNotFoundError: kagglesdk.competitions.legacy). 0.3.12 downloads public datasets anonymously and works fine. kagglehub caches the files, so re-running is cheap.
Then run the loader (CSV_DIR is already exported):
FE_HTTP_PORT=8040 posts Stream Load straight to the CN, avoiding a starrocks-cn hostname redirect (no /etc/hosts edit / no sudo needed). The script prints a row-count check at the end.
Wire the MCP servers to Claude
.mcp.json defines two MCP servers — mcp-server-starrocks (run from GitHub via uv, so there’s nothing to install by hand) and aistor (run via Docker) — both reading .env. Launch Claude Code from this directory (or add the same block to Claude Desktop’s config).
Note
Approve the servers on first launch. Project-scoped servers from .mcp.json are not trusted automatically — Claude Code prompts “New MCP servers found — approve?” the first time you launch here. Accept it. (The pre-approval lives in .claude/settings.local.json, which is gitignored, so it is absent on a fresh clone — that’s expected; approving via the prompt recreates it.)
Confirm the connection with /mcp. Run /mcp inside Claude Code and check that both mcp-server-starrocks and aistor show connected. This is the authoritative status check — if a server isn’t connected, its tools won’t load no matter how you ask.
First launch is slow. The first uv run downloads the server’s dependencies (pyarrow, kaleido, …, ~115 MB), so the server can take a couple of minutes to come up the first time. Subsequent launches are fast.
Once /mcp shows both servers connected, confirm the tools are available (e.g. ask “What tools does the StarRocks MCP server provide?”).
The cluster is reachable over the MySQL protocol as root (no password) at localhost:9030, database olist.
Ask questions
Ask Claude plain-English questions about the data — start by having it orient itself, e.g. “What tables are in this database, and how do they relate to each other?”, then explore from there. Claude inspects the live schema and writes the SQL itself.Suggested questions
These are the questions asked in the demo video, in order. Each one builds on the last — start with the first to let Claude orient itself, then work down:- What databases and tables are in here?
- How do these tables fit together?
- Where does this data actually live?
- Plot orders by customer state.
- Does it cost more to ship things farther?
- Add a second line — freight per kilo — to separate weight from distance.
- How did you build that query?
- Do late deliveries hurt our reviews?
- Are you using canned answers, or did every number come from the live tables?
DEMO_Output/ (set by STARROCKS_CHART_OUTPUT_DIR in .env), with a static preview shown inline — open the HTML file in a browser to hover / zoom / pan.
Troubleshooting
- StarRocks MCP tools never load / server “still connecting”: the project servers were never approved. Run
/mcp— if they aren’t connected, relaunch Claude Code from this directory and accept the “New MCP servers found — approve?” prompt (or add"enabledMcpjsonServers": ["mcp-server-starrocks", "aistor"]to.claude/settings.local.json). You do not need to install the server separately —.mcp.jsonruns it from GitHub viauv. - First launch takes a couple of minutes: the first
uv rundownloads the server’s deps (~115 MB). This is expected once, not a failure. mysqlclient fails withAuthentication plugin 'mysql_native_password' cannot be loaded: a Homebrewmysql-client quirk, not a database problem. Query through the container instead:docker compose exec -T starrocks-fe mysql -h127.0.0.1 -P9030 -uroot -e "SHOW DATABASES;".CREATE TABLEhangs / times out: the CN’s AWS SDK is probing the EC2 metadata service. The compose file already setsAWS_EC2_METADATA_DISABLED=trueonstarrocks-cn; if you use your own compose file, add it.- Stream Load redirect errors: use
FE_HTTP_PORT=8040(as above) to post to the CN directly, or add127.0.0.1 starrocks-cnto/etc/hosts. order_reviewsrejects rows: the free-text comment columns contain embedded newlines; use the LEAN variant noted inload_olist.sh.
Summary
In this tutorial you:- Deployed the database shared-data (1 FE + 1 CN) and MinIO in Docker
- Created an S3 (MinIO) storage volume and set it as the default
- Loaded the Olist Brazilian E-Commerce dataset (8 related tables)
- Wired the database and AIStor MCP servers to Claude
- Asked Claude plain-English questions and let it discover the schema, write the SQL, and render charts
- StarRocks MCP server: https://github.com/StarRocks/mcp-server-starrocks
What’s in here
The demo files live in thedocumentation-samples/MCP directory of the StarRocks/demo repo:
Notes on storage_volume.sql
storage_volume.sql does two things: it raises a timeout, then creates and activates the storage volume.
First it increases the timeout for tablet creation and creates the storage volume:
More information
- The database shared-data quick start — shared-data
- StarRocks MCP server — https://github.com/StarRocks/mcp-server-starrocks
- AIStor MCP server — https://github.com/minio/mcp-server-aistor
- Olist dataset — https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce
Credits & license
- Olist Brazilian E-Commerce dataset via Kaggle, licensed CC BY-NC-SA 4.0 (non-commercial) — used here for educational demonstration; credit retained to Olist. Confirm terms before any commercial reuse.
- The database and the StarRocks MCP server are open source (Apache-2.0 / project license).
- MinIO and
mcp-server-aistor© MinIO, Inc.