{
  "markdown": "# King Crimson Discography MCP Server\n\n**日本語版: [README.ja.md](README.ja.md)**\n<!-- mcp-name: io.github.ytkoka/king-crimson-mcp -->\nAn MCP server that surfaces King Crimson record and live-performance data — including a curated **incarnation (line-up era) model** that shows how each song belongs to specific eras of the band.\n\n## What makes this different\n\nGeneric MusicBrainz/Discogs MCP servers can already fetch releases, credits, and pressings. This server does that too, but adds two things a band-agnostic discography tool structurally can't have:\n\n- **A cross-source integration layer keyed on MBID.** MusicBrainz, Discogs, Cover Art Archive, and setlist.fm are stitched together so one release-group MBID gets you credits, physical editions, artwork, and live history without re-resolving identities per source.\n- **A King Crimson incarnation model.** King Crimson's line-up turned over almost completely, many times, over five decades — the same song can mean a totally different band depending on the year. This server hand-curates eight line-up eras and cross-references every tracked song's live-performance history against them:\n\n  | Song | Incarnations it appears in |\n  |---|---|\n  | \"21st Century Schizoid Man\" | Spread across *every* era — the band's signature |\n  | \"Starless\" | Only the Larks' Tongues era and the Three-drummer era |\n  | \"Elephant Talk\" | Born in the Discipline era, gone by the Three-drummer era |\n\n- **A local, offline-first concert cache.** Full concert history (1,200+ shows) is fetched once via `refresh_setlist_cache` and cached as JSON. Every subsequent song/tour/era query reads the cache — instant, and immune to setlist.fm's intermittent rate-limit failures during analysis.\n- **Reverse lookup: song → the live albums that captured it, by era.** Ask \"which live releases contain *Red*?\" and get them grouped by incarnation. It cross-references two things this server already knows — when a song was played (from the setlist cache) and when each official live album was recorded (parsed from its title) — so it answers a question neither MusicBrainz nor Discogs answers directly.\n\n  For *Red*, this surfaces 37 single-show live albums across the Discipline, THRAK, ProjeKcts and Three-drummer eras — and correctly shows **none** from the 1974 line-up that recorded it, which never played it live (numbers as of this writing; MusicBrainz's catalog can grow).\n\n## Tools\n\n| Tool | Description |\n|---|---|\n| `search_release(query, artist=\"King Crimson\", limit=10)` | MusicBrainz album search → MBIDs |\n| `get_credits(mbid, release_mbid=None)` | Per-track performer/production credits, resolved at the recording level, plus a deduplicated album roster |\n| `get_editions(mbid, max_versions=25)` | Physical pressings/reissues via Discogs, preferring the exact MusicBrainz→Discogs relation over fuzzy search |\n| `get_artwork(mbid)` | Cover art via the Cover Art Archive |\n| `get_live_history(query=\"\", artist=\"King Crimson\", year=None, limit=20)` | One-page setlist.fm search by venue/city/year (no cache needed) |\n| `refresh_setlist_cache(artist_mbid=<King Crimson>, max_pages=100, max_retries=3, force=False)` | Fetch and cache an artist's complete concert history from setlist.fm |\n| `song_performance_history(song, artist_mbid=<King Crimson>, match=\"exact\")` | A song's live history from the cache: `by_year`, `by_tour`, `by_incarnation` |\n| `get_incarnations()` | The curated line-up eras — members, instruments, key releases |\n| `refresh_live_releases_cache(artist_mbid=<King Crimson>, max_pages=10, max_retries=3, force=False)` | Fetch King Crimson's official live releases from MusicBrainz and cache them, parsing a recording date from each title |\n| `song_live_releases(song, artist_mbid=<King Crimson>, match=\"exact\")` | Find official live releases that captured a song, grouped by incarnation — matches the setlist cache against live-release recording dates |\n| `refresh_box_sets_cache(discogs_artist_id=70828, artist_mbid=<King Crimson>, force=False)` | Fetch King Crimson's compilations and box sets from Discogs and cache their tracklists |\n| `song_box_sets(song, artist_mbid=<King Crimson>, match=\"exact\")` | List box sets / compilations that contain a given song (from Discogs), with year, format, Discogs URL, and occurrence count |\n\n## The incarnation model\n\nEight line-up eras, split on membership changes:\n\n| id | Era | Years |\n|---|---|---|\n| `kc_1969` | In the Court era | 1969 |\n| `kc_1970_1972` | Transitional era | 1970 – Sep 1972 |\n| `kc_1972_1974` | Larks' Tongues era | Oct 1972 – 1974 |\n| `kc_1981_1984` | Discipline era | 1981 – 1984 |\n| `kc_1994_1997` | Double Trio / THRAK era | 1994 – 1996 |\n| `kc_1997_2003` | ProjeKcts / Nuovo Metal era | 1997 – 2003 |\n| `kc_2008` | 40th Anniversary era | 2008 |\n| `kc_2014_2021` | Three-drummer era | 2014 – 2021 |\n\nBoundaries are dates, not just years — 1972 in particular splits into the Islands-era \"Earthbound\" spring tour (Transitional) and the Wetton-era autumn tour (Larks' Tongues), since the band's membership genuinely changed mid-year.\n\nLine-up eras are a matter of fan interpretation, and this is one reasonable cut, not the only one. The full definition lives in `KING_CRIMSON_INCARNATIONS` in `src/king_crimson_mcp/server.py` — edit it (members, key releases, date boundaries) to match your own view; the aggregation logic doesn't need to change.\n\n## Song → releases (reverse lookup)\n\n\"Which releases have *Red* on them?\" is answered in two complementary ways, because King Crimson's live catalog splits cleanly into single-show albums and multi-show compilations.\n\n### Single-show live albums, mapped to eras — `song_live_releases`\n\nNeeds two local caches, built once:\n\n1. `refresh_setlist_cache` — every show and what was played (already covered above).\n2. `refresh_live_releases_cache` — King Crimson's official live releases from MusicBrainz, with a recording date parsed out of each title where possible.\n\nBoth are one-time builds: the band's history is fixed, so neither cache needs to be rebuilt unless you want to pick up new MusicBrainz entries.\n\n**How it works:** a song's performance dates come from the setlist cache; each live release carries a recording date parsed from its title (e.g. \"Live in Toronto – June 24, 1974\"). Where a release's recording date matches a date the song was played, that release is taken to contain the song. This is a straightforward, transparent rule — reliable for single-show live albums.\n\n**Known limits (by design):** King Crimson has about 187 official live releases, of which only about 87 (as of this writing) have a title MusicBrainz-parseable into a full recording date — that's the range `song_live_releases` can match with confidence. The other ~100 (box sets, compilations, titles without a date) can't be matched this way; `song_live_releases` reports exactly how many were skipped in its `coverage` field rather than silently under-reporting. Excerpt compilations are an edge case too: a song played at a show can, in principle, be matched to that show's release even if the specific release is a highlights disc that omits the track — date-matching can't distinguish \"recorded that night\" from \"included on the disc.\"\n\n### Box sets & compilations, listed — `song_box_sets`\n\nThe multi-show box sets and compilations that `song_live_releases` can't date-match are covered here, from Discogs. It filters King Crimson's Discogs releases to compilations and box sets (format contains \"Comp\" or \"Box\" — which excludes single-show downloads) and lists the ones whose tracklist contains the song: title, year, format, Discogs link, and how many times the song appears on each.\n\n**Why no era grouping here:** Discogs doesn't structure per-track recording dates, so a box set can't be split into eras the way single-show albums can. `song_box_sets` therefore *lists* the box sets containing a song rather than classifying them — era-level precision is `song_live_releases`'s job. Together they cover both halves of the question.\n\nNeeds its own one-time cache: run `refresh_box_sets_cache` (about a minute; ~38 box sets/compilations from Discogs, as of this writing). Requires `DISCOGS_TOKEN`.\n\nFor *Red*, `song_box_sets` returns 14 box sets/compilations (the \"Collectors' King Crimson\" volumes, \"1972–1974\", the \"2015 Japan Tour Box\", …), while `song_live_releases` handles the single-show side.\n\nThe honesty of both tools' coverage reporting is the point: results are exactly as complete as the underlying data lets them be, and you (or the calling agent) can see where to dig further instead of getting a silently incomplete answer.\n\n## Quick start \n\nThree one-time steps, then it runs inside Claude.\n\n### Step 1 — Install `uv` (one time)\n\n`uv` is a small tool that can fetch and run this server for you.\n\n- **macOS / Linux:**\n  ```bash\n  curl -LsSf https://astral.sh/uv/install.sh | sh\n  ```\n- **Windows (PowerShell):**\n  ```powershell\n  powershell -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n  ```\n\nClose and reopen your terminal afterward. To check it worked:\n```bash\nuv --version\n```\n\n### Step 2 — Get your free API keys\n\nThis server reads public music databases. Two of them need a free key:\n\n- **setlist.fm** (live performance history) — apply for a key at\n  <https://api.setlist.fm/docs/1.0/index.html>\n- **Discogs** (physical editions) — create a token at\n  Discogs → Settings → Developers → *Generate token*\n\nYou also set a **contact email** (`MCP_CONTACT`) — MusicBrainz requires this so\ntheir servers know who's calling. Any email you own is fine.\n\n(MusicBrainz and Cover Art Archive need no key.)\n\n### Step 3 — Add it to Claude Desktop\n\nOpen Claude Desktop's config file:\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nAdd this (fill in your email and keys):\n```json\n{\n  \"mcpServers\": {\n    \"king-crimson\": {\n      \"command\": \"uvx\",\n      \"args\": [\"king-crimson-mcp\"],\n      \"env\": {\n        \"MCP_CONTACT\": \"you@example.com\",\n        \"SETLISTFM_API_KEY\": \"your-setlistfm-key\",\n        \"DISCOGS_TOKEN\": \"your-discogs-token\"\n      }\n    }\n  }\n}\n```\nRestart Claude Desktop. King Crimson tools will appear automatically — you don't\nrun anything in a terminal yourself.\n\n### Step 4 — First use\n\nIn Claude, ask something like *\"Refresh the King Crimson setlist cache\"* once\n(it downloads the full concert history, ~40 seconds). After that, try\n*\"Show me the performance history of Starless\"* or\n*\"Which incarnations played 21st Century Schizoid Man?\"*\n\n## Troubleshooting\n\n- **\"uvx: command not found\" / server won't start in Claude Desktop.**\n  `uv` isn't installed or isn't on your PATH. Redo Step 1, then fully quit and\n  reopen Claude Desktop. On Windows you may need the full path to `uvx` in the\n  `command` field.\n- **A warning appears if you run it manually in a terminal.**\n  Running `uvx king-crimson-mcp` directly just waits silently for a client —\n  that's normal (it speaks over stdin/stdout). You don't need to run it by hand;\n  Claude Desktop starts and stops it for you. Press Ctrl+C to stop.\n- **`get_editions` / setlist tools return an error about a missing key.**\n  That tool's API key isn't set in your config's `env` block. See Step 2.\n- **setlist data looks incomplete for older tours.**\n  setlist.fm is user-submitted; some historical shows or songs simply aren't\n  logged there. This is a data limitation, not a bug.\n\n## Install from PyPI\n\nFor developers — the same package as Quick start above, without the Claude Desktop config:\n\n```bash\n# run directly without installing (recommended)\nuvx king-crimson-mcp\n\n# or install as a persistent tool\npipx install king-crimson-mcp\nking-crimson-mcp\n```\n\nSecrets (`MCP_CONTACT`, `DISCOGS_TOKEN`, `SETLISTFM_API_KEY`) go either in a `.env` file in the directory you run the command from, or directly in the Claude Desktop config's `env` block (see below) — either is read. `.env` is loaded from the current working directory, since an installed package has no project directory of its own to keep one in.\n\n## Setup from source (development)\n\n```bash\n# Python 3.10+ required (3.12 recommended)\nuv venv --python 3.12\nsource .venv/bin/activate\nuv pip install -e .\n\n# configure secrets\ncp .env.example .env\n# then edit .env\n```\n\n`.env` variables:\n\n- `MCP_CONTACT` — required by MusicBrainz policy; identifies your app to their API via the User-Agent header.\n- `DISCOGS_TOKEN` — needed for `get_editions` (Discogs personal access token).\n- `SETLISTFM_API_KEY` — needed for `get_live_history`, `refresh_setlist_cache`, and `song_performance_history`.\n- `KC_CACHE_DIR` — optional; overrides where the setlist cache is written (see below).\n\n## Running\n\n```bash\n# quick tool check via MCP Inspector\nmcp dev src/king_crimson_mcp/server.py\n```\n\nRun `refresh_setlist_cache` once first — it fetches King Crimson's full concert history (~1,200 shows, ~40 seconds) and caches it locally under `$XDG_CACHE_HOME/king-crimson-mcp` (or `~/.cache/king-crimson-mcp`; override with `KC_CACHE_DIR`) as `setlists_<artist_mbid>.json`. After that, `song_performance_history` reads from the cache and returns instantly.\n\nRun `refresh_live_releases_cache` once as well if you want `song_live_releases` — it writes `live_releases_<artist_mbid>.json` alongside the setlist cache, in the same directory. `refresh_box_sets_cache` similarly writes `box_sets_<artist_mbid>.json` there, for `song_box_sets`.\n\n## Register with Claude Desktop\n\nUsing the published package:\n\n```json\n{\n  \"mcpServers\": {\n    \"king-crimson\": {\n      \"command\": \"uvx\",\n      \"args\": [\"king-crimson-mcp\"],\n      \"env\": {\n        \"MCP_CONTACT\": \"you@example.com\",\n        \"DISCOGS_TOKEN\": \"...\",\n        \"SETLISTFM_API_KEY\": \"...\"\n      }\n    }\n  }\n}\n```\n\nOr, running from a local clone instead (after `uv pip install -e .`, which installs the same `king-crimson-mcp` console script into the venv):\n\n```json\n{\n  \"mcpServers\": {\n    \"king-crimson\": {\n      \"command\": \"/absolute/path/to/.venv/bin/king-crimson-mcp\",\n      \"env\": { \"MCP_CONTACT\": \"you@example.com\" }\n    }\n  }\n}\n```\n\nSecrets can live in `.env` (in the directory the command is run from) instead of the `env` block — either is read.\n\n## Data sources & attribution\n\nThis project is an **unofficial client** with no affiliation with or endorsement from MusicBrainz, the MetaBrainz Foundation, the Internet Archive, Discogs, or setlist.fm.\n\n- **[MusicBrainz](https://musicbrainz.org/)** — free, no API key. Requires an identifying User-Agent with contact info (rate limit: 1 req/sec). Data is largely CC0; crediting MusicBrainz in your app is good practice. `refresh_live_releases_cache` also uses this: it lists King Crimson's official live release groups (`type=live`) — no additional service or key involved.\n- **[Cover Art Archive](https://coverartarchive.org/)** — a joint MusicBrainz / Internet Archive project. Images are contributed by individual uploaders; follow the same attribution etiquette as MusicBrainz.\n- **[Discogs](https://www.discogs.com/developers)** — requires a personal access token and a unique User-Agent (60 req/min authenticated). Use is subject to the Discogs API terms of service. `song_box_sets` uses the same Discogs API as `get_editions` (no additional service or key).\n- **[setlist.fm](https://api.setlist.fm/docs/1.0/index.html)** — requires an API key (apply at api.setlist.fm). **Any display of setlist.fm data must include an attribution link to the source setlist** — every performance returned by this server includes its `url` for exactly that purpose; surface it wherever you show the data. setlist.fm data is user-submitted, so completeness and accuracy are not guaranteed.\n\n## Limitations\n\n- setlist.fm data is user-submitted — some shows or songs may be missing or incorrect, especially from older tours.\n- The incarnation boundaries are one interpretation of King Crimson's line-up history, not an official taxonomy.\n- Performer credits depend on what MusicBrainz has cataloged for a given release; sparser releases yield sparser credits.\n- `song_live_releases` can only match live releases whose title yields a full recording date (about half of King Crimson's ~187 official live releases); see [Song → releases](#song--releases-reverse-lookup) above for what's out of reach and why.\n- `song_box_sets` can't classify box sets by incarnation — Discogs doesn't structure per-track recording dates, so it lists matching box sets/compilations rather than era-grouping them. A handful of the ~38 compilations it scans are multi-artist collections where King Crimson contributed only one track; these can surface as noise for very common song titles.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 16674,
  "sha": "ef5c5c770129c606175dbd587ae34b2cdffd967f3256d306b07f950e5dbf6d68",
  "repo_slug": "ytkoka/king-crimson-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ytkoka_king_crimson_mcp_31c56fa4/readme"
}