Skip to main content
Glama
ptna-enc-mcp

ptna-enc-mcp

ピティナ・ピアノ曲事典 MCP サーバー

ピティナ・ピアノ曲事典 を「正典(マスター)」として、 コンサート・プログラムの曲名・作曲家名の表記揺れを校正するための MCP サーバー。

曖昧な曲名を投げると、本家の正式タイトル・作曲家名・作品番号・演奏時間が返る。

ℹ️ ピティナ非公式の個人ツールです。曲事典の解説文などの著作権はピティナ/原著作者に帰属します。 個人利用・校正はOKですが、出力の転載や大量アクセスはしないでください。

できること(ツール)

ツール

用途

search_pieces(keyword, limit=20)

曲名/作曲家のキーワードで楽曲検索。正式タイトル・作曲家・opus・演奏時間・曲IDの候補一覧(校正の中心)

get_piece(piece_id)

楽曲IDから詳細(正式タイトル・原題・opus・解説冒頭)

search_composers(name, limit=20)

作曲家名の正式表記・IDを検索

get_composer(composer_id)

作曲家プロフィール+作品リスト

校正の使い方(例)

プログラムに「ブルグミュラー 貴婦人の乗馬」とある → search_pieces("ブルグミュラー 貴婦人の乗馬") → 正式タイトル 25の練習曲 貴婦人の乗馬、作曲家 ブルクミュラー(ブルグミュラー)、 作品番号 Op.100-25 が返る。これを正典として採用。

Related MCP server: MusicBrainz MCP Server

セットアップ

cd /Users/miku/ptna-enc-mcp
python3 -m venv .venv
.venv/bin/pip install -e .

Claude Code への登録

claude mcp add ptna-enc -- /Users/miku/ptna-enc-mcp/.venv/bin/ptna-enc-mcp

登録後、Claude Code の会話から「ピティナで『◯◯』の正式表記調べて」と頼めば使える。 確認: claude mcp list に ptna-enc が出ればOK。

動作確認

.venv/bin/python tests/test_parse.py        # パーサ単体テスト(ネット不要)

設定(環境変数・任意)

変数

既定

意味

PTNA_ENC_MIN_INTERVAL

1.5

最小リクエスト間隔(秒)

PTNA_ENC_CACHE_TTL

86400

ページキャッシュ有効期間(秒)。0で無効

PTNA_ENC_CACHE_DIR

~/.cache/ptna-enc-mcp

キャッシュ保存先

PTNA_ENC_USER_AGENT

ツール名+連絡先

送信 User-Agent

設計・スクレイピングの方針

  • API 非提供のサイトのため HTML スクレイピング。事前クロール/DB は持たず、 TTL キャッシュで「一度見たページを覚える」だけ(運用ゼロ)。

  • 都度1件のみ取得し、独自 User-Agent 明示+リクエスト間隔を守る(礼儀レイヤー)。

  • 高度フィルタ(ジャンル/調性/ステップレベル)はサイトが JS 描画するため v1 では未対応。

詳細は docs/superpowers/specs/2026-08-07-ptna-enc-mcp-design.md。

Available Tools

4 tools
get_composerA
Read-only

作曲家IDからプロフィール概要と作品リストを取得する。

Args: composer_id: ピティナ曲事典の作曲家ID(URLの /persons/ の数字)。

Returns: {composer_id, name, profile, works: [{piece_id, title, url}], url}

Inputs: composer_id (required).

get_pieceA
Read-only

楽曲IDから詳細(正式タイトル・作曲家・作品番号・解説冒頭・URL)を取得する。

search_pieces で見つけた piece_id を渡し、1曲の正式情報を確定する用途。

Args: piece_id: ピティナ曲事典の楽曲ID(URLの /musics/ の数字)。

Returns: {piece_id, title, opus, composer, composer_id, description, url}

Inputs: piece_id (required).

search_composersA
Read-only

作曲家名で検索し、本家の正式名・作曲家ID・URLの候補を返す。

作曲家名の表記揺れ校正用(例:「ブルグミュラー」→正式表記の確認)。 内部的には楽曲検索結果から作曲家をユニーク抽出する。

Args: name: 作曲家名またはその断片。 limit: 返す件数の上限(既定20)。

Returns: {"count": int, "composers": [{composer_id, name, url}]}

Inputs: name (required), limit.

search_piecesA
Read-only

曲名・作曲家名のキーワードでピティナ曲事典の楽曲を検索する。

表記揺れ校正の中心ツール。手元の曖昧な曲名(例:「ブルクミュラー 25の練習曲」)を 渡すと、本家の正式タイトル・作曲家名・作品番号・演奏時間・曲IDの候補一覧を返す。

Args: keyword: 検索語(曲名/作曲家名/その断片)。 limit: 返す件数の上限(既定20)。

Returns: {"count": int, "results": [{piece_id, title, title_en, composer, composer_id, opus, duration, url}]}

Inputs: keyword (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: search_pieces and get_piece operate on pieces, while search_composers and get_composer operate on composers. There is no overlap or ambiguity between the search and retrieval functions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: search_pieces, get_piece, search_composers, get_composer. The verbs 'search' and 'get' are used uniformly to distinguish query operations from detail retrieval.

    Tool Count5/5

    Four tools is a well-scoped set for a music encyclopedia lookup service. Each tool serves a clear, non-redundant purpose without feeling sparse or bloated.

    Completeness5/5

    The tool surface provides complete coverage for browsing the encyclopedia: searching and retrieving both pieces and composers. Search results expose IDs that feed into the get_* tools, and get_composer includes a works list, closing the loop for composer-to-piece exploration.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Provides access to the Genji API for searching and analyzing classical Japanese literature texts with advanced normalization features for historical Japanese text variations, including repeat marks expansion, kanji-kana unification, and historical kana handling.
      4
      4 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to query the MusicBrainz music database for artists, albums, recordings, and labels. It provides tools for advanced searches, detailed metadata retrieval, and accessing cover art information.
      17
      13
      GPL 3.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables searching and retrieving classical music works, scores, and recordings from IMSLP via natural language, without requiring an API key or account. It respects IMSLP's crawl policies and reports copyright status per jurisdiction.
      7
      92 npm
      1
      MIT