Offline linter for Databricks Unity Catalog metric view YAML. No workspace connection needed.
MCPpedia last refreshed this data
io.github.1yangsh/metricview-lint is an MCP server that offline linter for Databricks Unity Catalog metric view YAML. No workspace connection needed. Its tool list has not been published yet over stdio, requires no API key, and scores 57/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"io-github-1yangsh-metricview-lint": {
"args": [
"metricview-lint"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Offline linter for Databricks Unity Catalog metric view YAML. No workspace connection needed.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'metricview-lint' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked metricview-lint against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in developer-tools / analytics
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
MCP server for using the GitLab API
MCP server for enterprise local codebase indexing, semantic search, and code dependency graphs.
Inspect and drive Flutter debug apps/games: semantic snapshots, search, and custom client tools
MCP Security Weekly
Get CVE alerts and security updates for io.github.1yangsh/metricview-lint and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Catch mistakes in Databricks Unity Catalog metric view definitions before you deploy them, in your editor, in CI, or while a coding agent like Claude Code writes them.
$ metricview-lint examples/invalid
examples/invalid/common-mistakes.yaml:8: error MV406 join 'customer' 'on' compares customer_id = customer_id; unqualified columns resolve to the joined table, so this is always true. Write source.customer_id = customer.customer_id or use 'using: [customer_id]'
examples/invalid/common-mistakes.yaml:20: error MV302 measure 'margin' has no aggregate function (SUM, COUNT, AVG, MEASURE, ...); a non-aggregated expression belongs in 'fields'.
examples/invalid/common-mistakes.yaml:22: error MV305 MEASURE(orders) references a measure defined later; move 'orders' above 'aov'
examples/invalid/common-mistakes.yaml:31: error MV502 measure 'revenue_7d': invalid range 'last 7 days'; expected current, cumulative, all, or 'trailing|leading <n> [day|month|year] [inclusive|exclusive]'
...
Metric views are defined in YAML inside CREATE VIEW ... WITH METRICS LANGUAGE YAML AS $$ ... $$. Today the only way to find a mistake is to run the statement against a warehouse and read the error. Some mistakes don't error at all: an unqualified on: id = id join condition is always true. metricview-lint checks the definition offline, in milliseconds, with no Databricks connection or credentials.
uvx metricview-lint path/to/metric_views # run without installing
pip install metricview-lint # or install it
It reads .yaml / .yml metric view bodies and .sql files containing CREATE VIEW ... WITH METRICS or ALTER VIEW ... AS $$. Line numbers always point into the original file. YAML files without a top-level source, fields or measures key are skipped, so you can point it at a whole repo.
metricview-lint [PATH ...] [--format text|json|github] [--disable MV201,MV303]
[--warnings-as-errors] [--all-yaml] [--list-rules] [--mcp]
It exits with 1 if there are errors (or warnings, with --warnings-as-errors), and 0 otherwise.
metricview-lint ships an MCP server. With it, an agent validates every metric view it writes and fixes the errors before showing you the result.
claude mcp add metricview-lint -- uvx --from 'metricview-lint[mcp]' metricview-lint --mcp
Tools exposed:
lint_metric_view(definition) takes YAML or a full CREATE VIEW ... WITH METRICS statement and returns the diagnostics.lint_metric_view_file(path) lints a file on disk.list_rules() returns every rule with its code, severity and summary.The same command works in any MCP client (Claude Desktop, Cursor, ...).
Name your files *.metric_view.yaml (or *.metric-view.yaml). VS Code (with the Red Hat YAML extension), JetBrains IDEs and Neovim then pick up the schema from SchemaStore and give you key completion, hover docs and type checks while you type. For any other file name, add this first line:
# yaml-language-server: $schema=https://raw.githubusercontent.com/1yangsh/metricview-lint/main/schemas/databricks-metric-view.json
The schema is lenient on purpose: it helps you write the file, and metricview-lint checks it. metricview-lint --print-schema prints it.
repos:
- repo: https://github.com/1yangsh/metricview-lint
rev: v0.1.0
hooks:
- id: metricview-lint
This annotates the pull request diff at the offending lines.
- uses: actions/checkout@v4
- uses: 1yangsh/metricview-lint@v0.1.0
with:
paths: metric_views/
args: --warnings-as-errors
Errors are things Databricks rejects, or that silently compute the wrong number. Warnings are likely mistakes that are valid in some setups. Ru