metabase-mcp-navi
Provides tools for interacting with Metabase, enabling AI agents to manage dashboards, cards, databases, and execute queries programmatically.
Metabase MCP Server
A Model Context Protocol (MCP) server for Metabase - gives AI assistants direct access to dashboards, cards, and query execution.
Features
Three Authentication Methods: API Key, Session ID, or Username/Password
Dashboard Tools: List, search, get details, get cards from dashboards
Card Tools: List, search, get details, execute saved questions
Database Tools: List databases, tables, get metadata, sync
Query Tools: Execute SQL, test queries, get suggestions, explain queries
Image Export: Export cards and dashboards as PNG images
CRUD Operations: Create, update, delete cards, dashboards, and collections
Quick Start
Installation
# Install via pip
pip install metabase-mcp-navi
# Or via uvx (recommended for MCP)
uvx metabase-mcp-naviConfiguration
Set environment variables:
# Required
export METABASE_URL=https://your-metabase-instance.com
# Authentication (choose one):
export METABASE_API_KEY=your_api_key
# OR
export METABASE_SESSION_ID=your_session_id
# OR
export METABASE_USER_EMAIL=your_email
export METABASE_PASSWORD=your_password
# Optional
export METABASE_VERIFY_SSL=false # Disable SSL verification
export METABASE_TIMEOUT=60 # Request timeout in secondsCursor MCP Configuration
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"metabase": {
"command": "uvx",
"args": ["metabase-mcp-navi"],
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_SESSION_ID": "your_session_id",
"METABASE_VERIFY_SSL": "false"
}
}
}
}Claude Desktop Configuration
Add to your Claude Desktop config:
{
"mcpServers": {
"metabase": {
"command": "uvx",
"args": ["metabase-mcp-navi"],
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_SESSION_ID": "your_session_id"
}
}
}
}Available Tools
Dashboard Tools
Tool | Description |
| List all accessible dashboards |
| Get dashboard details |
| Get all cards from a dashboard |
| Search dashboards by name |
Card Tools
Tool | Description |
| List saved questions |
| Get card details and SQL query |
| Run a saved question |
| Search cards by name |
Database Tools
Tool | Description |
| List connected databases |
| Get database details |
| List tables in a database |
| Get table columns and types |
| Trigger metadata sync |
Query Tools
Tool | Description |
| Execute native SQL |
| Test query with auto LIMIT |
| Get suggested queries for a table |
| Get query execution plan |
Image Tools
Tool | Description |
| Get card as base64 PNG |
| Save card image to disk |
| Check exportable cards |
| Download all dashboard images |
CRUD Tools
Tool | Description |
| Create a new collection |
| Create a new card with SQL |
| Create a new dashboard |
| Add card to dashboard |
| Update card properties |
| Delete a card |
| Delete a dashboard |
Other Tools
Tool | Description |
| Test Metabase connectivity |
| List folders/collections |
| Browse collection contents |
Usage Examples
After configuring, you can ask your AI assistant:
"List all dashboards in Metabase"
"Get dashboard 3301 details"
"Execute card 12345"
"Run this SQL on database 104: SELECT * FROM users LIMIT 10"
"Search for dashboards about 'payments'"
"Create a new card with this query..."
"Download all images from dashboard 42"
Getting Session ID
Open Metabase in your browser and log in
Open Developer Tools (F12)
Go to Application → Cookies
Copy the value of
metabase.SESSION
Project Structure
metabase-mcp-navi/
├── src/
│ └── metabase_mcp_navi/
│ ├── __init__.py # Package initialization
│ ├── __main__.py # Module entry point
│ ├── config.py # Configuration management
│ ├── client.py # Metabase API client
│ ├── models.py # Data models
│ ├── server.py # MCP server setup
│ └── tools/
│ ├── __init__.py # Tools package
│ ├── dashboards.py # Dashboard tools
│ ├── cards.py # Card/question tools
│ ├── databases.py # Database tools
│ ├── queries.py # Query execution tools
│ ├── images.py # Image export tools
│ └── crud.py # CRUD operations
├── pyproject.toml # Package configuration
├── README.md
└── LICENSEDevelopment
# Clone the repository
git clone https://github.com/manish-coder-1007/metabase-mcp-navi.git
cd metabase-mcp-navi
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/License
MIT License - see LICENSE for details.
Author
Manish Balot
Related Projects
trino-mcp-navi - MCP server for Trino databases
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/manish-coder-1007/metabase-mcp-navi'
If you have feedback or need assistance with the MCP directory API, please join our Discord server