Skip to main content
Glama
mildlydiverting

whitney-museum-mcp-server

whitney-museum-mcp-server

一个用于惠特尼美术馆公共 API 的 MCP 服务器。可从 Claude Desktop 或任何 MCP 客户端搜索馆藏、艺术家、展览、活动和语音导览。

与惠特尼美国艺术博物馆无关联。这是对其公共 API 的第三方封装,API 文档见 https://whitney.org/about/website/api

无需 API 密钥,惠特尼的 API 是开放且无需认证的。

安装

npx whitney-museum-mcp-server

或从源码安装:

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

需要 Node 20 或更高版本。

Claude Desktop

添加到 claude_desktop_config.json

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

从源码安装时,指向构建产物:

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

退出并重新打开 Claude Desktop。配置不会展开 ~,请使用完整路径。

工具

工具

功能

whitney_search_artworks

按标题、艺术家、分类、媒介、日期、展出状态搜索 27,000+ 件作品

whitney_get_artwork

单件作品的完整记录——尺寸、致谢行、描述、图片 URL

whitney_search_artists

搜索 7,000+ 位艺术家;可按馆藏、双年展、展出状态筛选

whitney_get_artist

完整艺术家记录,包括传记、Getty ULAN 和 Wikidata ID

whitney_artist_artworks

某位艺术家的作品

whitney_artist_exhibitions

包含某位艺术家的展览

whitney_search_exhibitions

自 1931 年以来的展览,支持日期筛选

whitney_get_exhibition

单条展览记录

whitney_search_events

自 2008 年以来的讲座、导览和活动

whitney_search_guides

自 2009 年以来发布的语音导览

whitney_query

任意端点,支持原始 Ransack 谓词

预期行为

搜索返回精简记录。 惠特尼的记录带有较长的 HTML 描述和传记,因此搜索只提供基本信息,whitney_get_* 提供完整信息。散文文本截断为 2,000 个字符,完整响应截断为 25,000 个字符。

分页为每页 30 条。 这是 API 的页面大小。page 选择页码,limit 进一步缩减——默认值 10 可防止宽泛搜索淹没你的上下文。

搜索语法为 Ransack。 谓词嵌套在 q 下(_eq_cont_cont_all_split_gteq 等),排序在 q[s] 下。类型化工具将友好的参数映射到这些谓词上。whitney_query 则暴露原始谓词,用于类型化工具无法覆盖的任何场景。

艺术家和作品字段是显式映射的。 展览、活动、导览和页面则通过通用摘要器处理:去除 HTML、时间戳缩短为日期、相对 URL 转为绝对 URL、丢弃内部外键。博物馆表示其字段集可能变化,因此没有硬编码任何非必要内容。用 limit: 1 运行一次搜索即可查看真实字段名,然后对特定字段使用 filters

已知怪癖

这些是 API 的问题,不是封装层的问题。

  • sort: "random" 不能可靠地随机化。请求三件随机作品返回的是同一位艺术家的三个连续入藏编号。如果确实需要真正的随机性,请改为请求随机页码。

  • 艺术品的 display_date 是自由文本——如 "1915–1931, printed 1976–1977"——因此日期范围在那里不起作用。展览和活动有真实的时间戳,starts_on_or_after / starts_on_or_before 基于这些时间戳进行筛选。

  • 在世艺术家的 death_year: "0"。不要对它做算术运算。

  • Ransack 会忽略无法识别的谓词而不是报错,因此拼写错误的字段会静默返回所有结果。请检查你的结果数量。

批量数据

任何大规模需求,都不要通过 API 逐页抓取。惠特尼在 https://github.com/whitneymuseum/open-access 发布了艺术家和作品的 CSV 数据集,以 CC0 协议发布。

有趣的事情

让你的机器人朋友使用 Getty ULAN 和 Wikidata MCP 在惠特尼记录与其他博物馆之间建立联系。

(我正在用这些为我的教学/研究笔记添加链接和更丰富的信息。)

许可证

代码以 MIT 协议发布——见 LICENSE

底层数据归惠特尼所有。通过 API 访问的资料可能受版权和其他限制保护。惠特尼允许非商业教育用途和个人使用,以及合理使用,前提是保留版权声明并注明作者和来源。在基于此构建任何公开内容之前,请阅读其条款:https://whitney.org/about/website/api

请注意,上面链接的 CSV 数据集是 CC0 协议,比 API 条款更宽松。同样的数据,不同的门。

致谢

感谢惠特尼的数字团队发布了 API,并对其进行了妥善的文档记录。你们是最棒的。

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Art Institute of Chicago MCP — wraps the ARTIC public API (free, no auth)

  • Agentic search over your Dewey document collections from any MCP-compatible client.

  • Wikipedia MCP — wraps Wikipedia REST API (free, no auth)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mildlydiverting/whitney-mcp-ts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server