Skip to main content
Glama

Rijksmuseum MCP Server

by r-huijts
MIT License
14
58
  • Apple
  • Linux
ErrorHandler.ts921 B
import { McpError, ErrorCode } from "@modelcontextprotocol/sdk/types.js"; import axios from "axios"; export class ErrorHandler { static handleError(error: unknown): never { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `Rijksmuseum API error: ${error.response?.data?.message || error.message}` ); } if (error instanceof McpError) { throw error; } if (error instanceof Error) { throw new McpError( ErrorCode.InternalError, error.message ); } throw new McpError( ErrorCode.InternalError, 'An unknown error occurred' ); } static validateRequiredParam(param: unknown, paramName: string): void { if (param === undefined || param === null) { throw new McpError( ErrorCode.InvalidRequest, `Missing required parameter: ${paramName}` ); } } }

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/r-huijts/rijksmuseum-mcp'

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