Agent integration with the Northwestern University Libraries Digital Collections API
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
One-click editor setup isn’t available for this listing yet — we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.
env.jsonThe env.json file contains environment variable values for the lambda functions defined in the API for use in local development. You can create an env.json file containing the values to run the API against your dev data by running:
If the file already exists, it will not be overwritten unless you include -B in the make command.
To start the API in development mode, first make sure you have the correct version of the AWS SAM command line utility installed:
Then run the following command:
The API will be available at:
https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002
⚠️ Note the above URLs (which point to your local OpenSearch instance) need full endpoints to resolve. For example:
https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/searchhttps://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/collectionsView supported endpoints Questions? View the production API documentation
The API supports simulated network effects (errors and delays) for local testing via the CHAOS_CONFIG environment variable. If the variable is absent the middleware is disabled entirely.
Set it to an inline JSON array:
Or set it to the path of a JSON file containing the same array:
Each rule has a pattern (matched against the request path) and an effect:
| Effect | Fields | Behavior |
|---|---|---|
error | status (HTTP status code), chance (0–1) | Returns {"error":"chaos"} with the given status; fires chance * 100% of the time |
delay | ms (number or [min, max]) | Pauses for the given number of milliseconds (random within range if a tuple) |
All matching rules are evaluated in order. Delay rules accumulate; an error rule short-circuits the request only when it fires — otherwise evaluation continues to the next rule.
View and edit information about a specific Work in the Index.
id of a Work you'd like to inspect in the API.https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/works/[WORK_ID]https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/works/[WORK_ID]?as=iiifIIIF Presentation responses expose IIIF Content Search 2.0 services for transcription annotations:
SearchService2 entry for https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/works/[WORK_ID]/search?as=iiifSearchService2 entry for https://USER_PREFIX.dev.rdc.library.northwestern.edu:3002/file-sets/[FILE_SET_ID]/search?as=iiifTo search transcription text, include a non-empty q parameter:
Both endpoints return a IIIF AnnotationPage whose items target the matching work canvas or file set canvas. Requests without as=iiif or a non-empty q return 400.
For help debugging/inspecting, JavaScript console messages are written to: dc-api-v2/dc-api.log
Develop against changes to the API.
dc-nextjs/server.js from default 3000 to something like 3003./environment/dc-nextjs shell)Access the app in a browser at: https://USER_PREFIX.dev.rdc.library.northwestern.edu:3003/
There are two ways to deploy a development branch: make deploy and make sync. The differences are:
deploy deploys a static stack, and requires another deploy to update it. sync watches for
changes in realtime.deploy uses the apiDependencies resource defined in the template for dependencies, while
sync uses the AWS SAM CLI's built-in development dependency logic.Either way, the resulting stack will be accessible at https://dcapi-USER_PREFIX.rdc-staging.library.northwestern.edu.
An existing sync stack can be reused by running make sync again, or by running make sync-code to only
sync code changes (no infrastructure/template changes).
samconfig.*.yamlBoth methods involve a samconfig.USER_PREFIX.yaml file. This file, with default values, can be created by
running (for example):
This will create a configuration to stand up the default stacks in both deploy mode (API, AV Download, and Chat) and
sync mode (Chat only). To deploy a different combination of features, specify them using the WITH option:
Available features are: API, AV_DOWNLOAD, CHAT, and DOCS.
⚠️ Be very careful including the API in sync mode as every change within /api will take a long time to deploy.
As with the env.json file, make will not overwrite an existing file unless you include -B.
API documentation is automatically regenerated and deployed on pushes to the staging and production branches. The documentation is in two parts:
The docs directory contains a standard mkdocs project, which can be edited using the same tools and format as the main Repository Documentation.
In a nutshell:
docs/docs directory.mkdocs locally and preview your work:
Docs will be accessible at http://USER_PREFIX.dev.rdc.library.northwestern.edu:8000/We also maintain an OpenAPI Specification under the docs directory in spec/openapi.yaml. When mkdocs is running, the Swagger UI can be found at http://USER_PREFIX.dev.rdc.library.northwestern.edu:8000/spec/openapi.html. Like the rest of the documentation, changes to the YAML will be immediately visible in the browser.
The existing spec files (openapi.yaml, types.yaml, and data-types.yaml) are the best reference for understanding and updating the spec. It's especially important to understand how openapi.yaml uses the $ref keyword to refer to reusable elements defined in types.yaml, and how types.yaml pulls model schemas from data-types.yaml.
For an in-depth look, or to learn how to define things for which there aren't good examples in our spec, refer to the full OpenAPI documentation.
openapi.html renders the Swagger UI directly from the unmodified openapi.yaml. In addition, the build process generates a JSON copy of the spec using the OpenAPI Generator CLI. In order to make sure the spec is valid before checking it in, run:
This check is also part of the CI test workflow, so an invalid spec file will cause the branch to fail CI.
Typescript types for the schemas (Works, Collections, FileSets) are automatically published to the nulib/dcapi-types repo on deploys.
deploy/staging branch contains changes to the docs/docs/spec/data-types.yaml file, new types are generated and a commit is made to the staging branch of nulib/dcapi. This is intended to be for local testing by NUL devs against the private staging API.main branch) contains changes to the docs/docs/spec/data-types.yaml file, new types are generated and a PR is opened into the main branch of nulib/dcapi-types. Also, an issue is created in nulib/repodev_planning_and_docs to review the PR and publish the types package (manually).Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/northwestern-university-libraries-digital-collections-api)<a href="https://allmcps.com/mcp/northwestern-university-libraries-digital-collections-api"><img src="https://allmcps.com/api/badge/northwestern-university-libraries-digital-collections-api?style=directory" alt="Northwestern University Libraries Digital Collections API on AllMCPs" /></a>