ai-metabase

AI Assistant for Metabase – Browser Extension

Python FastAPI React TypeScript OpenAI LLM Browser Extension Metabase Chatbot

Overview

This project aims to build a browser extension that embeds an AI-powered chat assistant called Mika directly into the Metabase UI (cloud or on-premise). Mika helps users generate SQL queries, create dashboards, and visualize data using natural language, all without modifying or forking Metabase itself.

Demo Video

Check out a quick demo of Mika in action:

Main Idea

Why This Approach?

Example User Flow

  1. User clicks the floating chat button in Metabase.
  2. User types a request (e.g., “Show me a pie chart of payment methods last month”).
  3. Extension sends the prompt to Mika via the AI backend.
  4. Mika processes the request and returns SQL and visualization instructions.
  5. Extension creates a new question in Metabase via the API, sets the visualization, and returns a link or preview to the user.

Tech Stack

Current Implementation Status

✅ Completed & Working Features

🚦 Testing & Feedback Phase

Note on the .vscode Folder

The .vscode folder in this repository is mainly used for Model Context Protocol (MCP) tools to provide extra context to your AI Agent inside your code editor. Some of these tools are custom made, and others are standard. They are not required for building, running, or using this project. You can safely ignore or remove the .vscode folder if you do not use MCP or AI coding tools.

How to Use (Local/Manual Installation)

You can use the Mika Metabase extension locally without waiting for Chrome Web Store approval. Here’s how to set up and use it step by step:

1. Clone the Repository

git clone https://github.com/osmarbetancourt/ai-metabase.git
cd ai-metabase

2. Start the AI Backend (FastAPI)

You need Python 3.8+ and Docker (recommended) or you can run it directly:

With Docker (recommended):

docker compose up fastapi-backend -d

Or manually:

cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload

The backend will start on http://localhost:8000 by default.

3. Build the Browser Extension

Open a new terminal and go to the extension folder:

cd extension
npm install
npm run build

This will generate a build or dist folder (depending on your setup) inside the extension directory.

4. Load the Extension in Your Browser

For Chrome/Edge:

  1. Go to chrome://extensions (or edge://extensions).
  2. Enable “Developer mode” (top right).
  3. Click “Load unpacked.”
  4. Select the build or dist folder inside extension (not the whole repo).
  5. The Mika Metabase extension should now appear in your browser.

5. Configure the Extension

  1. Click the extension icon in your browser toolbar.
  2. Set the AI Backend URL (e.g., http://localhost:8000) and your Mika API token (if required).
  3. Save your settings.

6. Use Mika in Metabase

  1. Go to your Metabase instance in your browser.
  2. You’ll see the Mika chat widget floating in the bottom right corner.
  3. Click it, ask questions, and Mika will help you generate SQL, create dashboards, and more!

Troubleshooting:


Agents & LLM Orchestration Resources

These resources will help you implement, extend, and maintain the agent logic and LLM orchestration in the backend.

Next Steps