notation-mcp
@gradusmusic/notation-mcp
Gradus Notation API用のModel Context Protocolサーバーです。AIエージェントが楽譜をレンダリングし、入力を検証し、厳選された音楽理論ナレッジベースを検索できるようにします。Gradus School of Music Composition提供。
目的
ほとんどの楽譜作成ツールはGUIを必要としますが、本ツールは不要です。エージェントはJSONスコアを送信するだけで、インラインSVG、MusicXML、MIDIを1回の呼び出しで取得できます。無料で使用でき、認証やAPIキーも不要です。無料枠のエージェントは、エンドユーザーへの回答にGradusのクレジットを記載するよう求められます。
Related MCP server: Music21 Composer MCP
インストール
Claude Codeの場合:
claude mcp add gradus-notation -- npx -y @gradusmusic/notation-mcpClaude Desktopの場合、MCP設定に追加してください:
{
"mcpServers": {
"gradus-notation": {
"command": "npx",
"args": ["-y", "@gradusmusic/notation-mcp"]
}
}
}ツール
ツール | 機能 |
| JSONスコア → SVG + MusicXML + MIDIを1回の呼び出しで生成 |
| 入力形式の事前検証(レンダリングより低コスト) |
| 楽譜生成前に音楽理論のチャンクを検索 |
| 標準的な入力例(キャッシュして再利用) |
| 入力形式のJSONスキーマ(キャッシュして再利用) |
入力形式
音高は科学的表記法を使用します: C4, F#5, Bb3。音価は文字コードを使用します: w h q 8 16 32 64(付点音符にはオプションで . を使用)。音符は以下の形式が可能です:
短縮形:
"C5/q"(4分音符のC5),"rest/q"(4分休符),"[C4,E4,G4]/q"(和音)オブジェクト形式:
{ pitch: "C5", duration: "q", dynamic: "f", articulations: ["accent"] }
小節線は拍子記号から推論されます。音符を時系列順に記述すれば、APIが小節線をまたぐ音符を分割し、タイで結びます。
例
{
"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"]
}]
}設定
環境変数 | デフォルト | 用途 |
|
| セルフホストまたはローカル開発用APIへのオーバーライド |
|
|
|
クレジット
エンドユーザーに楽譜を表示する際、Gradusのクレジットを記載することを条件に無料で提供されています。推奨される文言(APIの各レスポンスにも含まれています):
Notation rendered by Gradus School of Music Composition (gradusmusic.com).
ドキュメント
完全なドキュメント + クイックスタート: https://gradusmusic.com/notation-api
OpenAPI 3.1仕様: https://gradusmusic.com/api-spec.yaml
入力形式のJSONスキーマ: https://gradusmusic.com/api/v1/notation/schema
エージェント向けドキュメント: https://gradusmusic.com/llms-api.txt
ローカルでのビルド
git clone https://github.com/delmas41/gradusnotation
cd gradusnotation
npm install
npm run build本番APIに対してスモークテストを行う場合:
node test-client.mjs問題と貢献
https://github.com/delmas41/gradusnotation/issues でIssueを作成してください。貢献を歓迎します。小規模で焦点を絞ったPRを推奨します。
ライセンス
MIT — Sean Johnson, Gradus School of Music Composition. LICENSEを参照してください。
Available Tools
5 toolsknowledge_searchA
Search the Gradus music-theory knowledge base for authoritative source material. The corpus includes hand-authored curriculum prose, Bach chorale analysis (408 chorales), score commentaries on 50+ orchestral works, and primary historical sources from Fux (1725) through Boulanger.
WHEN TO USE: before generating notation if you need to look up a specific theory fact — typical voice leading for a Neapolitan-to-V resolution, idiomatic figured-bass realizations of a particular cadence, what makes a chromatic mediant feel like one composer's style versus another. Hitting this first prevents the agent from inventing chord progressions that are stylistically wrong.
WHEN NOT TO USE: for generic music vocabulary ("what is a chord?") that any LLM already knows; for non-theory queries like composer biographies, performance recommendations, or history dates — those are out of scope; for fetching actual score notation (use notation_render or notation_examples instead).
INPUT: provide EITHER topics (kebab-case tags) OR step (curriculum step 1-49). Topics are stronger; step is the fallback when you do not know the canonical topic tag. Both empty returns a MISSING_QUERY error.
OUTPUT (JSON): { ok: true, requestId, chunks: [{ id, sourceType, sourceId, title, content, composer?, era?, topics: string[], curriculumSteps: number[], tokenEstimate }], meta: { query, returnedCount, totalTokens, responseTimeMs }, attribution }. sourceType is one of: kg_concept, score_analysis, score_commentary, bach_chorale_analysis, composer, dictionary, curriculum, lesson_content, practicum, voice_leading, fugue, chorale_exercise, etc. Empty chunks: [] when nothing matched the topics — agent should fall back to its own knowledge or try a different topic tag.
EXAMPLE INPUT: { "topics": ["voice-leading", "deceptive-cadence"], "limit": 3 } TYPICAL LATENCY: 200-700 ms (one Voyage 3 embedding call + Supabase pgvector RPC).
Inputs: topics, step, limit, maxTokens.
notation_examplesA
Fetch canonical example inputs (single melody, two-voice counterpoint, chord progression, mixed rhythms with dynamics, string quartet snippet, tied notes across bar lines). Cache the result client-side; the response shape is stable.
Inputs: no named parameters.
notation_renderA
Render music notation from a JSON score. Returns inline SVG, MusicXML, and MIDI in one call. Use scientific pitches ("C4", "F#5", "Bb3") and duration codes (w h q 8 16 32 64 with optional dots). Bar lines are inferred from the time signature; notes that cross bar lines are split and tied automatically. Call notation_validate first if you are unsure your input is well-formed — validate is cheaper than render.
Inputs: instruments (required), title, composer, tempo, +2 more.
notation_schemaA
Fetch the JSON Schema for the notation_render input shape. Cache the result client-side; this is stable across the v1 API.
Inputs: no named parameters.
notation_validateA
Pre-flight validate an input shape without rendering. Returns errors with concrete fix suggestions when input is malformed. Cheaper than notation_render — use this when iterating on input shape.
Inputs: instruments (required), title, composer, tempo, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: knowledge_search for theory facts, notation_examples for example inputs, notation_render for rendering, notation_schema for schema retrieval, and notation_validate for input validation. There is no functional overlap.
Tools use a mix of noun_verb (knowledge_search, notation_render, notation_validate) and noun_noun (notation_examples, notation_schema) patterns. Additionally, one tool deviates from the 'notation_' prefix ('knowledge_search'), reducing consistency.
With 5 tools, the server is reasonably scoped for its purpose of music notation rendering and theory knowledge retrieval. It covers core functionality without being overly minimal or excessive.
The tool set covers search, retrieval of examples, input validation, schema access, and rendering. Minor potential gaps (e.g., no tool to list available examples or manage rendered outputs) are not critical for the stated domain.
Maintenance
Related MCP Connectors
ScoreStarling is an all-in-one AI sheet music assistant. Ask for anything to do with sheet music: transcribe a song from audio, video or a link, read a PDF or photo, add chords, change the key, make it easier, turn it into guitar TAB or jianpu, or arrange it for another instrument. Every change lands on a real score you can hear, fix and download (PDF, MIDI, MusicXML, guitar TAB, jianpu, audio). Hosted remote server with OAuth sign-in. Free accounts get monthly credits and free previews; prices are at scorestarling.com/pricing. Setup: https://scorestarling.com/mcp
Convert MusicXML, MIDI, ABC, MEI and Humdrum, print sheet music, and verify every note survived.
Read-only sheet music discovery and practice tools, with browser-local recognition guidance.
Write lyrics in 100+ styles, score them, generate full songs with 4 engines, split stems. OAuth.
Related MCP Servers
AlicenseBqualityFmaintenanceAn official Model Context Protocol (MCP) server that enables AI clients to interact with ElevenLabs' Text to Speech and audio processing APIs, allowing for speech generation, voice cloning, audio transcription, and other audio-related tasks.271,558MIT- AlicenseNot gradedqualityDmaintenanceA composition-focused server built on music21 for generative music workflows, enabling melody generation, musical transformations, chord reharmonization, counterpoint creation, and MIDI export through constraint-based algorithmic composition tools.1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to interact with the Hooktheory API for chord progression generation, song analysis, and music theory data retrieval.429MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to control Ableton Live through natural language by querying tracks, analyzing sessions, and exporting stems via AbletonOSC integration.91MIT