芝加哥艺术学院MCP服务器
一种模型上下文协议(MCP)服务器,提供对 芝加哥艺术学院公共API该服务器使克劳德等人工智能助手能够从世界顶级艺术博物馆之一搜索和检索有关艺术品、艺术家、展览、画廊等的信息。
特性
- 艺术品搜索:通过全文查询搜索博物馆丰富的藏品
- 艺术品细节:获取有关特定艺术品的全面信息,包括图像、来源和展览历史
- 艺术家信息:搜索和检索艺术家和文化代理人的传记信息
- 展会数据:访问当前、过去和即将举行的展览信息
- 画廊信息:浏览博物馆画廊及其位置
- 全局搜索:同时搜索所有内容类型
可用工具
search_artworks
搜索支持分页和字段过滤的艺术品。
{
"query": "Monet water lilies",
"limit": 10,
"page": 1,
"fields": "title,artist_display,image_id"
}get_artwork
通过ID获取特定艺术品的详细信息。
{
"artwork_id": 27992,
"fields": "title,artist_display,date_display,medium_display,dimensions,description,image_id"
}search_agents
寻找艺术家、创作者和文化代理人。
{
"query": "Pablo Picasso",
"limit": 5
}get_agent
通过ID获取特定艺术家或经纪人的详细信息。
{
"agent_id": 36198
}search_exhibitions
搜索博物馆展览。
{
"query": "impressionism",
"limit": 10
}get_exhibition
通过ID获取特定展览的详细信息。
{
"exhibition_id": 9328
}list_galleries
列出博物馆画廊的位置和状态信息。
{
"limit": 20,
"page": 1
}get_gallery
按ID获取特定图库的信息。
{
"gallery_id": 2147483649
}search_all
搜索所有内容类型(艺术品、代理商、展览等)。
{
"query": "Renaissance",
"limit": 15
}安装
先决条件
- Python 3.10或更高版本
- 克劳德桌面 或另一个MCP兼容客户端
- pip(Python包管理器)
设置步骤
- 克隆存储库
git clone https://github.com/yourusername/chicago-art-museum-mcp-server.git
cd chicago-art-museum-mcp-server- 创建虚拟环境 (推荐)
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate- 安装依赖项
pip install -e .- 测试安装
python server.py服务器应无错误地启动。按 Ctrl+C 停止。
Claude桌面配置
视窗
- 打开或创建Claude Desktop配置文件:
%APPDATA%\Claude\claude_desktop_config.json- 添加MCP服务器配置:
{
"mcpServers": {
"art-institute-chicago": {
"command": "python",
"args": [
"C:\\path\\to\\chicago-art-museum-mcp-server\\server.py"
]
}
}
}- 重要:替换
C:\\path\\to\\chicago-art-museum-mcp-server带有克隆存储库的实际路径。使用双反睫毛(\\)对于Windows路径。
macOS
- 打开或创建Claude Desktop配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json- 添加MCP服务器配置:
{
"mcpServers": {
"art-institute-chicago": {
"command": "python3",
"args": [
"/path/to/chicago-art-museum-mcp-server/server.py"
]
}
}
}- 替换
/path/to/chicago-art-museum-mcp-server带有克隆存储库的实际路径。
使用虚拟环境(推荐)
如果你创建了一个虚拟环境,你应该在该环境中使用Python解释器:
窗户:
{
"mcpServers": {
"art-institute-chicago": {
"command": "C:\\path\\to\\chicago-art-museum-mcp-server\\venv\\Scripts\\python.exe",
"args": [
"C:\\path\\to\\chicago-art-museum-mcp-server\\server.py"
]
}
}
}macOS/Linux:
{
"mcpServers": {
"art-institute-chicago": {
"command": "/path/to/chicago-art-museum-mcp-server/venv/bin/python",
"args": [
"/path/to/chicago-art-museum-mcp-server/server.py"
]
}
}
}重新启动克劳德桌面
更新配置文件后,重新启动Claude Desktop以使更改生效。
使用示例
配置后,您可以通过Claude与API芝加哥艺术学院互动。以下是一些示例提示:
寻找艺术品
Search for artworks by Vincent van Gogh in the Art Institute of Chicago collection.获取艺术品详细信息
Get detailed information about artwork ID 27992 from the Art Institute of Chicago.探索展览
What exhibitions at the Art Institute of Chicago feature impressionist art?查找艺术家信息
Tell me about the artist Georgia O'Keeffe using the Art Institute of Chicago database.画廊信息
List the galleries at the Art Institute of Chicago and their locations.api信息
此服务器使用 芝加哥艺术学院公共API.API:
- 不需要身份验证
- 对合理使用没有费率限制
- 提供超过117000件艺术品的访问权限
- 通过IIIF提供高分辨率图像
- 定期更新新内容
有关更多详细的API文档,请访问:https://api.artic.edu/docs/
故障排除
服务器无法在Claude Desktop中启动
- 验证路径
server.py配置正确 - 检查Python是否已安装并可从命令行访问
- 确保安装了所有依赖项(
pip install -e .) - 查看Claude Desktop日志以获取错误消息
导入错误
请确保您已安装该软件包:
pip install -e .连接错误
- 检查您的互联网连接
- 核实一下
api.artic.edu可访问的 - API需要HTTPS;确保防火墙允许出站HTTPS连接
未返回任何结果
- 尝试更广泛的搜索词
- 检查艺术品/代理人/展览ID是否正确
- 某些资源的元数据可能有限
发展
运行测试
安装开发依赖项:
pip install -e ".[dev]"运行测试:
pytest代码格式化
此项目使用Black和Ruff进行代码格式化和linting:
# Format code
black .
# Lint code
ruff check .贡献
欢迎投稿!请随时提交拉取请求。对于重大更改,请先打开一个问题来讨论您想要更改的内容。
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
致谢
- 数据由 芝加哥艺术学院 通过其公共API
- 使用 模型上下文协议
- 由 MCP Python SDK
支持
如果您遇到任何问题或有疑问:
API服务条款
请查看芝加哥艺术学院的 条款与条件 使用此服务器时。这些数据仅供教育和个人使用。
