metabase-mcp-python
Provides tools for querying databases, managing dashboards, and interacting with Metabase instances.
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., "@metabase-mcp-pythonshow last week's revenue by region"
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.
Language: English | Portugues (BR)
metabase-mcp-python
A Python Model Context Protocol (MCP) server for Metabase, enabling AI assistants to query databases, manage dashboards, and interact with your Metabase instance.
Inspired by CognitionAI/metabase-mcp-server (TypeScript). See CREDITS.md for attribution.
Installation
With uv (recommended)
uv tool install metabase-mcp-pythonWith pip
pip install metabase-mcp-pythonFrom source
git clone https://github.com/im-voracity/metabase-mcp-python.git
cd metabase-mcp-python
uv syncRelated MCP server: Metabase MCP Plus
Configuration
Set the following environment variables (or use a .env file):
Variable | Required | Description |
| Yes | Your Metabase instance URL (e.g., |
| One of | Metabase API key for authentication |
| One of | Username for session-based authentication |
| One of | Password for session-based authentication |
You must provide either METABASE_API_KEY or both METABASE_USERNAME and METABASE_PASSWORD.
Usage
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"metabase": {
"command": "uv",
"args": ["tool", "run", "metabase-mcp-python"],
"env": {
"METABASE_URL": "http://localhost:3000",
"METABASE_API_KEY": "your-api-key"
}
}
}
}With session authentication:
{
"mcpServers": {
"metabase": {
"command": "uv",
"args": ["tool", "run", "metabase-mcp-python"],
"env": {
"METABASE_URL": "http://localhost:3000",
"METABASE_USERNAME": "user@example.com",
"METABASE_PASSWORD": "your-password"
}
}
}
}Claude CLI
{
"mcpServers": {
"metabase": {
"command": "uv",
"args": ["tool", "run", "metabase-mcp-python", "--write"],
"env": {
"METABASE_URL": "http://localhost:3000",
"METABASE_API_KEY": "your-api-key"
}
}
}
}Running from source
{
"mcpServers": {
"metabase": {
"command": "uv",
"args": ["run", "--directory", "/path/to/metabase-mcp-python", "metabase-mcp"],
"env": {
"METABASE_URL": "http://localhost:3000",
"METABASE_API_KEY": "your-api-key"
}
}
}
}Tool Filtering Modes
The server supports three modes to control which tools are exposed to the AI assistant:
Mode | Flag | Tools | Description |
Essential |
| ~19 | Core read operations for querying and exploring |
Write |
| ~59 | Essential + create, update, and delete operations |
All |
| ~87 | Every available tool including advanced operations |
Examples:
metabase-mcp # Essential mode (default)
metabase-mcp --write # Essential + write tools
metabase-mcp --all # All toolsThe essential mode is the default to keep the tool list manageable and reduce the risk of unintended modifications. Use --write or --all when you need to create or modify Metabase resources.
Available Tools
Tools are organized into five categories:
Database (13 tools) -- List, inspect, create, and manage database connections; execute SQL queries
Table (17 tools) -- Browse tables, inspect schemas, manage field metadata, import/export CSV
Card (21 tools) -- CRUD for saved questions, execute queries, manage public links, move cards
Dashboard (27 tools) -- CRUD for dashboards, manage cards/layout, filters audit, public links
Additional (9 tools) -- Collections, search, users, playground links
See docs/tools-reference.md for the complete tool listing.
Development
Setup
git clone https://github.com/im-voracity/metabase-mcp-python.git
cd metabase-mcp-python
uv sync --group devTesting
uv run pytest
uv run pytest -m "not integration" # Skip integration testsLinting and type checking
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy srcArchitecture
See docs/architecture.md for a detailed overview of the codebase structure, request flow, and authentication system.
License
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 Servers
- Flicense-qualityDmaintenanceA Model Control Protocol server that enables AI assistants to interact with Metabase databases, allowing models to explore database schemas, retrieve metadata, visualize relationships, and execute actions.Last updated7
- AlicenseAqualityCmaintenanceAn MCP server that enables AI assistants to query databases, execute SQL, and manage Metabase resources like dashboards, cards, and collections through natural language.Last updated22MIT
- AlicenseAqualityDmaintenanceA MCP server for Metabase that gives AI assistants direct access to dashboards, cards, and query execution.Last updated331MIT
- Alicense-qualityDmaintenanceMCP server for Metabase that gives AI agents full access to query, explore, and manage content in your Metabase instance.Last updated171MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
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/im-voracity/metabase-mcp-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server