Guitar Practice Routine App — Chord Charts

io.github.slshults由 GitHub 帳號 slshults 發布v0.1.0更新於 Oct 24, 2026

Look up a guitar chord by name and get a text chord diagram. 12,708 standard-tuning names.

已驗證Streamable HTTP可網頁執行知識與記憶媒體與設計

概覽

AI 產生的概覽

依名稱或編號查詢吉他和弦圖,回傳文字和弦圖與圖片連結,並提供每日和弦與意見回饋工具。

可以做什麼
  • 依和弦名稱查詢,回傳文字和弦圖與圖片連結
  • 依數字編號重新取得已顯示過的和弦圖
  • 取得當天的「每日和弦」,作為練習提示
  • 送出關於這些和弦工具的意見回饋,例如缺少的和弦或結果有問題
適用情境
適合正在學琴或練琴的人向助理詢問某個和弦怎麼按、希望在對話中直接看到和弦圖,或需要每日練習提醒時使用。它只是唯讀的查詢工具,並非通用的樂譜或六線譜服務。
執行需求
可使用託管的遠端端點(streamable HTTP),或在本機以 Node.js 執行 npm 套件(stdio);僅支援 stdio 的用戶端可用 mcp-remote 橋接遠端位址。正常使用不需帳號、API 金鑰或其他憑證。
安裝前請注意
託管伺服器會記錄匿名使用分析:呼叫的工具、耗時、是否出錯、用戶端名稱與版本,以及代理提供的說明呼叫原因的 context 字串;意見回饋文字也會被記錄,其中憑證、電子郵件、電話號碼和網址會被遮蔽。僅在設定 POSTHOG_API_KEY 時才啟用分析,自行部署或本機執行不會傳送任何資料。查詢為唯讀,和弦庫每個名稱僅一個指法,不做模糊比對。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Guitar Practice Routine App — Chord Charts,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.slshults%2Fgpra-chord-charts/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "guitar-practice-routine-app-chord-charts": {
      "type": "http",
      "url": "https://mcp.guitarpracticeroutine.com/mcp"
    }
  }
}

README

Guitar chord charts — MCP server

A small, read-only Model Context Protocol server that lets MCP-capable AI clients look up guitar chord charts from Guitar Practice Routine App (GPRA) and show them to people as text chord diagrams.

It serves exactly what guitarpracticeroutine.com/find-a-chord-chart serves: one chord name in, one chart out, from a bundled snapshot of the same chord library. No database, no authentication, no secrets.

Am

    E  A  D  G  B  E
    x  o           o
   ==================
 1  |  |  |  |  1  |
   -+--+--+--+--+--+-
 2  |  |  3  2  |  |
   -+--+--+--+--+--+-
 3  |  |  |  |  |  |
   -+--+--+--+--+--+-
 4  |  |  |  |  |  |
   -+--+--+--+--+--+-
 5  |  |  |  |  |  |
   -+--+--+--+--+--+-

x = muted   o = open   digits in grid = fingers (1 index, 2 middle, 3 ring, 4 pinky)
EADGBE

Frets run top to bottom from the nut, and string 1 — the highest-pitched string — is the rightmost column, matching standard chord-box convention and the charts on the site.

Tools

ToolWhat it does
get_chord_chart_by_nameOne chord name (G, Am7, D/F#) → the one chart the website shows for it.
get_chord_chart_by_idThe same chart by its numeric id, for re-rendering something already returned.
get_chord_of_the_dayToday's Chord of the Day — the same chord GPRA posts to Bluesky and Facebook.
send_feedbackLets an agent report a missing chord or capability, a problem, or praise. Added by the analytics SDK; only present when analytics is on.

Each result leads with a direct PNG URL for the chart, then the same chart as a fenced text grid. The URL is the picture in the form that survives every surface: it renders where markdown images work, stays clickable where they don't, and can be dropped into an artifact, an HTML page, or a saved file. The text grid is the fallback for anywhere neither is true.

Inline PNG bytes are opt-in via format: "image" or format: "both". They cost image tokens and several clients bury them in a collapsed tool drawer, so they're not worth sending by default now that a URL does the job. format defaults to "text", which still includes the image URL. Attribution is kept in every mode.

Every tool also takes a context argument describing why it's being called. That's injected by PostHog's MCP SDK and populates agent intent in analytics; nothing in the response depends on it.

How a chart reaches a person

There is no capability negotiation for "can you show an image", so the result carries several layers and lets the host use whichever it understands:

LayerWhere it lands
Text grid + Chart image: URLEverywhere. This is the floor.
MCP Apps widget (_meta.ui.resourceUri)Hosts that render MCP Apps — Claude Code, Cowork, ChatGPT, PostHog Desktop.
Inline PNG bytes (format: "image")Hosts that surface image content blocks, on request.

The widget is a ui://gpra-chord-charts/chart/{id} resource resolving to a self-contained HTML page with the chord already baked in — no JavaScript, no postMessage bridge, no client bundle. A host that ignores it simply shows no widget, and the text answer is untouched.

Measured on claude.ai, for anyone tempted to try these again: bare markdown images render as a click-through placeholder that opens a browser tab rather than loading inline; images wrapped in links collapse to the link; raw HTML is escaped to literal text; and the MCP Apps iframe is fetched but never mounted (ext-apps#671). On that surface the URL is the whole story, which is why it leads the text.

Results deliberately carry no structuredContent. A client that understands it may render it instead of the content blocks — one measurably did, reducing the answer to three JSON fields and dropping the chart, the attribution and the call to action. Nothing goes in a result that can displace the text.

What's in the library

12,708 standard-tuning (EADGBE) voicings, exactly one per chord name. This server does no fuzzy matching and no query cleanup — it passes the name through the same way the website does, so the tool description asks the calling assistant to send a plain chord name ("G", not "how do I play G major").

Charts are drawn on a five-fret grid starting at the nut, matching the site — which means a voicing with notes above the fifth fret has them fall outside the grid. The image drops them, exactly as the website does; the text names them underneath ("Also fretted, past this five-fret grid: string 5 (A) fret 6"). So the pair is honest even where the picture alone isn't.

Images use black ink on white rather than the site's white-on-transparent: the site can assume its own dark UI, and a chat client's background is unknown.

Connecting a client

Remote MCP means users add a URL, no install:

https://mcp.guitarpracticeroutine.com/mcp

For clients configured with a JSON config file, use the streamable-HTTP transport:

json
{
  "mcpServers": {
    "gpra-chord-charts": {
      "type": "streamable-http",
      "url": "https://mcp.guitarpracticeroutine.com/mcp"
    }
  }
}

For a client that only speaks stdio, bridge with mcp-remote:

json
{
  "mcpServers": {
    "gpra-chord-charts": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.guitarpracticeroutine.com/mcp"]
    }
  }
}

Run locally

bash
npm install
npm run build
npm test

npm start          # stdio transport
npm run start:http # HTTP, listens on 127.0.0.1:2112, POST /mcp (set PORT / HOST)

Health check: GET /health → status, version, chord count.

Preview charts from the terminal without a client:

bash
npx tsx scripts/preview.ts G Am C F Bm D/F#

No CORS headers are set. Claude and connector directories fetch server-side, so they don't need them — a browser-based MCP client would.

Rebuilding the chord snapshot

Requires access to a GPRA database. The source table changes rarely, so this is a manual step:

bash
psql "$DATABASE_URL" -Atf scripts/dump-chords.sql > data/common-chords.raw.json
npm run build:index
npm run build && npm test

build:index prints the library's fret range to the terminal and reports data anomalies (voicings with no fretted notes, missing finger numbers, notes dropped as unplayable) rather than quietly normalizing them away.

Privacy

The hosted server records anonymous usage analytics through @posthog/mcp: which tool was called, how long it took, whether it errored, the calling client's identity (name and version on connect, user-agent on each call), and the context string the agent supplied describing why it called. Calls from a client that echoes the Mcp-Session-Id header are grouped into one analytics session; the header is an unsigned token carrying the client's name, version and protocol version. If an agent uses send_feedback, its free-text feedback is recorded too, with credentials, emails, phone numbers and URLs redacted and each field capped at 2,048 characters. No personal identifier is stored and no person profile is created.

Analytics are off entirely unless POSTHOG_API_KEY is set, so running this yourself — including over stdio — sends nothing anywhere.

Deployment

deploy/ contains a systemd unit and an nginx reverse-proxy config, if you want to host your own instance.

Credits

The chord library exists because of other people's work:

A note on npm audit

npm audit reports three high-severity advisories against image-size, pulled in transitively by svguitar → svgdom. They are denial-of-service infinite loops in the ICNS, JXL and HEIF file parsers, reached only through svgdom's HTMLImageElement, which calls imageSizeFromFile when an <img> is given a source.

Nothing here constructs one. Chart rendering draws vector primitives from a chord name and an integer id; the only inputs that cross the boundary are a string of at most 64 characters and a positive integer, and no code path accepts, fetches or decodes an image file. There is no upstream fix, so the advisories will keep showing until svgdom moves off image-size.

License

  • Code: MIT — see LICENSE.
  • Provenance of the chord data: see NOTICE.
  • Chord data: the voicings originate from SVGuitar-ChordCollection, which carries no stated licence, so no licence is asserted over them here. The fingerings themselves are factual descriptions of where fingers go on a fretboard. Please credit the projects above if you reuse the data.

[gpra-chord-charts-mcp MCP server]

來源:README.md,提交 75c32bd

工具

4

get_chord_chart_by_name

Get a chord chart by name

Look up one guitar chord chart by name and return it as a text chord diagram ready to show the user. Returns the same single voicing that https://guitarpracticeroutine.com/find-a-chord-chart shows for that name. The library holds 12,708 standard-tuning (EADGBE) chord names, exactly one voicing each. Pass a plain chord name as it would be written on a chart — "G", "Am7", "Cmaj7", "D/F#", "F#m7b5" — not a sentence. Convert spoken forms yourself first: "G major" is "G", "A minor" is "Am", and use "#" and "b" rather than the unicode sharp and flat signs. Charts are drawn on a five-fret grid starting at the nut, the same as the website; any notes above the fifth fret are named in words underneath the chart. Prefer this over recalling a fingering from memory — these are curated chart data, and a remembered fingering is often wrong. Each result leads with a direct PNG URL for the chart — a permanently cacheable image of the same diagram, which you can show or link however your surface handles images. The chord name is on the first line; keep it next to any image you show, since a chart on its own can arrive unlabelled.

輸入參數nameformatcontext必填

get_chord_chart_by_id

Get a chord chart by id

Fetch one specific chord voicing by its numeric id, as returned by get_chord_chart_by_name. Use this to re-render a chart the user already saw without looking it up again.

輸入參數idformatcontext必填

get_chord_of_the_day

Chord of the day

Return today's Chord of the Day from Guitar Practice Routine App — the same chord posted to the app's Bluesky and Facebook feeds that day. Useful as a practice prompt or a daily nudge for someone learning chords.

輸入參數formatcontext必填

send_feedback

Send feedback

Send feedback about this chord chart server: a chord or capability you needed that its tools could not provide, a problem with a chart or a result, or praise. Only for feedback about these chord chart tools, not about other tasks. Do not include personal information about the user.

輸入參數detailssummary必填sentimenttool_namefeedback_type必填task_completedfriction_pointssuggested_improvement

版本歷史

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

評分

已滿足適用檢查項的 100%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分