Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Logging level: debug, info, warn, error, fatal (debug enables pretty JSON) | info |
| CACHE_TTL_MS | No | Cache time-to-live in milliseconds (default: 10 minutes) | 600000 |
| METABASE_URL | No | The URL of your Metabase instance | |
| EXPORT_DIRECTORY | No | Export location for exported datasets | ~/Downloads/Metabase |
| METABASE_API_KEY | No | Your Metabase API key (recommended authentication method) | |
| METABASE_PASSWORD | No | Your Metabase password (alternative authentication method) | |
| REQUEST_TIMEOUT_MS | No | Request timeout in milliseconds (default: 10 minutes) | 600000 |
| METABASE_USER_EMAIL | No | Your Metabase user email (alternative authentication method) | |
| METABASE_READ_ONLY_MODE | No | Restrict execute tool to SELECT queries only (blocks INSERT, UPDATE, DELETE, DROP, etc.) | true |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search | Search across all Metabase items using native search API. Supports cards, dashboards, tables, collections, databases, and more. Use this first for finding any Metabase content. Returns search metrics, recommendations, and clean results organized by model type. |
| retrieve | Fetch additional details for supported models (Cards, Dashboards, Tables, Databases, Collections, Fields). Supports multiple IDs (max 50 per request) with intelligent concurrent processing and optimized caching. Includes table pagination for large databases exceeding token limits. |
| list | Fetch all records for a single Metabase resource type with highly optimized responses for overview purposes. Retrieves complete lists of cards, dashboards, tables, databases, or collections. Returns only essential identifier fields for efficient browsing and includes intelligent caching for performance. Supports pagination for large datasets exceeding token limits. |
| execute | Unified command to execute SQL queries or run saved cards against Metabase databases. Use Card mode when existing cards have the needed filters. Use SQL mode for custom queries or when cards lack required filters. Returns up to 500 rows per request - for larger datasets, use the export tool instead. SECURITY WARNING: SQL mode can execute ANY valid SQL including destructive operations (DELETE, UPDATE, DROP, TRUNCATE, ALTER). Use with caution and ensure appropriate database permissions are configured in Metabase. Note: When Read-Only Mode is enabled, write operations will be rejected with an error. |
| export | Unified command to export large SQL query results or saved cards using Metabase export endpoints (supports up to 1M rows). Returns data in specified format (CSV, JSON, or XLSX) and automatically saves to Downloads/Metabase folder. |
| clear_cache | Clear the internal cache for stored data. Useful for debugging or when you know the data has changed. Supports granular cache clearing for both individual items and list caches. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| execute_card | Execute a Metabase card/question with intelligent parameter handling and display results |
| export_card | Export a Metabase card/question to file with intelligent parameter handling and troubleshooting |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |