npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

metabase-agent-mcp-server

v0.2.0

Published

MCP server for the Metabase Agent API — discover tables, metrics, and execute queries against Metabase's semantic layer

Readme

Metabase Agent MCP Server

An MCP (Model Context Protocol) server that exposes Metabase's Agent API as tools for AI assistants like Claude, LibreChat, or any MCP-compatible client.

The Agent API is a versioned REST API for building headless, agentic BI applications on top of Metabase's semantic layer. This MCP server wraps the Agent API v1 endpoints so that LLMs can discover tables and metrics, inspect fields, and run queries — all scoped to the permissions of the configured API key.

Prerequisites

  • Metabase v0.59+ with a Pro/Enterprise license (the Agent API is a paid feature)
  • A Metabase API key created in Admin > Settings > Authentication > API Keys
  • Node.js 20+ (for local usage) or Docker

Configuration

The server reads two required environment variables:

| Variable | Description | | ------------------ | ------------------------------------------------- | | METABASE_URL | Base URL of your Metabase instance (e.g. https://metabase.example.com) | | METABASE_API_KEY | API key for authenticating with Metabase |

Why API key instead of JWT?

The Metabase Agent API docs recommend JWT for per-user auth scoping. However, MCP clients like Claude Desktop and LibreChat pass static environment variables to servers — they don't support dynamic JWT generation. A Metabase API key provides a simple, static credential that works with any MCP client. The API key's permissions are determined by the Metabase user it was created for.

Usage

With Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "metabase": {
      "command": "node",
      "args": ["/path/to/metabase-agent-mcp-server/dist/index.js"],
      "env": {
        "METABASE_URL": "https://metabase.example.com",
        "METABASE_API_KEY": "mb_your_api_key_here"
      }
    }
  }
}

With LibreChat

Configure in your LibreChat MCP settings:

mcpServers:
  metabase:
    command: node
    args:
      - /path/to/metabase-agent-mcp-server/dist/index.js
    env:
      METABASE_URL: https://metabase.example.com
      METABASE_API_KEY: mb_your_api_key_here

With Docker

docker build -t metabase-agent-mcp .

docker run -i --rm \
  -e METABASE_URL=https://metabase.example.com \
  -e METABASE_API_KEY=mb_your_api_key_here \
  metabase-agent-mcp

Available Tools

| Tool | Description | | ------------------ | --------------------------------------------------------------------------- | | search | Search for tables and metrics (term-based and/or semantic) | | get_table | Get details for a table: fields, related tables, metrics, measures, segments | | get_metric | Get details for a metric: queryable dimensions, segments | | get_field_values | Get statistics and sample values for a table or metric field | | run_query | Construct and execute a query in one step |

Typical workflow

  1. Search for relevant tables or metrics using search
  2. Inspect a table (get_table) or metric (get_metric) to see its fields and schema
  3. Explore field values with get_field_values if you need to discover valid filter values
  4. Query using run_query to get results

Development

npm install
npm run build
npm start

Run tests:

npm test

License

MIT