# mcp-server-starrocks

> MCP Server

The StarRocks MCP Server bridges AI assistants and StarRocks databases, enabling direct SQL execution and database exploration without complex setup. It offers tools for querying and resources for database introspection.

## Overview

- **Category:** Database
- **Language:** Python
- **Stars:** 183
- **Forks:** 4
- **Owner:** StarRocks
- **GitHub:** https://github.com/StarRocks/mcp-server-starrocks
- **Created:** 2025-03-05T10:48:25+00:00
- **Updated:** 2025-03-28T11:13:51+00:00
- **Source:** https://model-context-protocol.com/servers/starrocks-ai-assistant-database-sql-server

## Setup

## Setup

MCP server config:

```json
{
  "mcpServers": {
    "mcp-server-starrocks": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp-server-starrocks",
        "mcp-server-starrocks"
      ],
      "env": {
        "STARROCKS_HOST": "default localhost",
        "STARROCKS_PORT": "default 9030",
        "STARROCKS_USER": "default root",
        "STARROCKS_PASSWORD": "default empty"
      }
    }
  }
}
```

If mcp-server-starrocks is not installed as python package(in dev env), can run using local dir:

```json
{
  "mcpServers": {
    "mcp-server-starrocks": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/mcp-server-starrocks",
        "run",
        "mcp-server-starrocks"
      ],
      "env": {
        "STARROCKS_HOST": "default localhost",
        "STARROCKS_PORT": "default 9030",
        "STARROCKS_USER": "default root",
        "STARROCKS_PASSWORD": "default empty"
      }
    }
  }
}
```

## Tools

## Available Tools

1.  `read_query` (Execute a SELECT query or commands that return a ResultSet)
2.  `write_query` (Execute an DDL/DML or other StarRocks command that do not have a ResultSet)
3.  `starrocks:///databases` (Lists all databases in StarRocks)
4.  `starrocks:///{db}/{table}/schema` (Gets the schema of a table using SHOW CREATE TABLE)
5.  `starrocks:///{db}/tables` (Lists all tables in a specific database)
6.  `proc:///{+path}` (System internal information exposed by StarRocks similar to linux /proc)
