Readme: Metabase MCP ServerSAFE
Cognition's Metabase MCP Server
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@cognitionai/metabase-mcp-server) [](https://www.typescriptlang.org/) [](https://opensource.org/licenses/MIT) [](https://nodejs.org/)
A comprehensive Model Context Protocol (MCP) server for Metabase integration, providing AI assistants with full access to Metabase's analytics platform.
🚀 Quick Start
# Install and run with npx export METABASE_URL=https://your-metabase-instance.com export METABASE_API_KEY=your_metabase_api_key npx @cognitionai/metabase-mcp-server
✨ Features
🎯 81+ Tools Available - Complete Metabase API Coverage
- 📊 Dashboard Management (23 tools) - Full CRUD operations, card management, public sharing, embedding
- 📈 Card/Question Management (21 tools) - Query execution, parameter handling, pivot queries, public links
- 🗄️ Database Management (13 tools) - Connection management, schema sync, query execution
- 📋 Table Management (16 tools) - Metadata operations, field management, data operations
- 🔍 Additional Tools (9 tools) - Collections, search, users, activity tracking, playground links
📦 Installation
💡 Recommended: Node.js 20.19.0+ and npm 8.0.0+ for optimal compatibility
Method 1: NPX (Recommended)
npx @cognitionai/metabase-mcp-server
Method 2: Global Installation
npm install -g @cognitionai/metabase-mcp-server metabase-mcp-server
Method 3: Docker
docker run -it --rm \ -e METABASE_URL=https://your-metabase-instance.com \ -e METABASE_API_KEY=your_metabase_api_key \ ghcr.io/CognitionAI/metabase-mcp-server
⚙️ Configuration
E
a2f5e0902344OBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add metabase-mcp-server --env METABASE_API_KEY=${METABASE_API_KEY} --env METABASE_PASSWORD=${METABASE_PASSWORD} -- npx -y @cognitionai/[email protected]{
"mcpServers": {
"metabase-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cognitionai/[email protected]"
],
"env": {
"METABASE_API_KEY": "${METABASE_API_KEY}",
"METABASE_PASSWORD": "${METABASE_PASSWORD}"
}
}
}
}Exposed tools (83)
41 read · 33 write · 9 destructive. Blast radius: 9 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_card_to_dashboard | write | Add an existing card to a dashboard with optional parameter mappings - use this to build comprehensive dashboards by combining multiple visualizations |
add_sample_database | write | Add the built-in Metabase sample database with demo data - use this for testing, learning, or exploring Metabase features |
add_text_block | write | Add a text block or heading to a dashboard - use this for explanatory text, titles, or instructions |
append_csv_to_table | write | Add new rows from CSV content to existing table - use this for incremental data loading, updates, or importing additional records |
audit_dashboard_filters | read | Analyze dashboard filter connections to find unconnected or misconfigured cards - use this to diagnose filter issues and ensure all cards are properly connected |
check_database_health | read | Perform health check on database connection - use this to diagnose issues, monitor status, or troubleshoot sync problems |
copy_card | write | Create a duplicate copy of an existing Metabase card with identical query and settings - use this to create variations of existing cards, build templates for similar analyses, or backup important queries before modifications |
create_card | write | Create a new Metabase card with custom query, visualization type, and settings - use this to programmatically build new analytical cards, dashboards charts, or data exploration queries |
create_card_public_link | write | Generate a publicly accessible URL for a Metabase card that can be viewed without authentication (requires admin privileges) - use this to share analytical insights with external stakeholders, create public reports, or embed charts in websites |
create_collection | write | Create a new Metabase collection for organizing analytical content - use this to establish organizational containers for cards, dashboards, and reports |
create_dashboard | write | Create a new Metabase dashboard - use this to build new analytical views, organize related cards, or establish monitoring interfaces |
create_database | write | Add a new database connection to Metabase - use this to connect new data sources, establish analytical pipelines, or expand data access |
create_public_link | write | Generate publicly accessible URL for a dashboard (requires superuser) - use this for external reporting, client dashboards, or public data sharing |
delete_card | destructive | Remove a Metabase card either by archiving (soft delete, preserves history) or permanent deletion - use this to clean up unused cards, remove broken cards, or organize analytical content |
delete_card_public_link | destructive | Remove public access to a Metabase card by deleting its public URL (requires admin privileges) - use this to revoke external access to sensitive data, clean up unused public links, or update security permissions |
delete_collection | destructive | Permanently delete a Metabase collection - use with caution as this affects contained content and cannot be undone |
delete_dashboard | destructive | Delete or archive a dashboard (soft or hard delete) - use with caution as permanent deletion cannot be undone |
delete_database | destructive | Permanently remove a database from Metabase - use with caution as this will break dependent content and cannot be undone |
delete_public_link | destructive | Remove public URL access for a dashboard (requires superuser) - use this to revoke external access for security or privacy reasons |
discard_table_field_values | destructive | Clear cached field values to force fresh data loading - use this when table data has changed or cached values are stale |
execute_card | write | Run a Metabase card query and return the actual data results - use this to get current data from existing cards, refresh analytical insights, or programmatically access query results for further processing |
execute_dashboard_card | write | Execute a specific card from a dashboard and retrieve fresh data - use this to get current results from dashboard components or test card functionality |
execute_pivot_card_query | write | Run a Metabase card with pivot table formatting to cross-tabulate data with rows and columns - use this to create summary tables, analyze data relationships, or generate matrix-style reports from existing cards |
execute_query | write | Execute a native SQL query against a Metabase database - use this for custom data analysis, complex queries, or extracting specific data not available through existing cards |
export_card_result | write | Execute a Metabase card and export the results in a specific format (CSV, Excel, JSON, etc.) - use this to download data for external analysis, create reports for stakeholders, or integrate query results with other systems |
favorite_dashboard | read | Mark a dashboard as favorite for quick access - use this to bookmark frequently accessed analytical views |
get_card | read | Get complete metadata and configuration for a specific Metabase card including query definition, visualization settings, collection location, and permissions - use this when you need to examine or understand how a particular card is built |
get_card_dashboards | read | Find all dashboards that include a specific Metabase card - use this to understand where a card is being used, track dependencies before making changes, or find related analytical content |
get_card_param_remapping | read | Retrieve how parameter values are remapped or transformed for display in a Metabase card - use this to understand data transformations, debug parameter issues, or see how raw values are presented to users |
get_card_param_values | read | Retrieve all available values for a specific parameter in a Metabase card - use this to populate dropdown filters, validate parameter inputs, or understand what data options are available for interactive cards |
get_card_query_metadata | read | Retrieve structural metadata about a Metabase card |
get_card_series | read | Retrieve time series data or related card suggestions for a Metabase card - use this to get chronological data trends, find similar cards, or discover related analytical content for dashboard building |
get_card_table_fks | read | Retrieve foreign keys for a card |
get_card_table_query_metadata | read | Retrieve query metadata for a card |
get_collection_items | read | Retrieve all items (cards, dashboards) within a Metabase collection - use this to explore collection contents, organize analytical assets, or understand content structure |
get_dashboard | read | Retrieve detailed information about a specific Metabase dashboard including cards, layout, and settings - use this to examine dashboard structure or get configuration details |
get_dashboard_cards | read | Retrieve all cards within a specific Metabase dashboard - use this to analyze dashboard content, understand data sources, or examine card configurations |
get_dashboard_queries | read | Extract all queries from a dashboard with IDs resolved to actual table/column names - use this to understand dashboard data sources, audit queries, or plan migrations |
get_dashboard_related | read | Retrieve entities related to a Metabase dashboard - use this to discover related content, find similar analytical views, or understand dashboard relationships |
get_dashboard_revisions | read | Retrieve revision history for a Metabase dashboard - use this to track dashboard evolution, review past changes, or restore previous versions |
get_database | read | Retrieve detailed information about a specific Metabase database including connection details and schema - use this to examine database properties or troubleshoot connections |
get_database_metadata | read | Retrieve comprehensive database metadata including tables, fields, and relationships - use this to understand structure or build dynamic queries |
get_database_schema | read | Retrieve detailed information about a specific schema including tables and objects - use this to explore schema contents or understand organization |
get_field_id | read | Look up a field |
get_metabase_playground_link | read | Generate a Metabase playground link for interactive query exploration - allows users to see results and experiment with data in a user-friendly interface |
get_table | read | Retrieve comprehensive table information including schema, fields, and metadata - use this to understand structure, explore fields, or get configuration details |
get_table_data | read | Retrieve sample data from table for preview and analysis - use this to examine content, verify quality, or understand data patterns |
get_table_fks | read | Retrieve foreign key relationships for a table - use this to understand data connections, build joins, or explore table dependencies |
get_table_query_metadata | read | Retrieve query-optimized table metadata for building dynamic queries - use this when constructing queries or building query interfaces |
get_table_related | read | Find tables and entities related through relationships or schemas - use this to discover connected data, find related content, or understand context |
list_cards | read | Retrieve all Metabase cards with optional filtering by source type (e.g., |
list_collections | read | Retrieve all Metabase collections for organizing analytical content - use this to understand content structure, find collections, or explore organizational hierarchy |
list_dashboards | read | Retrieve all Metabase dashboards - use this to discover available dashboards, get an overview of analytical content, or find specific dashboards |
list_database_schemas | read | Retrieve all schema names in a database - use this to explore database organization or navigate multi-schema databases |
list_databases | read | Retrieve all database connections in Metabase - use this to discover available data sources, check connection status, or get an overview of connected databases |
list_embeddable_cards | read | Retrieve all Metabase cards configured for embedding in external applications (requires admin privileges) - use this to audit embedded content, manage external integrations, or review public-facing analytics |
list_public_cards | read | Retrieve all Metabase cards that have public URLs enabled (requires admin privileges) - use this to audit publicly accessible content, review security settings, or manage external data sharing |
list_tables | read | Retrieve all Metabase tables with optional ID filtering - use this to discover available tables, explore database schema, or get metadata about specific tables |
list_users | read | Retrieve all Metabase users with their roles and permissions - use this to understand user access, manage permissions, or audit accounts |
move_cards | write | Relocate multiple Metabase cards to a different collection or dashboard for better organization - use this to reorganize analytical content, group related cards, or clean up workspace structure |
move_cards_to_collection | write | Bulk transfer multiple Metabase cards to a specific collection for organizational purposes - use this to categorize cards by team, project, or topic, or to implement content governance policies |
move_to_collection | write | Move a Metabase card or dashboard to a different collection - use this to reorganize content, implement governance policies, or clean up analytical assets |
remove_cards_from_dashboard | destructive | Remove specific dashcards from a dashboard by their dashcard IDs (not card_id) - use this to clean up dashboards or reorganize content |
reorder_table_fields | write | Change display order of table fields for better organization - use this to arrange fields logically, group columns, or improve presentation |
replace_table_csv | read | Completely replace table data with new CSV content - use this for full data refreshes, model updates, or complete table replacements |
rescan_table_field_values | write | Trigger rescan to refresh field values cache with current data - use this to update dropdown options, statistics, or filter values |
revert_dashboard | read | Restore a dashboard to a specific previous revision - use this to undo changes, restore deleted content, or return to known good configuration |
save_dashboard | write | Save a complete dashboard object with nested data - use this for bulk operations or complex dashboard structures |
save_dashboard_to_collection | write | Save a dashboard object directly into a specific collection - use this for organized dashboard creation or bulk imports |
search_card_param_values | read | Search and filter available parameter values for a Metabase card using a text query - use this to find specific parameter options in large datasets, help users locate filter values, or implement autocomplete functionality |
search_content | read | Search across all Metabase content including cards, dashboards, collections, and models - use this to find specific content, discover assets, or explore analytical resources |
sync_database_schema | write | Initiate schema sync to update Metabase metadata cache - use this after database changes to recognize new tables, columns, or relationships |
sync_table_schema | write | Initiate schema sync for specific table to update metadata - use this when table structure has changed and needs recognition |
unfavorite_dashboard | destructive | Remove a dashboard from the user |
update_card | write | Modify an existing Metabase card |
update_collection | write | Update collection properties including name, description, and organization - use this to maintain metadata, reorganize hierarchies, or update structure |
update_dashboard | write | Update dashboard properties including name, description, parameters, and settings - use this to maintain metadata, reorganize content, or configure sharing |
update_dashboard_cards | write | ⚠️ DANGER: REPLACES ALL dashboard cards - any cards not in the array will be DELETED. To update a single card, first get_dashboard to fetch ALL cards, then include ALL of them with your modifications. This affects ALL tabs. |
update_dashcard | write | Update a specific dashcard |
update_database | write | Update database configuration including name, connection details, and sync settings - use this to maintain connections, update credentials, or modify sync behavior |
update_table | write | Update table configuration including display name, description, and field settings - use this to customize presentation, update metadata, or configure data model |
update_tables | write | Bulk update multiple Metabase tables with same configuration - use this to apply consistent settings, update metadata, or modify table properties efficiently |
validate_database | read | Test database connection parameters before creating - use this to verify credentials, connectivity, and accessibility |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
delete_card, delete_card_public_link, delete_collection, delete_dashboard, delete_database, delete_public_link, discard_table_field_values, remove_cards_from_dashboard, unfavorite_dashboard
@modelcontextprotocol/sdk, abort-controller, axios, cors, express, @types/node, typescript
A comprehensive Model Context Protocol (MCP) server for Metabase integration, providing AI assistants with full access to Metabase's analytics platform.
Gates applied: no_behavioural_pass.
a2f5e0902344full audit observations/trust-audit/mcp-server/cognitionai__metabase-mcp-server.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | a2f5e0902344 | SAFE | B | 89 | first audit |
Questions
What is the @cognitionai/metabase-mcp-server MCP server?
Cognition's Metabase MCP Server
What tools does @cognitionai/metabase-mcp-server expose?
83 in total: 41 read-only, 33 that write, and 9 that can delete or overwrite (delete_card, delete_card_public_link, delete_collection, delete_dashboard, delete_database). Every one is listed on this page with its risk.
Is @cognitionai/metabase-mcp-server safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 9 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does @cognitionai/metabase-mcp-server need?
It reads METABASE_API_KEY and METABASE_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (a2f5e0902344), read on 2026-10-12. The repository is watched and re-audited when it changes.