This project implements an MCP server to interact with the Metabase API, exposing key functionality via a MCP interface.
- 🔍 List Metabase cards
- 🗄️ List available databases
- 📊 Execute queries on cards
- 🧾 Run arbitrary queries
- 📝 Create new cards
- 🔖 Create bookmark
- 📁 List collections
- Python 3.12+
- uv
- Clone the repository:
git clone https://github.com/cuenca-mx/metabase-mcp-server.git
cd metabase-mcp-server
{
"mcpServers": {
"metabase": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/metabase_mcp_server",
"run",
"app.py"
],
"env": {
"METABASE_URL": "https://metabase.domain.com/",
"METABASE_API_KEY": "your-secret-api-key"
}
}
}
}
This project uses a Makefile to simplify development tasks:
make install
Configure required environment variables:
export $(<env.template)
The project uses pytest
for unit testing:
uv run pytest
Use the MCP Inspector for testing and debugging:
make dev