ptna-enc-mcp
ピティナ・ピアノ曲事典 MCP 服务器
以ピティナ・ピアノ曲事典为「正典(主数据)」,用于校正音乐会节目中曲名・作曲家名表记不一致的 MCP 服务器。
输入模糊的曲名,即可返回本家的正式标题・作曲家名・作品编号・演奏时长。
ℹ️ 这是ピティナ非官方的个人工具。曲事典的解说文等著作权归ピティナ/原作者所有。 个人使用・校正是可以的,但请不要转载输出内容或进行大量访问。
功能(工具)
工具 | 用途 |
| 按曲名/作曲家关键词搜索乐曲。返回正式标题・作曲家・opus・演奏时长・曲ID的候选列表(校正的核心) |
| 通过乐曲ID获取详细信息(正式标题・原题・opus・解说开头) |
| 搜索作曲家名的正式表记・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 即表示成功。
运行确认
.venv/bin/python tests/test_parse.py # パーサ単体テスト(ネット不要)设置(环境变量・可选)
变量 | 默认值 | 含义 |
|
| 最小请求间隔(秒) |
|
| 页面缓存有效期(秒)。设为 |
|
| 缓存保存位置 |
| 工具名+联系方式 | 发送的 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 toolsget_composerARead-only
作曲家IDからプロフィール概要と作品リストを取得する。
Args: composer_id: ピティナ曲事典の作曲家ID(URLの /persons/ の数字)。
Returns: {composer_id, name, profile, works: [{piece_id, title, url}], url}
Inputs: composer_id (required).
get_pieceARead-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_composersARead-only
作曲家名で検索し、本家の正式名・作曲家ID・URLの候補を返す。
作曲家名の表記揺れ校正用(例:「ブルグミュラー」→正式表記の確認)。 内部的には楽曲検索結果から作曲家をユニーク抽出する。
Args: name: 作曲家名またはその断片。 limit: 返す件数の上限(既定20)。
Returns: {"count": int, "composers": [{composer_id, name, url}]}
Inputs: name (required), limit.
search_piecesARead-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
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Read-only, sourced catalogue of classical keyboard works: composers, catalogues, difficulty levels.
Find the songwriter behind a name or IPI name number, under every spelling and number.
Repertoire & program archive for classical vocalists. Match works from posters, save, search.
Read-only sheet music discovery and practice tools, with browser-local recognition guidance.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides 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.44 npmMIT
- AlicenseAqualityDmaintenanceEnables 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.1713GPL 3.0
- AlicenseAqualityBmaintenanceEnables 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.792 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI apps to search song sheet music, MIDI, and isolated stems, inspect available parts and notation levels, and retrieve song pages, printable PDFs, and Guitar Pro files without sign-in.MIT