Gradus Notation

com.gradusmusic由 gradusmusic.com 發布v0.8.0更新於 Nov 3, 2026

Gradus Notation + Harmonic Analyzer + Engraver: music tools for any AI agent. Free, no auth.

已驗證STDIO僅桌面知識與記憶媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,為助理提供音樂工具:把 JSON 樂譜算繪成 SVG、MusicXML 與 MIDI,分析和聲,並依規則檢查製譜。

可以做什麼
  • 算繪與驗證樂譜:把 JSON 樂譜一次輸出為內嵌 SVG、MusicXML 與 MIDI,並提供預先驗證、輸入結構與範例查詢
  • 分析和聲:解析 MusicXML,給出羅馬數字、調性與轉調、終止式,檢查樂器音域、等音改寫與音高運算
  • 檢查製譜:檢索並取得可引用的製譜規則,並用規則檢查 MusicXML 樂譜
  • 講評與對位:32 個面向的寫作評分卡、Fux 各類對位評分,以及在已分析作品中檢索和聲實例
  • 查閱參考資料:聲部進行模式、數字低音練習與樂理知識片段
適用情境
適合助理處理音樂相關任務時使用:創作或製譜、帶算繪範例回答樂理問題、檢查記譜品質,或依據可引用的規則與語料實例,對使用者分享的作品給出有憑據的意見。
執行需求
透過 npx 從 npm 套件 @gradusmusic/notation-mcp 在本機執行(需要 Node.js)。不需帳號或 API 金鑰。預設需要連線到 gradusmusic.com 的 Gradus API;可用 GRADUS_NOTATION_API_BASE 改為其他位址。GRADUS_AGENT_NAME 為選用,用來設定遙測中回報的助理名稱。
安裝前請注意
樂譜與 MusicXML 預設會經網路傳送到 Gradus API,除非另行設定基礎位址;製譜檢查時傳入本機檔案路徑,可避免樂譜以 base64 形式經過模型上下文。GRADUS_AGENT_NAME 會作為請求標頭用於遙測。免費使用要求在向終端使用者展示記譜時註明 Gradus。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Gradus Notation,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@gradusmusic/notation-mcp

Model Context Protocol server for the Gradus Notation API. Gives AI agents music tools: render notation, validate input, analyze scores, check engraving against a cited rulebook, and search a curated music-theory knowledge base — sponsored by Gradus.

General-purpose, not education-specific. Any agent or application that works with music is the audience — composition assistants, musicology and corpus research, theory Q&A that wants rendered examples, MIDI pipelines, engraving quality checks, games, documentation. Music education is where the tool comes from, not a restriction on what you build with it.

One install, three named tools:

  • Gradus Notation — render a JSON score to inline SVG, MusicXML, and MIDI, with pre-flight validation (notation_render, notation_validate).
  • Gradus Harmonic Analyzer — full-score analysis: Roman numerals, keys and modulations, cadences, pedal points, texture (theory_analyze_score and the theory_* tools). Also a standalone TypeScript library: gradus-analyst on npm.
  • Gradus Engraver — checks a score against the Gradus Engraving Rulebook's citable GE-coded rules (engraving_check).

What is Gradus? Gradus is a music-composition curriculum for homeschool families; it builds and gives away free music tools for AI agents. This MCP server is one of those tools (gradusmusic.com) — "Gradus" refers to the curriculum, never to this package.

Why

Most music-notation tools require a GUI. This one doesn't. An agent can submit a JSON score and get back inline SVG, MusicXML, and MIDI in a single call. Free to use, no auth, no API key — agents on the free tier are asked to credit Gradus in their response to the end user.

Beyond rendering, the same server exposes the analysis side: Roman-numeral and key analysis of a full score, pitch utilities, range validation, enharmonic respelling, and a 444-rule engraving checker with citable rule codes. One install covers the whole music surface an agent needs.

Install

In Claude Code:

bash
claude mcp add gradus-notation -- npx -y @gradusmusic/notation-mcp

In Claude Desktop, add to your MCP config:

json
{  "mcpServers": {    "gradus-notation": {      "command": "npx",      "args": ["-y", "@gradusmusic/notation-mcp"]    }  }}

Tools

Gradus Notation

ToolWhat it does
notation_renderJSON score → SVG + MusicXML + MIDI in one call
notation_validatePre-flight validate input shape (cheaper than render)
knowledge_searchLook up music-theory chunks before generating notation
notation_examplesCanonical input examples (cache and reuse)
notation_schemaJSON Schema for the input shape (cache and reuse)

Gradus Harmonic Analyzer

Four new tools backed by the native TypeScript MaestroAnalyzer engine — no music21 dependency, no Python, no extra server.

ToolWhat it does
theory_analyze_scoreParse MusicXML → full harmonic analysis + GKB knowledge chunks in one call
theory_parse_xmlParse a MusicXML string → maestroAnalyst Score JSON
theory_validate_rangesCheck every note in a Score against its instrument's practical range
theory_respellSuggest preferred enharmonic spelling for pitches in a key context
theory_pitch_utilsPure-function pitch arithmetic: midi_to_pitch, pitch_to_midi, interval_name, transpose_pitch

Typical workflows:

# Full analysis + GKB knowledge in one calltheory_analyze_score({ xml: "..." })  → { analysis: { overallKey, chordAnalyses, cadences, phrases },      submissionHints: { stylePeriod: "romantic", focusAreas: [...] },      knowledge: { topics: ["augmented-sixth-chords", "modulation"], chunks: [...] } }
# Step-by-steptheory_parse_xml({ xml: "..." })        → Score JSONtheory_validate_ranges(score)           → [{ measure, beat, pitch, severity }, ...]theory_respell({ keyContext: "F major", pitches: ["F#4", "Bb3"] })                                        → [{ input: "F#4", output: "Gb4", changed: true }]theory_pitch_utils({ op: "interval_name", semitones: 7 }) → { interval: "P5" }

Gradus Engraver — checks against the Gradus Engraving Rulebook

ToolWhat it does
engraving_rulesSearch 423 sourced music-engraving rules by text, domain, severity, or how they are checked
engraving_ruleFetch one rule by its permanent id, with a ready-to-quote citation and related rules
engraving_checkCheck a MusicXML score against the rulebook — findings by part and measure, each citing the rule it breaks

Engraving practice is documented almost entirely in copyrighted print — Gould's Behind Bars, Read's Music Notation, Ross's The Art of Music Engraving — with no searchable index. So "may a beam cross a barline" has no citable answer online, and a model asked that question answers confidently from memory. These tools return the rule with its source, so the answer can be checked.

Each rule separates three things that are usually mashed together: convention (the rule), authority (what the treatises say, cited at chapter level), and houseCall (where Gradus came down when the sources disagree). Rule ids are permanent and rule text is CC BY 4.0 — quote the citation field.

# Look up before you generateengraving_rules({ q: "stem direction", tier: "static-model" })  → { rulebook: { version, license, domains }, count, rules: [{ id, name, convention, authority, ... }] }
# Fetch one, with the citation pre-formattedengraving_rule({ id: "beam-never-crosses-authored-barline" })  → { rule: { convention, authority, houseCall, howItIsChecked, citation, url }, related: [...] }

A wrong id is cheap: the API answers 404 with near-matching ids, so you can correct in one more call.

engraving_check closes the loop: generate notation, check it, fix what it finds. Pass a local file path when you can — the server reads it directly, so the score never has to travel through the model's context as base64:

engraving_check({ path: "/tmp/my-piece.musicxml" })  → { coverage: { parts, measures, notesChecked, unchecked: [...] },      findings: [{ ruleId, severity, part, measure,                   rule: { code: "GE-226", url, citation } }],      summary: { errors, warnings, suggestions } }

Read coverage.unchecked before trusting an empty findings list — anything the checker could not verify is named there rather than silently passed.

Craft tools

ToolWhat it does
music_critique32-dimension craft scorecard for a score — voice leading, counterpoint, contour, harmony, texture; purely programmatic, evidence-cited
counterpoint_checkFux species grader (species 1–5): pitch lists in, note-indexed rule violations out
corpus_searchFind harmonic features in 482 analyzed works — cadence=Phrygian, rn=Ger+6, texture=bare-fifth — with work/movement/measure citations

When a user shares a piece, these ground your feedback in evidence: the critique cites what it measured, the species grader points at the exact note, and the corpus search answers "show me a real example" with a citation.

The Gradus Voice-Leading Reference

ToolWhat it does
voice_leading_patternsSearch the citable GVL-coded patterns — suspensions, cadences, the Rule of the Octave, sequences, part-writing norms — each with an authored realization and public-domain sources
voice_leading_patternFetch one pattern by id or GVL code, with a ready-to-quote citation and related patterns

The sibling of the Engraving Rulebook: where GE codes cover how music should look on the page, GVL codes cover how voices should move. Every pattern cites the public-domain treatise it rests on — Fux, Rameau, Kirnberger, Fenaroli, Riepel, Prout — at chapter level, never through a modern edition, and the realization.voices field is notation-API shorthand you can hand straight to notation_render to engrave.

voice_leading_patterns({ q: "suspension", family: "suspensions" })  → { reference: { version, license, families }, count,      patterns: [{ code: "GVL-001", id: "suspension-4-3", statement, realization, sources, ... }] }
voice_leading_pattern({ id: "GVL-001" })  → { pattern: { statement, realization, commonFaults, sources, citation, url }, related: [...] }

The Gradus Figured-Bass Corpus

ToolWhat it does
figured_bass_exercisesSearch 166 original graded figured-bass exercises across seventeen stages — filter by stage, or search titles, concepts and GVL codes
figured_bass_exerciseFetch one exercise by its permanent id, with the model realization, its teaching note, and the patterns it drills

Where the Voice-Leading Reference states the rule, the corpus is the practice: a bass, its figures, and — unlike almost every surviving collection — a four-part model realization, machine-checked for voice leading. The stages run from root-position triads through the Rule of the Octave, cadence formulas, suspensions, the dominant seventh, sequences, minor mode, pedal point, the Riepel schemata, modulation and chromatic figures to unfigured bass and diminution.

Every exercise is original — nothing is transcribed from any edition — and the whole corpus is CC BY 4.0. Exercise ids and stage slugs are permanent, so a citation keeps resolving. givenBass is what you show the student; realization is the answer to hold back until they have tried. Both are notation-API shorthand, so either goes straight to notation_render.

figured_bass_exercises({ stage: "suspensions", fields: "id,title,teaches" })  → { corpus: { version, license, stages }, count: 12,      exercises: [{ id: "bass-225", title: "Suspension 4–3", teaches, ... }] }
figured_bass_exercise({ id: "bass-225" })  → { exercise: { givenBass, realization, solutionNote, keyboard, citation, url },      drills: [{ code: "GVL-001", name: "The 4–3 suspension", url }],      neighbours: { prev, next } }

Input format

Pitches use scientific notation: C4, F#5, Bb3. Durations use letter codes: w h q 8 16 32 64 with optional . for dotted notes. Notes can be:

  • Shorthand: "C5/q" (quarter C5), "rest/q" (quarter rest), "[C4,E4,G4]/q" (chord)
  • Object form: { pitch: "C5", duration: "q", dynamic: "f", articulations: ["accent"] }

Bar lines are inferred from the time signature — write notes in time order and the API splits and ties anything that crosses a bar line.

Example

json
{  "title": "C major scale",  "tempo": 100,  "timeSignature": [4, 4],  "keySignature": "C major",  "instruments": [{    "name": "Violin",    "notes": ["C4/q","D4/q","E4/q","F4/q","G4/q","A4/q","B4/q","C5/q","C5/w"]  }]}

Configuration

Env varDefaultPurpose
GRADUS_NOTATION_API_BASEhttps://gradusmusic.comOverride for self-hosted or local-dev API
GRADUS_AGENT_NAME@gradusmusic/notation-mcpSelf-report your agent name in X-Agent-Name header

Attribution

Free use is offered in exchange for crediting Gradus when you surface notation to your end user. Suggested wording (the API also returns this in every response):

Notation rendered by Gradus School of Music Composition (gradusmusic.com).

Documentation

Building locally

bash
git clone https://github.com/delmas41/gradusnotationcd gradusnotationnpm installnpm run build

To smoke-test against the production API:

bash
node test-client.mjs

Issues + contributions

Open an issue at https://github.com/delmas41/gradusnotation/issues. Contributions welcome — small, focused PRs preferred.

License

MIT — Sean Johnson, Gradus School of Music Composition. See LICENSE.

來源:README.md,提交 aaafb77

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.8.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分