Skip to content

feat: add metadata-exposure-enrichment skill and Metabase MCP#10

Open
aboyalejandro wants to merge 2 commits into
mainfrom
feat/metadata-exposure-enrichment
Open

feat: add metadata-exposure-enrichment skill and Metabase MCP#10
aboyalejandro wants to merge 2 commits into
mainfrom
feat/metadata-exposure-enrichment

Conversation

@aboyalejandro
Copy link
Copy Markdown
Owner

@aboyalejandro aboyalejandro commented Apr 5, 2026

Summary

  • Add /metadata-exposure-enrichment skill that queries Metabase dashboards via MCP, discovers cards and column references, cross-references them to dbt models, and enriches _exposures.yml with structured metadata
  • Add barebones _exposures.yml as the "before" state the skill enriches (name + type + url + 2 depends_on refs)
  • Add nao-metabase-mcp-server to .mcp.json for direct Metabase access
  • Update QUICKSTART.md with Metabase MCP setup (API key generation)
  • Update README.md with new skill, MCP server table entry, and directory tree
  • Enrich _exposures.yml using the skill itself -- ran /metadata-exposure-enrichment against dashboard ID=2, which auto-discovered 6 cards, mapped source tables to dbt refs/sources, and wrote the enriched YAML

How the skill was used

The /metadata-exposure-enrichment skill was invoked against the "Agentic Data Modeling Demo" dashboard (ID=2). It:

  1. Called metabase-list-dashboards to confirm the dashboard exists
  2. Called metabase-get-dashboard to extract all 6 dashcards (card IDs 40-45)
  3. Parsed each card's MBQL query to identify source tables (table 31 = campaign_performance, table 11 = campaigns_daily) and columns used (roas, conversion_rate, total_revenue, spend, desktop_sessions, mobile_sessions, date, channel)
  4. Called metabase-get-database-metadata to resolve Metabase internal table IDs to real table names
  5. Cross-referenced tables to dbt: campaign_performance -> ref('campaign_performance'), campaigns_daily -> source('marketing_raw', 'campaigns_daily')
  6. Audited the existing _exposures.yml and found 5 gaps: missing description, owner, maturity, card documentation, and the campaigns_daily source dependency
  7. Generated and wrote the enriched YAML with structured description (business purpose, card inventory, key columns, data sources, caveats), owner, maturity, and the missing source() dependency

Context

Companion to the Substack article "dbt Exposures: How To Make Your BI Discoverable To AI". The skill follows the same pattern as metadata-ai-readiness: parse input, discover via MCP, audit existing YAML, report gaps, offer to enrich. Works with Metabase MCP + Postgres MCP only, no OpenMetadata dependency.

Test plan

  • cd openmetadata && docker compose up -d to start the stack
  • Complete Metabase setup wizard at http://localhost:3000
  • Seed the dashboard: docker compose --profile ingestion up seed-metabase
  • Generate API key at http://localhost:3000/admin/settings/authentication/api-keys
  • Set METABASE_API_KEY in .env and .mcp.json
  • Run the skill: "enrich exposure" or "exposure enrichment"
  • Verify skill discovers all 6 cards (ROAS, CR%, Target Revenue, Daily Spend by Channel, Desktop Per Channel, Mobile Per Channel)
  • Verify enriched _exposures.yml includes description, owner, maturity, and expanded depends_on

🤖 Generated with Claude Code

Add a new skill that enriches dbt exposure definitions by querying
Metabase directly via MCP. Discovers dashboard cards, maps columns
to dbt models, audits _exposures.yml for gaps, and writes enriched
metadata back. Includes barebones _exposures.yml as starting point.

- New skill: .claude/skills/metadata-exposure-enrichment/SKILL.md
- New file: dbt/models/marts/_exposures.yml (barebones, pre-enrichment)
- Add nao-metabase-mcp-server to .mcp.json
- Update QUICKSTART.md with Metabase MCP setup instructions
- Update README.md with new skill and MCP server references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aboyalejandro aboyalejandro requested a review from HopeFan as a code owner April 5, 2026 13:16
Ran metadata-exposure-enrichment skill to auto-discover dashboard cards
and enrich _exposures.yml with structured description, owner, maturity,
and the missing source('marketing_raw', 'campaigns_daily') dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant