This project implements a Model Context Protocol (MCP) server that interfaces with the Rijksmuseum API. It allows you to search for artworks, retrieve detailed information about specific artworks, access image tiles for artworks, and explore user-created collections from Amsterdam's famous Rijksmuseum.
- Search Artworks: Find artworks in the Rijksmuseum collection using search terms
- Artwork Details: Retrieve detailed information about a specific artwork
- Artwork Images: Access image tiles for high-resolution views of artworks
- User Collections: Explore collections created by users in Rijksstudio
- User Collection Details: Get detailed information about a specific user collection
- Open Images in Browser: Directly open artwork images in your system's default web browser
- Artist Timelines: Create chronological timelines of an artist's works
- Node.js v18 or higher
- An API key from the Rijksmuseum (get one here: https://data.rijksmuseum.nl/docs/api/)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies:
npm install
-
Build the project:
npm run build
Create a .env
file in the root directory with your Rijksmuseum API key:
RIJKSMUSEUM_API_KEY=your-api-key-here
To use this server with Claude Desktop:
-
Locate your Claude Desktop configuration file:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%AppData%\Claude\claude_desktop_config.json
- MacOS:
-
Add the server configuration:
{ "mcpServers": { "rijksmuseum": { "command": "node", "args": ["/absolute/path/to/build/index.js"], "env": { "RIJKSMUSEUM_API_KEY": "your-api-key-here" } } } }
Replace
/absolute/path/to/build/index.js
with the absolute path to the built JavaScript file in your project'sbuild
directory. -
Restart Claude Desktop for the changes to take effect.
The server provides several tools that can be accessed through MCP clients:
Search for artworks using a query string.
Input: Query string (e.g., "Rembrandt", "flowers", "night")
Output: List of matching artworks with basic details
Retrieve detailed information about an artwork using its object number.
Input: Object number (e.g., "SK-C-5" for The Night Watch)
Output: Comprehensive artwork details including title, artist, date, materials, etc.
Get image tiles for an artwork using its object number.
Input: Object number
Output: Available image tiles and resolutions
List user-created collections.
Input: None
Output: List of recent user collections
Retrieve details about a specific user collection.
Input: Collection ID
Output: Collection details and contained artworks
Open an artwork's image URL directly in your default web browser.
Input: Image URL
Output: Success/failure status
Create a chronological timeline of an artist's works.
Input:
- artist: Name of the artist
- maxWorks: Maximum number of works to include (default: 10, max: 50)
Output: Chronologically ordered list of the artist's works
The server provides prompt templates for common tasks:
Generate a detailed analysis of an artwork's composition, style, and historical context.
Input:
- artworkId: ID of the artwork to analyze
Output: Comprehensive analysis of the artwork
Create a visual timeline showing the chronological progression of an artist's works.
Input:
- artist: Name of the artist
- maxWorks: Maximum number of works to include (optional)
Output: Visual timeline with artwork details and chronological progression
The server provides access to curated collections:
Access the most viewed artworks in the collection.
Type: application/json
Description: Popular artworks from the Rijksmuseum collection
Here are some natural language queries you can use with Claude to interact with the tools:
"Show me paintings by Rembrandt"
"Find artworks featuring flowers"
"What artworks in the collection include cats?"
"Tell me more about The Night Watch"
"What are the details of Vermeer's The Milkmaid?"
"Get information about SK-C-5"
"Open The Night Watch in my browser"
"Show me a high-resolution version of this painting"
"Can I see this artwork in more detail?"
"Create a timeline of Rembrandt's works"
"Analyze the composition of The Night Watch"
"Show me the progression of Vermeer's paintings"
"Find paintings of flowers and open the first one in my browser"
"Search for Vermeer's works and tell me about The Milkmaid"
"Create a timeline of Rembrandt's works and analyze his self-portraits"
The server implements standard MCP error handling:
- Invalid requests return appropriate error codes and messages
- API errors are properly formatted and passed through to the client
- Network issues are handled gracefully with informative error messages
- Make changes to the source code in the
src
directory - Build the project:
npm run build
- The built files will be in the
build
directory
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for details.