GitHub Stars
115
User Rating
Not Rated
Favorites
0
Views
24
Forks
34
Issues
1
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Python 3.7以上StarRocks 最新版Installation
Installation
Prerequisites
Required software and versions:Python: 3.7 or higher
StarRocks: Latest version
Installation Steps
1. Clone Repository
bash
git clone https://github.com/StarRocks/mcp-server-starrocks
cd mcp-server-starrocks
2. Install Dependencies
bash
pip install -r requirements.txt
3. Start Server
bash
uv run --with mcp-server-starrocks mcp-server-starrocks
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Python version and reinstall dependencies. Issue: Database connection error Solution: Verify environment variable settings.Configuration
Configuration
Basic Configuration
MCP Server Setup
Edit the following configuration file to specify connection details for the StarRocks MCP server:json
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": ["run", "--with", "mcp-server-starrocks", "mcp-server-starrocks"],
"env": {
"STARROCKS_HOST": "localhost",
"STARROCKS_PORT": "9030",
"STARROCKS_USER": "root",
"STARROCKS_PASSWORD": "",
"STARROCKS_DB": "",
"STARROCKS_OVERVIEW_LIMIT": "20000",
"STARROCKS_MYSQL_AUTH_PLUGIN": "mysql_clear_password"
}
}
}
}
Environment Variables
Set the following environment variables as needed:bash
export STARROCKS_HOST="localhost"
export STARROCKS_PORT="9030"
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Executing SQL Queries
python
import requests
response = requests.post('http://localhost:3000/mcp/call', json={
'tool': 'read_query',
'parameters': {'query': 'SELECT * FROM my_table'}
})
print(response.json())
Data Visualization
python
import requests
import json
response = requests.post('http://localhost:3000/mcp/call', json={
'tool': 'query_and_plotly_chart',
'parameters': {'query': 'SELECT * FROM my_table'}
})
chart_data = response.json()
Use chart_data to plot with Plotly
Use Cases
Using an AI assistant to retrieve real-time information from the database.
Executing SQL queries directly for data analysis and visualizing the results.
Exploring the database schema to aid in application development.
Monitoring internal metrics of the system to optimize performance.
Additional Resources
Related MCPs
mcp-client-for-ollama
215
The mcp-client-for-ollama is a simple yet powerful Python client designed for interacting with Model Context Protocol (MCP) servers using Ollama. This client enables local large language models (LLMs) to utilize tools effectively. It primarily facilitates communication with APIs, streamlining workflows and enhancing the capabilities of LLMs.
LangBot
13398
🤩 Easy-to-use global IM bot platform designed for the LLM era / 简单易用的大模型即时通信机器人开发平台 ⚡️ Bots for QQ / QQ频道 / Discord / WeChat(微信)/ Telegram / 飞书 / 钉钉 / Slack 🧩 Integrated with ChatGPT(GPT)、DeepSeek、Dify、n8n、Claude、Google Gemini、xAI、PPIO、Ollama、阿里云百炼、SiliconFlow、Qwen、Moonshot(Kimi K2)、SillyTraven、MCP、WeClone etc. LLM & Agent & RAG