About StarRocks MCP Server
StarRocks MCP Server connects AI models to StarRocks databases through database inspection and query tools. It supports read-only operation and, when enabled, table creation and data modification.
Key features
- 01Run SELECT queries
- 02List database tables
- 03Inspect table schemas
- 04Create tables when writable
- 05Run INSERT, UPDATE, and DELETE when writable
Use cases
- 01Query StarRocks data
- 02Inspect available tables and schemas
- 03Create tables when read-only mode is off
- 04Modify rows when read-only mode is off
MCP support
It exposes StarRocks database query and management tools to MCP clients. Read-only mode disables table creation and write operations.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEStarRocks MCP Server
A Model Control Protocol (MCP) server for interacting with StarRocks databases. This server provides a standardized interface for AI models to query and manipulate StarRocks databases through a set of defined tools.
Overview
The StarRocks MCP Server allows AI models to:
- Execute SELECT queries on StarRocks databases
- List available tables
- Describe table schemas
- Create new tables (when not in read-only mode)
- Execute write operations like INSERT, UPDATE, DELETE (when not in read-only mode)
Installation
Prerequisites
- Python 3.8+
- StarRocks database instance
- SQLAlchemy
- MCP Python library
Install from source
git clone https://github.com/yourusername/mcp-server-starrocks.git
cd mcp-server-starrocks
pip install -e .
Install from Smithery
npm install @smithery/sdk @modelcontextprotocol/sdk
Using MCP Inspector
npx @modelcontextprotocol/inspector uv --directory ~/mcp-server-starrocks run mcp-server-starrocks
Usage
Starting the server
python -m mcp_server_starrocks.server --host <starrocks-host> --port <starrocks-port> --user <username> --database <database-name> [--password <password>] [--readonly]
Command-line arguments:
--host: StarRocks server host (required)--port: StarRocks server port (default: 9030)--user: StarRocks username (required)--database: StarRocks database name (required)--password: StarRocks password (if required)--readonly: Run the server in read-only mode (optional)
Available Tools
The server provides the following tools:
Read-only tools:
read-query: Execute a SELECT query on the StarRocks databaselist-tables: List all tables in the StarRocks databasedescribe-table: Describe the schema of a specific table
Write tools (available when not in read-only mode):
write-query: Execute an INSERT, UPDATE, or DELETE querycreate-table: Create a new table in the StarRocks database
Examples
Listing tables
{
"name": "list-tables",
"arguments": {}
}
Executing a SELECT query
{
"name": "read-query",
"arguments": {
"query": "SELECT FROM my_table LIMIT 10"
}
}
Describing a table
{
"name": "describe-table",
"arguments": {
"table_name": "my_table"
}
}
Creating a table (when not in read-only mode)
{
"name": "create-table",
"arguments": {
"query": "CREATE TABLE new_table (id INT, name VARCHAR(100))"
}
}
License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.