StarRocks

by hagsmand

843 downloads
Not rated
GitHub

About

Enables AI models to interact with StarRocks databases by providing read and write access to tables, schemas, and data through a Python-based server with configurable modes.

Details

Author
hagsmand
Repository
hagsmand/mcp-server-starrocks
Downloads
843
License
MIT License
Categories
AI, Design, Developer Tools, Search, Frontend, Infrastructure, Database

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name StarRocks
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

git clone https://github.com/yourusername/mcp-server-starrocks.git
cd mcp-server-starrocks
pip install -e .

npm install @smithery/sdk @modelcontextprotocol/sdk

read-query

Execute a SELECT query on the StarRocks database. Parameters: query (string)

list-tables

List all tables in the StarRocks database.

describe-table

Describe the schema of a specific table. Parameters: table_name (string)

write-query

Execute an INSERT, UPDATE, or DELETE query on the StarRocks database.

create-table

Create a new table in the StarRocks database. Parameters: query (string)

The server provides the following tools:

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "starrocks": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

StarRocks 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 database
- list-tables: List all tables in the StarRocks database
- describe-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 query
- create-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

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.