Metabase
About
Integrates with Metabase to enable querying dashboards, executing SQL, and retrieving structured data for data analysis and insights generation.
Details
- Author
- imlewc
- Repository
- imlewc/metabase-server
- GitHub stars
- 19
- Categories
- Database, AI, Design, Developer Tools, Search, Frontend
- Tags
- #integration
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MetabaseCommand (node, npx, python, etc.)metabase-serverEnvironment-
METABASE_URL
https://your-metabase-instance.com -
METABASE_API_KEY
your_metabase_api_key
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
METABASE_URL
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
export METABASE_URL=https://your-metabase-instance.com
export METABASE_USERNAME=your_username
export METABASE_PASSWORD=your_password
You can set these environment variables in your shell profile or use a .env file with a package like dotenv.
git clone https://github.com/imlewc/metabase-server.git && cd metabase-server && npm i && npm run build && npm link
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
json{
"mcpServers": {
"metabase-server": {
"command": "metabase-server",
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
// Use API Key (preferred)
"METABASE_API_KEY": "your_metabase_api_key"
// Or Username/Password (if API Key is not set)
// "METABASE_USERNAME": "your_username",
// "METABASE_PASSWORD": "your_password"
}
}
}
}
```
list_dashboards
List all dashboards in Metabase.
list_cards
List all questions/cards in Metabase.
list_databases
List all databases in Metabase.
execute_card
Execute a Metabase question/card and get results.
get_dashboard_cards
Get all cards in a dashboard.
execute_query
Execute a SQL query against a Metabase database.
- list_dashboards - List all dashboards in Metabase
- list_cards - List all questions/cards in Metabase
- list_databases - List all databases in Metabase
- execute_card - Execute a Metabase question/card and get results
- get_dashboard_cards - Get all cards in a dashboard
- execute_query - Execute a SQL query against a Metabase database
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"metabase": {
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "your_metabase_api_key"
},
"args": [],
"command": "metabase-server"
}
}
}
Linux
{
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "your_metabase_api_key"
},
"args": [],
"command": "metabase-server"
}
Macos
{
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "your_metabase_api_key"
},
"args": [],
"command": "metabase-server"
}
Windows
{
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "your_metabase_api_key"
},
"args": [],
"command": "metabase-server"
}
A Model Context Protocol server for Metabase integration.
This is a TypeScript-based MCP server that implements integration with Metabase API. It allows AI assistants to interact with Metabase, providing access to:
- Dashboards, questions/cards, and databases as resources
- Tools for listing and executing Metabase queries
- Ability to view and interact with Metabase data
- List and access Metabase resources viametabase://URIs
- Access dashboards, cards/questions, and databases
- JSON content type for structured data access
- list_dashboards- List all dashboards in Metabase
- list_cards- List all questions/cards in Metabase
- list_databases- List all databases in Metabase
- execute_card- Execute a Metabase question/card and get results
- get_dashboard_cards- Get all cards in a dashboard
- execute_query- Execute a SQL query against a Metabase database
Before running the server, you need to set environment variables for authentication. The server supports two methods:
- METABASE_URL: The URL of your Metabase instance (e.g.,https://your-metabase-instance.com).
- METABASE_API_KEY: Your Metabase API key.
- METABASE_URL: The URL of your Metabase instance.
- METABASE_USERNAME: Your Metabase username.
- METABASE_PASSWORD: Your Metabase password.
The server will first check forMETABASE_API_KEY. If it's set, API key authentication will be used. IfMETABASE_API_KEYis not set, the server will fall back to usingMETABASE_USERNAMEandMETABASE_PASSWORD. You must provide credentials for at least one of these methods.
# Required environment variables export METABASE_URL=https://your-metabase-instance.com export METABASE_API_KEY=your_metabase_api_key
# Required environment variables export METABASE_URL=https://your-metabase-instance.com export METABASE_USERNAME=your_username export METABASE_PASSWORD=your_password
You can set these environment variables in your shell profile or use a.envfile with a package likedotenv.
# Oneliner, suitable for CI environment git clone https://github.com/imlewc/metabase-server.git && cd metabase-server && npm i && npm run build && npm link
To use with Claude Desktop, add the server config:
On MacOS:~/Library/Application Support/Claude/claude_desktop_config.jsonOn Windows:%APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "metabase-server": { "command": "metabase-server", "env": { "METABASE_URL": "https://your-metabase-instance.com", // Use API Key (preferred) "METABASE_API_KEY": "your_metabase_api_key" // Or Username/Password (if API Key is not set) // "METABASE_USERNAME": "your_username", // "METABASE_PASSWORD": "your_password" } } } }
Note: You can also set these environment variables in your system instead of in the config file if you prefer.
To install metabase-server for Claude Desktop automatically viaSmithery:
npx -y @smithery/cli install @imlewc/metabase-server --client claude
To install metabase-server for Claude Code CLI:
claude mcp add metabase-server -s user \ -e METABASE_URL="https://your-metabase-instance.com" \ -e METABASE_USERNAME="your-email@example.com" \ -e METABASE_PASSWORD="your-password" \ -- npx -y @imlewc/metabase-server
claude mcp add metabase-server -s user \ -e METABASE_URL="https://your-metabase-instance.com" \ -e METABASE_API_KEY="your-api-key" \ -- npx -y @imlewc/metabase-server
Configuration will be written to~/.claude.json:
{ "mcpServers": { "metabase-server": { "type": "stdio", "command": "npx", "args": ["-y", "@imlewc/metabase-server"], "env": { "METABASE_URL": "https://your-metabase-instance.com", "METABASE_USERNAME": "your-email@example.com", "METABASE_PASSWORD": "your-password" } } } }
If MCP server fails to connect, check the logs:
cat ~/.claude/debug/latest | grep -i metabase
- Environment variables not configured ("env": {}is empty)
- Invalid URL format (must includehttps://)
- Incorrect credentials
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using theMCP Inspector, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
After configuring the environment variables as described in the "Configuration" section, you can manually test the server's authentication. The MCP Inspector (npm run inspector) is a useful tool for sending requests to the server.
- Set theMETABASE_URLandMETABASE_API_KEYenvironment variables with your Metabase instance URL and a valid API key.
- EnsureMETABASE_USERNAMEandMETABASE_PASSWORDare unset or leave them, as the API key should take precedence.
- Start the server:npm run build && node build/index.js(or use your chosen method for running the server, like via Claude Desktop config).
- Check the server logs. You should see a message indicating that it's using API key authentication (e.g., "Using Metabase API Key for authentication.").
- Using an MCP client or the MCP Inspector, try calling a tool, for example,tools/callwith{"name": "list_dashboards"}.
- Verify that the tool call is successful and you receive the expected data.
2. Testing with Username/Password Authentication (Fallback)
- Ensure theMETABASE_API_KEYenvironment variable is unset.
- SetMETABASE_URL,METABASE_USERNAME, andMETABASE_PASSWORDwith valid credentials for your Metabase instance.
- Start the server.
- Check the server logs. You should see a message indicating that it's using username/password authentication (e.g., "Using Metabase username/password for authentication." followed by "Authenticating with Metabase using username/password...").
- Using an MCP client or the MCP Inspector, try calling thelist_dashboardstool.
- Verify that the tool call is successful.
- Invalid API Key:
- SetMETABASE_URLand an invalidMETABASE_API_KEY. EnsureMETABASE_USERNAMEandMETABASE_PASSWORDvariables are unset.
- Start the server.
- Attempt to call a tool (e.g.,list_dashboards). The tool call should fail, and the server logs might indicate an authentication error from Metabase (e.g., "Metabase API error: Invalid X-API-Key").
- EnsureMETABASE_API_KEYis unset. SetMETABASE_URLand invalidMETABASE_USERNAME/METABASE_PASSWORD.
- Start the server.
- Attempt to call a tool. The tool call should fail due to failed session authentication. The server logs might show "Authentication failed" or "Failed to authenticate with Metabase".
- UnsetMETABASE_API_KEY,METABASE_USERNAME, andMETABASE_PASSWORD. Set onlyMETABASE_URL.
- Attempt to start the server.
- The server should fail to start and log an error message stating that authentication credentials (either API key or username/password) are required (e.g., "Either (METABASE_URL and METABASE_API_KEY) or (METABASE_URL, METABASE_USERNAME, and METABASE_PASSWORD) environment variables are required").
Official Airtable MCP server and skills for working with bases, records, workflows, and business operations from AI agents.
MCP Server For Apache Doris, an MPP-based real-time data warehouse.
Official MCP Server from Atlan which enables you to bring the power of metadata to your AI tools
Query Onchain data, like ERC20 tokens, transaction history, smart contract state.
Read and write access to your Baserow tables.
Introspect and query your apps deployed to Convex.
Interact with the data stored in Couchbase clusters using natural language.
Maritime intelligence for tracking vessels, analysing ports, and exploring ship data.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



