Local BI Assistant MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local BI Assistant MCP Servershow me monthly sales trends"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local BI Assistant
A fine-tuned local LLM for business intelligence that generates SQL queries from natural language, served via an MCP server.
No API costs. No data leaves your network. Runs entirely on your laptop.
Features
Fine-tuned Mistral 7B trained on your dbt schema and query history
MCP Server with 5 tools: query_data, suggest_visualization, get_insights, explore_schema, execute_sql
Local inference via Ollama - no external API calls
CI/CD integration - automatically retrain when your schema changes
Docker support - one-command setup for training and runtime
Related MCP server: MCPDemo - Visual SQL Chat Platform
Architecture
Quick Start
Option 1: Docker (Recommended)
# Clone the repository
git clone https://github.com/janovincze/local_bi_assistant.git
cd local_bi_assistant
# Start the BI assistant (uses base Mistral model for testing)
docker compose up bi-assistant
# Or with development mode (hot reload)
docker compose --profile dev upOption 2: Local Setup with uv (Recommended for Mac)
uv is a fast Python package installer (10-100x faster than pip).
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and enter directory
git clone https://github.com/janovincze/local_bi_assistant.git
cd local_bi_assistant
# Create venv and install dependencies (with training support)
uv venv
uv sync --extra train-local
# Activate virtual environment
source .venv/bin/activate
# Build dbt models (creates sample database)
cd dbt_project && dbt build && cd ..
# Prepare training data
python -m training.scripts.prepare_data
# Train the model (QLoRA on Mac M4, ~2 hours)
python -m training.scripts.train_local
# Create Ollama model
ollama create bi-assistant -f output/mlx_lora/Modelfile
# Start MCP server
python -m mcp_server.serverOption 3: Local Setup with pip
# Clone and enter directory
git clone https://github.com/janovincze/local_bi_assistant.git
cd local_bi_assistant
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -e ".[train-local]"
# Build dbt models
cd dbt_project && dbt build && cd ..
# Prepare training data
python -m training.scripts.prepare_data
# Train the model (QLoRA on Mac M4)
python -m training.scripts.train_local
# Create Ollama model
ollama create bi-assistant -f output/mlx_lora/Modelfile
# Start MCP server
python -m mcp_server.serverUsing with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"bi-assistant": {
"command": "python",
"args": ["-m", "mcp_server.server"],
"cwd": "/path/to/local_bi_assistant",
"env": {
"DUCKDB_PATH": "./dbt_project/jaffle_shop.duckdb",
"BI_MODEL": "bi-assistant:latest"
}
}
}
}Available Tools
Tool | Description |
| Convert natural language to SQL and execute |
| Recommend chart types for data |
| Generate automated data insights |
| Discover tables and columns |
| Run SQL queries directly |
Training Your Own Model
Model Options
Model | Accuracy | Latency | Best For |
Fine-tuned Mistral | 100% | ~5s | General BI queries, complex reasoning |
Fine-tuned SQLCoder | 94% | ~7s | SQL-heavy workloads |
Base SQLCoder | 88% | ~2.5s | Quick queries, speed priority |
"Senior" Data Engineer* | ~80% | ~29 min | Coffee breaks |
*Based on 20+ interviews. Your fine-tuned 7B model might be their new colleague.
Note: 100% on sample schema; expect 93-95% on complex production schemas.
Train Mistral (Default)
python -m training.scripts.train_local
ollama create bi-assistant -f output/mlx_lora/ModelfileTrain SQLCoder (Alternative)
python -m training.scripts.train_sqlcoder
# Uses MLX with adapters - no Ollama model needed
# Automatically detected by MCP serverFrom Query History
Place your query logs in data/query_history/ in one of these formats:
JSON:
[{"question": "...", "sql": "..."}, ...]JSONL: One JSON object per line
SQL comments:
-- Q: question\n-- A:\nSELECT ...
python -m training.scripts.prepare_data \
--dbt-project ./dbt_project \
--query-logs ./data/query_history \
--output ./data/trainingCI/CD Integration
The included GitHub Actions workflow automatically retrains when:
dbt models change (
dbt_project/models/**)Training code changes (
training/**)
Configure secrets:
HF_TOKEN: Hugging Face API tokenWANDB_API_KEY: Weights & Biases key (optional)
Benchmarking
Compare model performance on your queries:
python scripts/benchmark_models.pyThis tests all available models (Ollama and MLX) against sample queries and reports accuracy and latency.
Memory Requirements
Operation | Memory |
Inference (4-bit) | ~5 GB |
QLoRA Training | ~7 GB |
Full Fine-tuning | ~16 GB (GPU) |
Works on Mac M4 with 24GB RAM.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Ask questions in plain language, get answers from your business database. No SQL required.
1Ask business questions in plain English. Get instant answers from your database, no SQL needed.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to interact with both local SQL Server and Azure SQL Database through natural language, supporting queries, data manipulation, and schema operations with built-in security features.83,3381-
- AlicenseNot gradedqualityDmaintenanceAn AI-driven data visualization and SQL chat platform that enables natural language to SQL conversion, interactive chart generation, and database querying through a comprehensive MCP interface. Supports multiple databases, intelligent chart recommendations, and secure data management with temporary link sharing.3ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and analyze databases using natural language through MCP and HTTP API, supporting 17+ databases and integration with 50+ platforms.115MIT

Atlas MCPofficial
AlicenseNot gradedqualityAmaintenanceEnables natural language querying of SQL databases and REST APIs through the MCP protocol, grounded in a semantic layer.2,8871AGPL 3.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/janovincze/local_bi_assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server