{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/met-museum-mcp-server</h1>\n  <p><b>Search the Metropolitan Museum of Art collection, fetch full artwork records and open-access images via MCP. STDIO or Streamable HTTP.</b>\n  <div>3 Tools</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.2.6-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/met-museum-mcp-server) [![MCP Server](https://img.shields.io/badge/MCP%20Server-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/met-museum-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/met-museum-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/met-museum-mcp-server/releases/latest/download/met-museum-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=met-museum-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbWV0LW11c2V1bS1tY3Atc2VydmVyIl19) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22met-museum-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fmet-museum-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://met-museum.caseyjhand.com/mcp](https://met-museum.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\nThree tools for browsing and fetching Metropolitan Museum of Art collection data:\n\n| Tool | Description |\n|:---|:---|\n| `met_list_departments` | Return all 19 curatorial departments with their numeric IDs and display names |\n| `met_search_collections` | Search the collection by keyword with filters for department, date range, medium, geography, on-view status, public-domain status, and highlight designation |\n| `met_get_object` | Fetch full records for one or more object IDs — metadata, provenance, artist info, CC0 image URLs, tags, and Wikidata links |\n\n### `met_list_departments`\n\nReturn the 19 curatorial departments at The Metropolitan Museum of Art with their numeric IDs and display names.\n\n- `departmentId` values are the valid inputs for the `met_search_collections` department filter\n\n---\n\n### `met_search_collections`\n\nSearch the Met collection by keyword and optional filters.\n\n- Keyword search across title, artist name, culture, medium, tags, and other text fields\n- Filter by department ID (valid IDs from `met_list_departments`)\n- Filter by date range (integer years, negative = BCE)\n- Filter by medium/classification (e.g., `\"Paintings\"`, `\"Sculptures\"`, `\"Ceramics\"`) — maps to the classification field, not material descriptions\n- Filter by geographic origin — country, region, or city; multiple values are AND-combined\n- `isPublicDomain=true` restricts to CC0 open-access objects (guaranteed usable image URLs)\n- `hasImages=true` includes any object with images (includes copyrighted works without reusable URLs)\n- `isHighlight=true` restricts to collection highlights designated by the Met\n- `isOnView=true` restricts to objects currently on display in a Met gallery\n- Paginate past `limit` with `offset` (default 0) — a broad, unfiltered query carries the same timeout risk on every page as on the first\n- Returns total match count, truncation indicator, `remaining` count, `nextOffset` for the next page (`null` once exhausted), and up to `limit` object IDs (default 20, max 500)\n- Returned IDs resolve to full records via `met_get_object` (up to 20 per call)\n\n---\n\n### `met_get_object`\n\nFetch full records for one or more Met Museum object IDs.\n\n- Accepts 1–20 IDs per call\n- Partial-success — a single 404 does not fail the whole batch; failed IDs are reported per-ID\n- Full metadata: title, department, classification, medium, dimensions, date, culture, period, dynasty, accession number, credit line, gallery number\n- Artist data: display name, biography, nationality, dates, Getty ULAN URL, Wikidata URL\n- Constituents array for all associated persons (null for anonymous/unattributed works)\n- Controlled vocabulary tags with Getty AAT and Wikidata URLs\n- Canonical metmuseum.org URL for human follow-up\n- CC0 objects return full-resolution and web-display image URLs plus additional image arrays\n- Object-level Wikidata URL for enrichment via external knowledge graph tools\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats\n- Pluggable auth: `none`, `jwt`, `oauth`\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- STDIO and Streamable HTTP transports\n\nMetropolitan Museum of Art collection:\n\n- 500K+ artworks spanning 5,000 years from the Met's public collection API\n- CC0 open-access data from [The Metropolitan Museum of Art](https://www.metmuseum.org/) — free to use without permission or attribution\n- Parallel batch fetching with configurable concurrency for `met_get_object`\n- Linked data on every object — Getty ULAN and AAT URLs, Wikidata entity URLs for artists, tags, and works\n\nAgent-friendly output:\n\n- Provenance on every record — `isPublicDomain` and `hasCC0Image` flags distinguish CC0 objects from works with inaccessible images, so agents can reason about what they can actually display\n- Partial failure reporting — `met_get_object` returns `objects` and `failed` arrays so callers receive successful records alongside structured per-ID error context\n- Truncation signaling — `met_search_collections` returns `total`, `returned`, `truncated`, `remaining`, and `nextOffset` fields so agents know when to refine filters, increase `limit`, or page further with `offset`\n\n## Getting started\n\n### Public Hosted Instance\n\nA public instance is available at `https://met-museum.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:\n\n```json\n{\n  \"mcpServers\": {\n    \"met-museum-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://met-museum.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\n### Self-Hosted / Local\n\nAdd the following to your MCP client configuration file.\n\n```json\n{\n  \"mcpServers\": {\n    \"met-museum-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/met-museum-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"met-museum-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/met-museum-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"met-museum-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"ghcr.io/cyanheads/met-museum-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).\n- No API key required — the Met Collection API is public and unauthenticated.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/met-museum-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd met-museum-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment:**\n\n```sh\ncp .env.example .env\n# edit .env as needed (all vars are optional)\n```\n\n## Configuration\n\nAll configuration is validated at startup via Zod schemas in `src/config/server-config.ts`.\n\n| Variable | Description | Default |\n|:---|:---|:---|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |\n| `MCP_HTTP_PORT` | HTTP server port | `3010` |\n| `MCP_SESSION_MODE` | HTTP session mode: `auto`, `stateful`, or `stateless`. This server explicitly sets `stateless`; the framework schema default is `auto`. | `stateless` |\n| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |\n| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`) | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |\n| `OTEL_ENABLED` | Enable OpenTelemetry instrumentation | `false` |\n| `MET_BASE_URL` | Met Collection API base URL (override for local stubs) | `https://collectionapi.metmuseum.org/public/collection/v1` |\n| `MET_REQUEST_TIMEOUT_MS` | Per-request HTTP timeout in milliseconds | `10000` |\n| `MET_BATCH_CONCURRENCY` | Max parallel fetches in `met_get_object` | `5` |\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t met-museum-mcp-server .\ndocker run --rm -p 3010:3010 met-museum-mcp-server\n```\n\nThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/met-museum-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.\n\n## Project structure\n\n| Directory | Purpose |\n|:---|:---|\n| `src/index.ts` | `createApp()` entry point — registers tools and inits the Met service. |\n| `src/config` | Server-specific environment variable parsing and validation with Zod. |\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`) — `met_list_departments`, `met_search_collections`, `met_get_object`. |\n| `src/services/met` | Met Collection API client — HTTP, request timeout, response normalization. |\n| `tests/` | Unit and integration tests mirroring `src/`. |\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools via the arrays in `createApp()` in `src/index.ts`\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\nData from [The Metropolitan Museum of Art Collection API](https://metmuseum.github.io/) (CC0).\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n",
  "bytes": 12037,
  "sha": "ec7065c3ed613049c76e0dd275d65ef1b1e90da845836b59239b2d501c0252e3",
  "repo_slug": "cyanheads/met-museum-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_met_museum_mcp_serve_06772303/readme"
}