whitney-museum-mcp-server

whitney-museum-mcp-server

Enables searching the Whitney Museum's public API for artworks, artists, exhibitions, events, and audio guides from any MCP client.

Category
访问服务器

README

whitney-mcp-ts

An MCP server for the Whitney Museum's public API. Search the collection, artists, exhibitions, events and audio guides from Claude Desktop or any MCP client.

CI API canary npm

TypeScript, stdio only, friendly parameters mapped onto the API's Ransack syntax, travels with attribution, and responses trimmed to keep them manageable in a model's context.

The Whitney's API is open and unauthenticated; no API key needed.

Install

npx whitney-mcp-ts

Or from source:

git clone https://github.com/mildlydiverting/whitney-mcp-ts.git
cd whitney-mcp-ts
npm install
npm run build

Node 20 or newer.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "whitney": {
      "command": "npx",
      "args": ["-y", "whitney-mcp-ts"]
    }
  }
}

From source, point at the build instead:

{
  "mcpServers": {
    "whitney": {
      "command": "node",
      "args": ["/absolute/path/to/whitney-mcp-ts/dist/index.js"]
    }
  }
}

Quit and reopen Claude Desktop. The config doesn't expand ~, so use a full path.

Tools

Tool What it does
whitney_search_artworks Search 27,000+ works by title, artist, classification, medium, date, on-view status
whitney_get_artwork Full record for one work — dimensions, credit line, description, image URLs
whitney_search_artists Search 7,000+ artists; filter by collection, Biennial, on view
whitney_get_artist Full artist record, including biography, Getty ULAN and Wikidata IDs
whitney_artist_artworks Works by a given artist
whitney_artist_exhibitions Exhibitions featuring a given artist
whitney_search_exhibitions Exhibitions from 1931 onwards, with date filtering
whitney_get_exhibition One exhibition record
whitney_search_events Talks, tours and programmes from 2008 onwards
whitney_search_guides Audio guides published since 2009
whitney_query Any endpoint, with raw Ransack predicates

What to expect

Search returns slim records.

Whitney records carry long HTML descriptions and biographies, so search gives you the basics and whitney_get_* gives you everything. Prose is truncated at 2,000 characters, whole responses at 25,000.

Pagination is 30 per page.

That's the API's page size. page picks the page, limit trims it further — the default of 10 stops a broad search flooding your context.

Search syntax is Ransack

Predicates nest under q (_eq, _cont, _cont_all_split, _gteq and friends), sorting under q[s]. The typed tools map friendly arguments onto these. whitney_query exposes them raw, for anything the typed tools don't reach.

Artist and artwork fields are mapped explicitly.

Exhibitions, events, guides and pages go through a generic summariser instead: HTML stripped, timestamps shortened to dates, relative URLs made absolute, internal foreign keys dropped. The Museum says its field set may change, so nothing is hard-coded that doesn't need to be. Run a search with limit: 1 to see the real field names, then use filters for anything specific.

Attribution

Every response ends with a source line naming the Museum and linking their terms. Detail records also carry two attribution fields:

  • rights — the copyright notice, extracted from the Whitney's own description text
  • citation — a ready-made markdown line, eg:

Edward Hopper, Early Sunday Morning, 1930. Whitney Museum of American Art, © Heirs of Josephine N. Hopper/Licensed by Artists Rights Society (ARS), New York.

Note the rightsholder is usually not the artist. In a sample of ten works, nine differed — estates, foundations, and rights societies like ARS and VAGA. So rights is worth reading rather than assuming; it's the notice the Whitney's terms ask you to keep.

Works with no copyright notice — older material, mostly — get a citation ending after the Museum link.

Bulk Data

For anything at scale, don't page through the API. The Whitney publishes artist and artwork CSVs at https://github.com/whitneymuseum/open-access, released under CC0.

Known API quirks

  • sort: "random" doesn't reliably randomise. Asking for three random works returned three consecutive accession numbers by the same artist. If you need genuine randomness, request a random page number instead.
  • display_date on artworks is free text — "1915–1931, printed 1976–1977" — so date ranges don't work there. Exhibitions and events have real timestamps, and starts_on_or_after / starts_on_or_before filter on those.
  • Living artists have death_year: "0". Don't do arithmetic on it.
  • Ransack ignores predicates it doesn't recognise rather than erroring, so a misspelled field silently returns everything. Check your result counts.

Security

The Whitney's API needs no key, so there's no credentials, nothing to leak and nothing to configure.

Every tool is read-only. The server makes GET requests to whitney.org and nothing else — no filesystem access, no shell, no writes. Endpoint names come from a fixed list, record IDs are URL-encoded, and filter parameters go through URLSearchParams.

One known limitation: the HTML-to-markdown conversion uses regular expressions with nested quantifiers, which could backtrack badly on deliberately malformed input. The input comes from the Whitney's own CMS rather than from users, so if this happens, something has gone very wrong in NYC and it's probably not my fault.

If you find something, open an issue.

Development

npm test              # unit tests, offline
npm run test:canary   # live checks against the Whitney API
npm run inspect       # MCP Inspector against the built server

The canary suite runs monthly in CI. It exists to catch the Whitney changing a field name — the failure mode that unit tests can't see, since they run against saved fixtures.

Licences

Code: MIT License.

The Whitney provides the API with the following note:

The data accessed through this API may be protected by copyright, and other restrictions, of the Whitney Museum of American Art and third parties. You may use this data for noncommercial educational and personal use and for "fair use" as authorized under law, provided that you also retain all copyright and other proprietary notices contained on the materials and cite the author and source of the materials.

Read their terms at https://whitney.org/about/website/api before you build anything public on it.

Note the CSV datasets linked above are CC0, which may be more permissive than the API terms.

Not affiliated with the Whitney Museum of American Art. This is a third-party wrapper around their public API, which is documented at https://whitney.org/about/website/api.

Thanks

See also Sam Parsons' whitney-museum-mcp — a Python/FastMCP server over the same API, with Docker and HTTP transport.

To the Whitney's digital team for publishing an API at all, and for documenting it properly. And for writing nice blog posts that explicitly say they use claude code, because that makes me feel less guilty for vibe coding this whole shebang.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选