whitney-museum-mcp-server
whitney-mcp-ts
Ein MCP-Server für die öffentliche API des Whitney Museum. Durchsuche die Sammlung, Künstler:innen, Ausstellungen, Veranstaltungen und Audioguides von Claude Desktop oder jedem MCP-Client.
TypeScript, nur stdio, freundliche Parameter, die auf die Ransack-Syntax der API abgebildet werden, mit Quellenangabe, und Antworten werden gekürzt, um sie im Kontext eines Modells handhabbar zu halten.
Die API des Whitney ist offen und ohne Authentifizierung; kein API-Schlüssel nötig.
Installation
npx whitney-mcp-tsOder aus dem Quellcode:
git clone https://github.com/mildlydiverting/whitney-mcp-ts.git
cd whitney-mcp-ts
npm install
npm run buildNode 20 oder neuer.
Related MCP server: Wikipedia MCP Server
Claude Desktop
Füge Folgendes zu claude_desktop_config.json hinzu:
{
"mcpServers": {
"whitney": {
"command": "npx",
"args": ["-y", "whitney-mcp-ts"]
}
}
}Aus dem Quellcode: Verweise stattdessen auf den Build:
{
"mcpServers": {
"whitney": {
"command": "node",
"args": ["/absolute/path/to/whitney-mcp-ts/dist/index.js"]
}
}
}Beende und öffne Claude Desktop erneut. Die Konfiguration erweitert ~ nicht, verwende also einen vollständigen Pfad.
Tools
Tool | Was es tut |
| Durchsuche über 27.000 Werke nach Titel, Künstler:in, Klassifikation, Medium, Datum, Ausstellungsstatus |
| Vollständiger Datensatz für ein Werk — Maße, Credit Line, Beschreibung, Bild-URLs |
| Durchsuche über 7.000 Künstler:innen; filtere nach Sammlung, Biennale, ausgestellt |
| Vollständiger Künstler:innendatensatz, einschließlich Biografie, Getty-ULAN- und Wikidata-IDs |
| Werke eines bestimmten Künstlers/einer bestimmten Künstlerin |
| Ausstellungen mit einem bestimmten Künstler/einer bestimmten Künstlerin |
| Ausstellungen ab 1931, mit Datumsfilter |
| Ein Ausstellungsdatensatz |
| Gespräche, Führungen und Programme ab 2008 |
| Audioguides, die seit 2009 veröffentlicht wurden |
| Beliebiger Endpunkt, mit rohen Ransack-Prädikaten |
Was dich erwartet
Die Suche liefert schlanke Datensätze.
Whitney-Datensätze enthalten lange HTML-Beschreibungen und Biografien, daher liefert die Suche die Grundlagen und whitney_get_* liefert alles. Prosa wird auf 2.000 Zeichen gekürzt, ganze Antworten auf 25.000.
Die Paginierung beträgt 30 pro Seite.
Das ist die Seitengröße der API. page wählt die Seite, limit kürzt sie weiter — der Standardwert von 10 verhindert, dass eine breite Suche deinen Kontext überflutet.
Die Suchsyntax ist Ransack
Prädikate verschachteln sich unter q (_eq, _cont, _cont_all_split, _gteq und Verwandte), Sortierung unter q[s]. Die typisierten Tools bilden freundliche Argumente auf diese ab. whitney_query stellt sie roh zur Verfügung, für alles, was die typisierten Tools nicht erreichen.
Künstler- und Kunstwerkfelder sind explizit zugeordnet.
Ausstellungen, Veranstaltungen, Guides und Seiten durchlaufen stattdessen einen generischen Zusammenfasser: HTML entfernt, Zeitstempel auf Daten gekürzt, relative URLs absolut gemacht, interne Fremdschlüssel entfernt. Das Museum sagt, dass sich sein Feldsatz ändern kann, daher ist nichts hartcodiert, was nicht nötig ist. Führe eine Suche mit limit: 1 durch, um die tatsächlichen Feldnamen zu sehen, und verwende dann filters für alles Spezifische.
Quellenangabe
Jede Antwort endet mit einer Quellenzeile, die das Museum nennt und auf seine Bedingungen verlinkt. Detaildatensätze enthalten außerdem zwei Quellenfelder:
rights— der Urheberrechtshinweis, extrahiert aus dem eigenen Beschreibungstext des Whitneycitation— eine fertige Markdown-Zeile, z. B.:
Edward Hopper, Early Sunday Morning, 1930. Whitney Museum of American Art, © Erben von Josephine N. Hopper/Lizenziert von Artists Rights Society (ARS), New York.
Beachte, dass der Rechteinhaber normalerweise nicht der Künstler ist. In einer Stichprobe von zehn Werken unterschieden sich neun — Nachlässe, Stiftungen und Rechtegesellschaften wie ARS und VAGA. Daher lohnt es sich, rights zu lesen, anstatt es anzunehmen; es ist der Hinweis, den die Bedingungen des Whitney zu behalten bitten.
Werke ohne Urheberrechtshinweis — meist älteres Material — erhalten eine Quellenangabe, die nach dem Museum-Link endet.
Massendaten
Für alles in großem Umfang solltest du nicht durch die API blättern. Das Whitney veröffentlicht Künstler- und Kunstwerk-CSVs unter https://github.com/whitneymuseum/open-access, veröffentlicht unter CC0.
Bekannte API-Eigenheiten
sort: "random"randomisiert nicht zuverlässig. Die Anfrage nach drei zufälligen Werken ergab drei aufeinanderfolgende Zugangsnummern desselben Künstlers. Wenn du echte Zufälligkeit brauchst, fordere stattdessen eine zufällige Seitennummer an.display_datebei Kunstwerken ist Freitext — „1915–1931, gedruckt 1976–1977" — daher funktionieren Datumsbereiche dort nicht. Ausstellungen und Veranstaltungen haben echte Zeitstempel, undstarts_on_or_after/starts_on_or_beforefiltern nach diesen.Lebende Künstler haben
death_year: "0". Rechne nicht damit.Ransack ignoriert Prädikate, die es nicht erkennt, anstatt einen Fehler zu melden, sodass ein falsch geschriebenes Feld stillschweigend alles zurückgibt. Überprüfe deine Ergebnismengen.
Sicherheit
Die API des Whitney benötigt keinen Schlüssel, es gibt also keine Anmeldedaten, nichts zu leaken und nichts zu konfigurieren.
Jedes Tool ist schreibgeschützt. Der Server sendet GET-Anfragen an whitney.org und sonst nichts — kein Dateisystemzugriff, keine Shell, keine Schreibvorgänge. Endpunktnamen stammen aus einer festen Liste, Datensatz-IDs sind URL-kodiert, und Filterparameter laufen über URLSearchParams.
Eine bekannte Einschränkung: Die HTML-zu-Markdown-Konvertierung verwendet reguläre Ausdrücke mit verschachtelten Quantifizierern, die bei absichtlich fehlerhafter Eingabe zu starkem Backtracking führen können. Die Eingabe stammt aus dem eigenen CMS des Whitney und nicht von Benutzern. Wenn das also passiert, ist in NYC etwas sehr schiefgelaufen, und es ist wahrscheinlich nicht meine Schuld.
Wenn du etwas findest, öffne ein Issue.
Entwicklung
npm test # unit tests, offline
npm run test:canary # live checks against the Whitney API
npm run inspect # MCP Inspector against the built serverDie Canary-Suite läuft monatlich in CI. Sie existiert, um zu erkennen, wenn das Whitney einen Feldnamen ändert — die Fehlerart, die Unit-Tests nicht sehen können, da sie gegen gespeicherte Fixtures laufen.
Lizenzen
Code: MIT-Lizenz.
Das Whitney stellt die API mit folgendem Hinweis bereit:
Die über diese API abgerufenen Daten können durch Urheberrechte und andere Beschränkungen des Whitney Museum of American Art und Dritter geschützt sein. Sie dürfen diese Daten für nichtkommerzielle Bildungs- und persönliche Zwecke sowie für „Fair Use" verwenden, wie gesetzlich zulässig, vorausgesetzt, Sie behalten alle Urheberrechts- und anderen Eigentumshinweise auf den Materialien bei und geben den Autor und die Quelle der Materialien an.
Lies ihre Bedingungen unter https://whitney.org/about/website/api, bevor du etwas Öffentliches darauf aufbaust.
Beachte, dass die oben verlinkten CSV-Datensätze CC0 sind, was möglicherweise großzügiger ist als die API-Bedingungen.
Nicht verbunden mit dem Whitney Museum of American Art. Dies ist ein Drittanbieter-Wrapper um ihre öffentliche API, die unter https://whitney.org/about/website/api dokumentiert ist.
Danksagung
Siehe auch Sam Parsons' whitney-museum-mcp — ein Python/FastMCP-Server über dieselbe API, mit Docker- und HTTP-Transport.
An das Digitalteam des Whitney für die Veröffentlichung einer API überhaupt und für die ordentliche Dokumentation. Und für das Schreiben netter Blogbeiträge, die explizit erwähnen, dass sie claude code verwenden, weil ich mich dadurch weniger schuldig fühle, wenn ich das ganze hier per Vibe-Coding zusammenstelle.
Available Tools
11 toolswhitney_artist_artworksList an artist's artworksARead-onlyIdempotent
List the collection works by one artist.
Args:
id (string): artist ID
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[] } with slim artwork records.
Use this rather than whitney_search_artworks with an artist name — it matches on the artist record rather than the credit line, so collaborative and attributed works are handled correctly.
Inputs: id (required), page, limit, response_format. Returns: note, page, count, total, +4 more
whitney_artist_exhibitionsList an artist's exhibitionsARead-onlyIdempotent
List Whitney exhibitions featuring one artist.
Args:
id (string): artist ID
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[] }.
Exhibition fields are passed through generically (HTML stripped, long prose truncated), because the Museum documents these fields as subject to change. Coverage is fuller for recent decades than for the Museum's early history.
Inputs: id (required), page, limit, response_format. Returns: note, page, count, total, +4 more
whitney_get_artistGet a Whitney artistARead-onlyIdempotent
Fetch one artist's full record, including their biography where the Museum has published one.
Args:
id (string): TMS ID or 'T'-prefixed reference
response_format ('markdown' | 'json', default 'markdown')
Returns: { record: { id, name, sort_name, dates, birth_year, death_year, in_collection, in_biennial, in_artport, on_view, ulan_id, wikidata_id, biography, page_url } }
The biography is stripped of HTML and truncated. ulan_id (Getty ULAN) and wikidata_id are useful for cross-referencing other sources.
Inputs: id (required), response_format. Returns: record, source
whitney_get_artworkGet a Whitney artworkARead-onlyIdempotent
Fetch one artwork's full record by ID.
Args:
id (string): the artwork's TMS ID, as returned by whitney_search_artworks
response_format ('markdown' | 'json', default 'markdown')
Returns: { record: { id, title, artist, artist_ids[], date, medium, dimensions, classification, department, accession_number, credit_line, on_view, description, object_label, visual_description, alt_text, images[], page_url } }
Fields are omitted when empty. Alt text is human-written where available and AI-generated otherwise; alt_text_is_ai_generated flags which.
Errors: returns a 404 message if the ID does not exist.
Inputs: id (required), response_format. Returns: record, source
whitney_get_exhibitionGet a Whitney exhibitionARead-onlyIdempotent
Fetch one exhibition record by ID.
Args:
id (string): exhibition ID, as returned by whitney_search_exhibitions
response_format ('markdown' | 'json', default 'markdown')
Returns: { record: {...} } — fields as published by the API, HTML stripped.
Inputs: id (required), response_format. Returns: record, source
whitney_queryRaw Whitney API queryARead-onlyIdempotent
Escape hatch for queries the typed tools do not cover. Hits any endpoint with arbitrary Ransack predicates.
Args:
endpoint ('artists' | 'artworks' | 'exhibitions' | 'events' | 'guides' | 'pages')
id (string, optional): fetch a single record instead of a list
filters (object, optional): raw predicates, e.g. { "medium_cont_all_split": "graphite paper" }
sort (string, optional): e.g. 'popularity desc'
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: a list result, or { record: {...} } when 'id' is supplied.
Prefer the typed tools where they fit — they return tidier records. Use this to discover field names, combine unusual predicates, or reach the 'pages' endpoint. Note that 'pages' mirrors the Museum's CMS structure and is rarely useful outside it.
Inputs: endpoint (required), id, page, sort, +3 more.
whitney_search_artistsSearch Whitney artistsARead-onlyIdempotent
Search the 7,000+ artists listed by the Whitney — those with work in the collection and those who have appeared in Museum exhibitions.
Returns slim records (id, name, dates, in_collection, in_biennial, on_view). Call whitney_get_artist for the biography and authority IDs.
Args:
name (string, optional): substring match on the display name
in_collection, in_biennial, on_view (boolean, optional)
sort ('default' | 'name_asc' | 'name_desc' | 'most_viewed' | 'random')
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[], note? }
Example: "which O'Keeffes are in the collection?" -> search name="O'Keeffe", then whitney_artist_artworks with the returned id.
Inputs: name, page, sort, limit, +4 more. Returns: note, page, count, total, +4 more
whitney_search_artworksSearch Whitney artworksARead-onlyIdempotent
Search the Whitney Museum's online collection of 27,000+ works.
Returns slim records (id, title, artist, date, medium, classification, on view, first image URL). Call whitney_get_artwork for the full record including dimensions, credit line, description and all images.
Args:
title, artist, medium, date (string, optional): substring matches
classification (string, optional): exact match, e.g. "Drawings"
department ('collection' | 'artport' | 'special', optional)
on_view (boolean, optional)
sort ('default' | 'title_asc' | 'title_desc' | 'most_viewed' | 'random')
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[], note? }
Examples:
"watercolours with flowers in the title" -> title="flower", classification="Drawings", medium="watercolor"
"show me something at random from the collection" -> sort="random", limit=3
Notes:
Medium spellings follow US usage ("watercolor", "color").
Date is free text ("1915-1931, printed 1976-1977"), so filter loosely and check results.
Inputs: date, page, sort, limit, +7 more. Returns: note, page, count, total, +4 more
whitney_search_eventsSearch Whitney eventsARead-onlyIdempotent
Search Museum events — talks, tours, public programmes and so on — going back to 2008. This list is largely comprehensive.
Args:
title (string, optional): substring match
filters (object, optional): raw Ransack predicates
sort (string, optional): e.g. 'start_time desc'
starts_on_or_after / starts_on_or_before (string, optional): ISO dates (YYYY-MM-DD) filtering on start_time
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[] }
As with exhibitions, fields are passed through generically. Sort by 'start_time desc' for the most recent programming.
Inputs: page, sort, limit, title, +4 more. Returns: note, page, count, total, +4 more
whitney_search_exhibitionsSearch Whitney exhibitionsARead-onlyIdempotent
Search exhibitions mounted by the Whitney, going back to 1931. Records are fuller for recent decades and sparse for the Museum's early history.
Args:
title (string, optional): substring match
filters (object, optional): raw Ransack predicates for fields this tool does not expose
sort (string, optional): e.g. 'start_time desc', 'random'
starts_on_or_after / starts_on_or_before (string, optional): ISO dates (YYYY-MM-DD) filtering on start_time
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[] }
Exhibition fields are passed through generically — the Museum documents its field set as subject to change, so this tool keeps whatever scalar fields the API returns, strips HTML, shortens timestamps to dates and drops internal IDs. Known fields include title, start_time, end_time, date_override, url, primary_text, press_highlights and popularity. Run one search with limit=1 to confirm before writing a 'filters' query.
Inputs: page, sort, limit, title, +4 more. Returns: note, page, count, total, +4 more
whitney_search_guidesSearch Whitney audio guidesARead-onlyIdempotent
Search audio guides published since 2009. Fetching an individual guide also returns its stops.
Args:
title (string, optional), filters (object, optional), sort (string, optional)
page (number, default 1), limit (number, 1-30, default 10)
response_format ('markdown' | 'json', default 'markdown')
Returns: { total, count, page, has_more, next_page?, results[] }
Inputs: page, sort, limit, title, +2 more. Returns: note, page, count, total, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each resource has a clear search/get or relationship tool, and the overlap between whitney_artist_artworks and whitney_search_artworks is explicitly resolved in the descriptions. whitney_query is positioned as an escape hatch for unsupported queries, not as a competing primary tool.
The whitney_ prefix with search_/get_ resource names forms a clear pattern for most tools. The exceptions are whitney_artist_artworks and whitney_artist_exhibitions, which use a possessive noun style rather than a verb_noun style, and whitney_query, which is a one-off.
11 tools is well-scoped for a museum API covering artists, artworks, exhibitions, events, and guides, plus relationship helpers and a query escape hatch. Each tool has a distinct job and none feel redundant.
Core read-only workflows are covered: search and detail retrieval exist for artworks, artists, and exhibitions, and searches exist for events and guides. The main gap is the lack of typed getters for individual events and guides, which the guide description implies should exist; whitney_query can work around this but it is less discoverable.
Related MCP Connectors
Art Institute of Chicago MCP — wraps the ARTIC public API (free, no auth)
Victoria and Albert Museum (V&A) Collections MCP. Keyless. Wraps the V&A Collections API v2.
Unlock a world of art with the Met Museum MCP! Use the 'search_artworks' API to find stunning
Search and manage your team's knowledge from MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceInteract with the Cooper Hewitt API with MCP.2MIT
- AlicenseNot gradedqualityDmaintenanceProvides structured access to Wikipedia content including search, summaries, images, links, and more via MCP tools.6Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables searching and retrieving details from the Harvard Art Museums collection.79 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching the Metropolitan Museum of Art collection by subject, artist, or keyword, retrieving detailed artwork information, and listing curatorial departments via natural language.93 npm3MIT