SuperAPI AI Directory

mcp-libraryofcongress

Full-text search of the Library of Congress's digitised American newspapers, plus catalogue search by media type and curated collections.

Open website

About this tool

Purpose mcp-libraryofcongress is an MCP server that connects chat clients to the publicly released digital collections of the Library of Congress. The Library of Congress is the national library of the United States and has made a large number of collections available online: books, photographs, maps, sound recordings, manuscripts, and pages of American newspapers dating back to the eighteenth century. Newspaper pages have been scanned and optically character recognized (OCR), so the printed text can be searched. Curators also organize materials into digital collections, each described and published as a separate whole.

Main capabilities

  • search_newspapers: searches the text of scanned newspaper pages, with text coming from OCR. Returned results include hits, each with identifier (for use with get_item), title, creator (the library that provided the scan), year, page_number (the leaf within the issue), published_on, publication (the newspaper's year range), state, excerpts, and excerpt_kind. excerpt_kind determines the value of the excerpt: passage is text around the matching term, centered on the matching term; page_opening is the beginning of the leaf, because the text the library returns with that line ends before those words appear, it does not contain the match, and citing it would cite something else, while source_url opens that leaf with the query applied. total counts newspaper leaves and is paginated; it is never a count of term occurrences.
  • search_items: searches a catalog by one type. Returns items, each with identifier, title, creator, year, date (as shown in the publication, usually a range), is_collection, and source_url. The library maintains a catalog for each type, so a search that does not specify media_type reads the general catalog, and total counts the matching records there.
  • get_item: reads one record. The heavier parts are requested on demand rather than returned by default, and long descriptions are paginated. Returns the record and its title, creator, year, date, format, and source_url, as well as description, subjects, location, language, part_of (thesubjects and departments), repository (indicating where the original is held), call_number, and rights. Fields left empty in the record are null. next_offset is used to continue a long description and is null at the end. identifier may contain slashes: a single newspaper issue is named by newspaper name, date, and edition.
  • list_collections: lists digital collections, i.e., sets of materials selected, described, and published together by curators. Returns collections, each with identifier (the slug used for addressing), title, collection_filter (the wording accepted by search_items), searchable_media_types, description, item_count, subjects, formats (the kinds of items contained), and source_url. total counts the number of collections published by the library, more than the number returned.

How to use Requires Node 24 or later, and no environment variables need to be set. One-click install: Claude Desktop, Cursor, and any client using the standard configuration format. In the configuration, use -i to keep standard input open (the protocol transport channel), and omit -t because a TTY rewrites the stream. The container needs outbound HTTPS to www.loc.gov and chroniclingamerica.loc.gov, and nothing else: no volume, no port, no credentials. Bundles that do not use npm: download mcp-libraryofcongress-3.0.2.mcpb from the latest release and open it. Clients that support MCP bundles will install it themselves, with no npm and no configuration file editing. The bundle includes its dependencies, and nothing is downloaded during installation.

Examples of questions you can ask

  • "What did Oklahoma newspapers write about the 1907 statehood vote?"
  • "Find me photos of Chicago tenements before 1920."
  • "Read that record and tell me who holds the original."
  • "What digital collections are there about the Civil War?"
  • "Can I reuse that photo?" The usual path is from search to record: a line with identifier, and get_item reads it.

When it applies and limitations

  • All variables are optional and can be set in the env block of the client configuration. Out-of-rangevalues fall back to defaults, and the reason is written to stderr.
  • Each failure has one of six codes, a message, and, when helpful, a hint indicating the next step.
  • Rate limiting and attribution: the library's published API limit is 20 requests per minute, and the whole site is 10 per minute, whichever is lower: requests are sent one at a time, at least six seconds apart, and regardless of how the server is configured, a floor of three seconds still applies. The User-Agent always ends with the project identity and an address where a person can be reached. Each result carries the address of the page it read.
  • Value of scanned text: the text within newspaper pages comes from OCR, so excerpts contain misreadings from that process. It is provided as read rather than corrected. Cite it as scanned text, and link the page so readers can view the leaf itself. Records state their own rights in rights, and the library's terms vary with each deposit. Read that statement before reusing anything, and repeat it alongside the displayed content.
  • Privacy: this server collects nothing about you and sends nothing to its authors. It runs on your machine, contacts only www.loc.gov and chroniclingamerica.loc.gov, keeps answers in memory while running, and writes nothing to disk. PRIVACY.md explains what requests carry and which settings change that.
  • Tests run against generated fixtures and make no network requests. The live suite npm run test:live makes one request per route and runs nightly against the library itself.
  • This is an unofficial project and is not affiliated with the Library of Congress. It is under the MIT License, see LICENSE. Records belong to the Library of Congress and the depositors it indicates, under the rights stated in each record.