starrocks-mcp

starrocks-mcp

A read-only MCP server that enables users to query and explore StarRocks databases through AI assistants like Claude. It supports SQL execution, schema discovery, and secure LDAP authentication for data analysis and metadata exploration.

Category
Visit Server

README

starrocks-mcp

Python 3.10+ License: MIT

A read-only MCP (Model Context Protocol) server for StarRocks databases. Query and explore your StarRocks data through Claude and other AI assistants.

Features

Supported ✅

  • SQL Query Execution
    • Execute SQL queries directly from Claude Desktop
    • Automatic result truncation for large datasets
  • Table Operations
    • List all databases
    • List tables in a database
    • Get table schema details
  • LDAP Authentication
    • Secure LDAP authentication support
    • Each user uses their own credentials

Not Supported ❌

  • Data Ingestion
  • Table/Schema Creation or Modification
  • User/Permission Management

Tools

Tool Description
execute_query Execute a SQL query and return results
list_databases List all databases in StarRocks
list_tables List tables in a database
describe_table Get detailed schema information for a table

Installation

Using uvx (Recommended)

uvx --from git+https://github.com/jason-ung/starrocks-mcp starrocks-mcp

Using pip

pip install git+https://github.com/jason-ung/starrocks-mcp
starrocks-mcp

Configuration

Environment Variable Required Default Description
STARROCKS_HOST Yes - StarRocks host
STARROCKS_PORT No 9030 StarRocks port
STARROCKS_USER Yes - Your LDAP username
STARROCKS_PASSWORD Yes - Your LDAP password
STARROCKS_DATABASE No ads Default database
LOG_LEVEL No INFO Logging level
DEFAULT_QUERY_TIMEOUT_MS No 30000 Default query timeout (ms)
MAX_QUERY_LENGTH No 10000 Maximum SQL query length

Claude Desktop Setup

Add to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "starrocks": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jason-ung/starrocks-mcp",
        "starrocks-mcp"
      ],
      "env": {
        "STARROCKS_HOST": "starrocks.datapl.datahou.se",
        "STARROCKS_PORT": "9030",
        "STARROCKS_USER": "your.ldap.username",
        "STARROCKS_PASSWORD": "your_ldap_password",
        "STARROCKS_DATABASE": "ads"
      }
    }
  }
}

⚠️ Important: Replace your.ldap.username and your_ldap_password with your actual LDAP credentials.

Usage Examples

User: Show me all databases in StarRocks

Claude: [Uses list_databases]
- ads
- search
- user_behavior
User: What tables are in the ads database?

Claude: [Uses list_tables with database="ads"]
- advtr_product_da_preprocessed_log
- advtr_product_sa_preprocessed_log
- campaign_budget
User: Describe the advtr_product_da_preprocessed_log table

Claude: [Uses describe_table with table="advtr_product_da_preprocessed_log"]
Field | Type | Description
----- | ---- | -----------
eventTs | BIGINT | Event timestamp
eventType | VARCHAR | Event type (IMPRESSION, CLICK, etc.)
...
User: Query the top 10 campaigns by impression count

Claude: [Uses execute_query]
SELECT campaignId, COUNT(*) as impression_count
FROM advtr_product_da_preprocessed_log
WHERE eventType = 'IMPRESSION'
  AND base_dt = '2026-01-29'
GROUP BY campaignId
ORDER BY impression_count DESC
LIMIT 10

Development

Local Setup

git clone https://github.com/jason-ung/starrocks-mcp.git
cd starrocks-mcp

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"

# Copy .env.example to .env and configure
cp .env.example .env
# Edit .env with your credentials

# Run the server
starrocks-mcp

Testing Connection

# Test StarRocks connection
mysql -h starrocks.datapl.datahou.se -P 9030 -u your.username -p --ssl-mode=DISABLED --enable-cleartext-plugin

Security

  • Never commit credentials: Always use environment variables for sensitive data
  • Use personal LDAP accounts: Each user should use their own credentials
  • LDAP authentication: Supports cleartext LDAP authentication over secure connections
  • Read-only operations: This MCP server only supports SELECT queries and metadata operations

License

MIT License - see LICENSE for details.

Author

Jason Son (@jason-ung)


Made with ❤️ for Bucketplace Ads Team

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured