Skip to main content
Glama
ptna-enc-mcp

ptna-enc-mcp

Ptina Piano Music Encyclopedia MCP Server

An MCP server for correcting notation inconsistencies in concert program piece names and composer names, using the Ptina Piano Music Encyclopedia as the canonical source.

When you submit an ambiguous piece name, it returns the official title, composer name, opus number, and performance duration from the source.

ℹ️ This is an unofficial personal tool for Ptina. The copyright of the encyclopedia's explanatory texts belongs to Ptina / the original authors. Please use it for personal proofreading only; do not republish the output or make excessive requests.

Available Tools

Tool

Purpose

search_pieces(keyword, limit=20)

Search for pieces by piece/composer keyword. Returns a list of candidates with official title, composer, opus, duration, and piece ID (core proofreading tool)

get_piece(piece_id)

Retrieve details by piece ID (official title, original title, opus, opening description)

search_composers(name, limit=20)

Search for composer names in official notation and IDs

get_composer(composer_id)

Retrieve composer profile and list of works

Usage Example

If a program says "ブルグミュラー 貴婦人の乗馬" → search_pieces("ブルグミュラー 貴婦人の乗馬") → returns official title 25の練習曲 貴婦人の乗馬, composer ブルクミュラー(ブルグミュラー), opus Op.100-25. Adopt this as the canonical notation.

Related MCP server: MusicBrainz MCP Server

Setup

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

Registering with Claude Code

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

After registration, you can use it by asking Claude Code, e.g., "Look up the official notation for '◯◯' in the Ptina encyclopedia." Check: if ptna-enc appears in claude mcp list, it is ready.

Operation Check

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

Configuration (Environment Variables, Optional)

Variable

Default

Meaning

PTNA_ENC_MIN_INTERVAL

1.5

Minimum request interval (seconds)

PTNA_ENC_CACHE_TTL

86400

Page cache validity period (seconds). 0 disables caching

PTNA_ENC_CACHE_DIR

~/.cache/ptna-enc-mcp

Cache storage location

PTNA_ENC_USER_AGENT

Tool name + contact info

User-Agent sent with requests

Design and Scraping Policy

  • Since the site does not provide an API, this tool uses HTML scraping. It does not pre-crawl or maintain a database; it only "remembers pages it has seen" via a TTL cache (zero ongoing operation).

  • It fetches only one item at a time, sends a clearly identified custom User-Agent, and respects request intervals (politeness layer).

  • Advanced filters (genre/key/step level) are not supported in v1 because the site renders them via JavaScript.

For details, see 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
      7 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
      Not graded
      quality
      D
      maintenance
      Enables musical analysis of MIDI and musicXML files using music21, providing tools for key detection, harmony, melody, rhythm, form analysis, counterpoint checking, and motif extraction.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching music artists and releases, and retrieving artist biographies, discographies, release track listings, credits, and metadata through the MusicBrainz API.
      299 npm
      MIT