- Home
- MCP servers
- Metabase
Metabase
- python
14
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Metabase MCP Server connects your Metabase instance to AI assistants through the Model Context Protocol (MCP), enabling natural language access to dashboards, charts, and BI assets. You can ask questions, generate dashboards from descriptions, and manage access and connections through simple MCP client configurations.
How to use
Use the Metabase MCP Server to connect a Metabase instance with any MCP client. Open your MCP client and add the server definition using either a local stdio connection or a remote HTTP connection. Once connected, you can ask questions about dashboards and charts, generate new visuals by describing what you want, and perform common BI actions like listing databases, creating cards, or updating dashboards through natural language prompts.
Practical usage patterns include: creating a new dashboard by describing the metrics you want, querying existing dashboards or cards, listing users or groups, and modifying BI assets through conversational commands. If you run into issues, check the connection settings, validate your Metabase URL and API key, and ensure the MCP transport is accessible from your MCP client.
How to install
Prerequisites: you need a Metabase instance running, Python available, and the uv package manager installed.
Step 1: Install uv Package Manager on your system.
For Windows you can run:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
For macOS or Linux you can run:
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively, install via package managers if you prefer: macOS: brew install uv ; Windows via Scoop: scoop install uv ; Windows via Chocolatey: choco install uv.
# macOS
brew install uv
# Windows (via Scoop)
scoop install uv
# Windows (via Chocolatey)
choco install uv
Step 2: Acquire the MCP server code
Clone the project repository or download the development bundle to your local machine.
# Example clone
git clone https://github.com/codewalnut/metabase-mcp-server.git
cd metabase-mcp-server
Step 3: Install dependencies
Install dependencies and set up a virtual environment using the project’s tooling.
uv sync
Step 4: Configure your Metabase credentials
Configure how the server authenticates with Metabase. You can use a .env file, command-line arguments, or environment variables in your MCP client configuration.
Example using a .env file in the project root:
METABASE_URL=http://localhost:3000
METABASE_API_KEY=mb_xxx_your_key
PORT=3200
HOST=localhost
TRANSPORT=streamable-http
LOG_LEVEL=DEBUG
Step 5: Connect to your MCP client
Choose an MCP client (for example Claude Desktop, Cursor, Windsurf, or others) and add the Metabase MCP server using either a stdio (local) or streamable-http (remote) transport.
stdio transport (local, recommended for development):
{
"mcpServers": {
"metabase": {
"type": "stdio",
"command": "C:\\Users\\YourName\\Projects\\metabase-mcp-server\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\YourName\\Projects\\metabase-mcp-server\\src\\metabase_mcp_server.py"
],
"env": {
"METABASE_URL": "http://localhost:3000",
"METABASE_API_KEY": "mb_xxx_your_key",
"PORT": 3200,
"HOST": "localhost",
"TRANSPORT": "streamable-http",
"LOG_LEVEL": "DEBUG"
}
}
}
}
Step 6: Start the server and test
Run the start command for the local stdio setup and verify the MCP server launches successfully.
If you choose the HTTP transport, you can connect with this remote URL:
{
"mcpServers": {
"metabase": {
"type": "streamable-http",
"url": "http://localhost:3200/mcp/"
}
}
}
Available tools
get_metabase_collection
Get a collection by ID
create_metabase_collection
Create a new collection
update_metabase_collection
Update collection metadata
delete_metabase_collection
Delete a collection
get_metabase_cards
List all charts
get_card_query_results
Get results from a chart query
create_metabase_card
Create a new chart
update_metabase_card
Update an existing chart
delete_metabase_card
Delete a chart
get_metabase_dashboards
List dashboards
get_dashboard_by_id
Get a dashboard by ID
get_dashboard_cards
Get cards in a dashboard
get_dashboard_items
Get all dashboard items
create_metabase_dashboard
Create a dashboard
update_metabase_dashboard
Update a dashboard
delete_metabase_dashboard
Delete a dashboard
copy_metabase_dashboard
Create a copy of an existing dashboard
get_metabase_databases
List databases
create_metabase_database
Create a new database connection
update_metabase_database
Update a database connection
delete_metabase_database
Delete a database connection
get_metabase_users
List all users
get_metabase_current_user
Get current user details
create_metabase_user
Create a new user
update_metabase_user
Update user info
delete_metabase_user
Delete a user
get_metabase_groups
List user groups
create_metabase_group
Create a user group
delete_metabase_group
Delete a user group
execute_sql_query
Execute a native SQL query