Back to Home
StarRocks icon

mcp-server-starrocks

by StarRocks

Overview

Acts as a bridge between AI assistants and StarRocks databases for direct SQL execution, database exploration, and data visualization.

Installation

Run Command
uv run mcp-server-starrocks --mode streamable-http --port 8000

Environment Variables

  • STARROCKS_HOST
  • STARROCKS_PORT
  • STARROCKS_USER
  • STARROCKS_PASSWORD
  • STARROCKS_DB
  • STARROCKS_URL
  • STARROCKS_OVERVIEW_LIMIT
  • STARROCKS_MYSQL_AUTH_PLUGIN
  • STARROCKS_FE_ARROW_FLIGHT_SQL_PORT
  • MCP_TRANSPORT_MODE
  • LOG_LEVEL
  • STARROCKS_DUMMY_TEST

Security Notes

The server uses `eval()` for Plotly expressions, although it includes AST-based validation to restrict the expression's complexity. A significant SQL injection risk exists because many SQL queries, particularly in tools like `read_query`, `write_query`, and internal data fetching, are constructed via f-strings and sent without explicit parameterization to the database driver. This is especially problematic if user-controlled input (like query strings or database/table names from an AI agent) is not thoroughly sanitized upstream by the MCP framework or the AI agent itself. The `parse_connection_url` function has a known limitation where an `@` symbol in the password can lead to incorrect parsing, potentially causing connection failures or unintended host connections. Additionally, CORS is configured to `allow_origins=["*"]` by default for HTTP modes, which is insecure for production environments.

Similar Servers

Stats

Interest Score55
Security Score5
Cost ClassMedium
Avg Tokens3000
Stars128
Forks40
Last Update2025-11-24

Tags

StarRocksDatabaseSQLAI AssistantData Visualization