metabase-mcp-agents
Provides tools for querying databases, exploring schemas, managing dashboards and saved questions, and searching Metabase content via the Metabase API.
Click on "Deploy 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-agentsWhat tables are in the database?"
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.
metabase-mcp
MCP server for Metabase — gives AI agents full access to query, explore, and manage content in your Metabase instance.
Works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, etc.
Quick Start
npx metabase-mcp-agentsThat's it. No clone, no build. Just add it to your MCP config with the right env vars.
Related MCP server: superset-mcp
Configuration
Claude Code
Add to .mcp.json (project-level) or ~/.claude/settings.json (global):
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-mcp"],
"env": {
"METABASE_URL": "https://your-metabase.example.com",
"METABASE_API_KEY": "mb_...",
"METABASE_DATABASE_ID": "2"
}
}
}
}Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-mcp"],
"env": {
"METABASE_URL": "https://your-metabase.example.com",
"METABASE_API_KEY": "mb_...",
"METABASE_DATABASE_ID": "2"
}
}
}
}Using a .env file
Instead of inline env vars, point to a .env file:
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-mcp"],
"env": {
"METABASE_ENV_FILE": "/path/to/.env"
}
}
}
}Your .env file:
METABASE_URL=https://your-metabase.example.com
METABASE_API_KEY=mb_...
METABASE_DATABASE_ID=2Environment Variables
Variable | Required | Description |
| Yes | Metabase base URL (no trailing slash) |
| Yes | API key from Admin > Settings > Authentication > API Keys |
| No | Default database ID for queries (default: |
| No | Path to |
Getting an API Key
Go to your Metabase instance
Navigate to Admin > Settings > Authentication > API Keys
Click Create API Key
Copy the key (starts with
mb_)
Tools
Querying
Tool | Description |
| Run raw SQL against any database. Returns CSV or JSON. |
| Run SQL with no row limit — streams full results as CSV. |
| Execute a saved question by ID. |
| Execute a specific card within a dashboard. |
Dashboards
Tool | Description |
| List all dashboards with id, name, description. |
| Get dashboard details including all its cards. |
| Create a new empty dashboard. |
| Add a saved question to a dashboard with position/size. |
Saved Questions (Cards)
Tool | Description |
| List all saved questions. |
| Get card details including query definition. |
| Create a new saved question from SQL. |
Schema & Exploration
Tool | Description |
| List all connected databases. |
| List tables in a database. |
| Get columns and types for a table. |
| List all collections. |
| Full-text search across dashboards, cards, tables, collections. |
Examples
Once configured, just ask your AI agent naturally:
"What tables are in the database?"
"Run SELECT count() FROM users WHERE created_at > '2025-01-01'"*
"Show me the schema for the orders table"
"Create a dashboard called 'Weekly KPIs' and add the revenue card to it"
"Search for anything related to churn"
Development
git clone https://github.com/nchgn/metabase-mcp-agents.git
cd metabase-mcp-agents
npm install
npm run buildTo use your local build instead of npx:
{
"mcpServers": {
"metabase": {
"command": "node",
"args": ["/path/to/metabase-mcp-agents/dist/server.js"],
"env": { ... }
}
}
}License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
Let AI agents query data and act across all your business apps via MCP.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA 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.7-
- FlicenseBqualityDmaintenanceAn MCP server that provides AI assistants with full access to Apache Superset instances, enabling interaction with dashboards, charts, datasets, databases, and SQL execution capabilities.34-
- AlicenseAqualityCmaintenanceAn MCP server that enables AI assistants to query databases, execute SQL, and manage Metabase resources like dashboards, cards, and collections through natural language.22MIT
- AlicenseAqualityDmaintenanceA MCP server for Metabase that gives AI assistants direct access to dashboards, cards, and query execution.331MIT