IM

imlewc/metabase-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

151 stars 39 forks 品質 62 トレンド 16

imlewc/metabase-serverは、https://github.com/imlewc/metabase-server.からインポートされたMCPサーバー候補です。

概要

imlewc/metabase-serverは、https://github.com/imlewc/metabase-server.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Metabase統合のためのモデルコンテキストプロトコルサーバーです。

これはMetabase APIとの統合を実装したTypeScriptベースのMCPサーバーです。AIアシスタントがMetabaseとやり取りできるようになり、以下へのアクセスを提供します:

  • ダッシュボード、質問・カード、データベースをリソースとして提供
  • Metabaseクエリをリストアップし実行するためのツール
  • Metabaseデータの閲覧および操作能力

特徴

リソース

  • metabase:// URIを通じてMetabaseリソースをリストアップしアクセスすること
  • ダッシュボード、カード/質問、データベースへのアクセス
  • 構造化データアクセス用のJSONコンテンツタイプ

道具

  • list_dashboards - Metabaseのすべてのダッシュボードをリスト
  • list_cards - Metabaseのすべての質問/カードをリストアップ
  • list_databases - Metabase内のすべてのデータベースを一覧表示
  • execute_card - Metabaseの質問やカードを実行し、結果を得る
  • get_dashboard_cards - すべてのカードをダッシュボードに集めろ
  • execute_query - Metabaseデータベースに対してSQLクエリを実行する

構成

サーバーを起動する前に、認証用の環境変数を設定する必要があります。サーバーは2つのメソッドをサポートしています:

  1. API Key (Preferred):
  • METABASE_URL:あなたのMetabaseインスタンスのURL(例:https://your-metabase-instance.com)。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

metabase-server MCP 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

Features

Resources

  • List and access Metabase resources via metabase:// URIs
  • Access dashboards, cards/questions, and databases
  • JSON content type for structured data access

Tools

  • 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

Configuration

Before running the server, you need to set environment variables for authentication. The server supports two methods:

  1. API Key (Preferred):

    • METABASE_URL: The URL of your Metabase instance (e.g., https://your-metabase-instance.com).
    • METABASE_API_KEY: Your Metabase API key.
  2. Username/Password (Fallback):

    • METABASE_URL: The URL of your Metabase instance.
    • METABASE_USERNAME: Your Metabase username.
    • METABASE_PASSWORD: Your Metabase password.

The server will first check for METABASE_API_KEY. If it’s set, API key authentication will be used. If METABASE_API_KEY is not set, the server will fall back to using METABASE_USERNAME and METABASE_PASSWORD. You must provide credentials for at least one of these methods.

Example setup:

Using API Key:

# Required environment variables
export METABASE_URL=https://your-metabase-instance.com
export METABASE_API_KEY=your_metabase_api_key

Or, using Username/Password:

# 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 .env file with a package like dotenv.

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

# 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:

GitHub で README 全文を見る

インストール

npx -y @imlewc/metabase-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" } } } }