cyanheads avatar

Libofcongress Mcp Server

cyanheads/libofcongress-mcp-server

Plugs Claude into three Library of Congress APIs: the main digital collections search (with format, date, subject, and location filters), Chronicling America's newspaper archive with full OCR text extraction, and the LC Subject Headings authority file. You get six tools that cover discovery, full metadata retrieval, and newspaper page text fetching. The newspaper tools are the standout piece. They return OCR excerpts inline during search, then pull complete ALTO XML text for individual pages, which is useful for historical research or citation work that needs the actual digitized words, not just catalog records. Also exposes a resource template for stable item references.

GitHub stars
6
tools
6
transport
STDIO, HTTP
env vars
9
last updated
Nov 3, 2026

Install

From registry metadata
$ npx add-mcp https://libofcongress.caseyjhand.com/mcp --name libofcongress

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http libofcongress https://libofcongress.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 6 tools

Verified live against the running server on Nov 6, 2026.

libofcongress_search_itemsSearch the Library of Congress digital collections by keyword. Optionally filter by material format (photos, maps, newspapers, audio, etc.), date range, subject heading, or geographic location, or scope the search to a single curated collection with collection_slug. Returns it...11 params

Search the Library of Congress digital collections by keyword. Optionally filter by material format (photos, maps, newspapers, audio, etc.), date range, subject heading, or geographic location, or scope the search to a single curated collection with collection_slug. Returns it...

Parameters* required
collection_slugstring
Scope the search to one curated collection. Pass a slug exactly as returned by libofcongress_browse_collections to libofcongress_search_items.collection_slug (e.g., "aaron-copland") — slugs are not...
date_endinteger
End year for date filter, inclusive (e.g., 1930). Omit to run through the current year.
date_startinteger
Start year for date filter, inclusive (e.g., 1920). Omit for no lower bound.
formatstring
Material type filter. Options: photo, map, newspaper, manuscript, audio, film, book, notated-music. Omit to search all formats.one of photo · map · newspaper · manuscript · audio · film
include_facetsboolean
Also return subject_facets and location_facets: LOC's top subject and location terms across every match, with counts — the values the subject and location filters accept. Default false: facets add...default: false
limitinteger
Results per page. Default 25. A page holds at most 100 results: a larger limit (up to 1000) is served as a 100-result page, and page then counts 100-result pages.default: 25
locationstring
Geographic location filter (e.g., "oklahoma", "washington d.c."). Lowercase, matches LOC location facets; location_facets (include_facets) lists values for a search.
pageinteger
1-indexed page number for paginating results.default: 1
query*string
Full-text search across metadata and available descriptive text. Use "*" to match all records within the applied filters; relevance order can differ from a queryless LOC browse.
sortstring
Result order: relevance (default), date (oldest first), or date_desc (newest first). Uses LOC catalog dates and upstream ordering.one of relevance · date · date_descdefault: relevance
subjectstring
Subject filter: an LCSH heading from libofcongress_search_subjects (e.g., "World War, 1939-1945", "United States--History--Civil War, 1861-1865") or a subject term from subject_facets (include_face...
libofcongress_get_itemRetrieve the full metadata record for a specific LOC digital item. Returns the imprint (place, publisher, and date of publication), contributors, LCSH subject headings and the subject terms the search subject filter accepts, summary, languages, locations, rights information, p...4 params

Retrieve the full metadata record for a specific LOC digital item. Returns the imprint (place, publisher, and date of publication), contributors, LCSH subject headings and the subject terms the search subject filter accepts, summary, languages, locations, rights information, p...

Parameters* required
include_filesboolean
Also list the download URLs of each listed page's files — every JPEG size, the JP2 and TIFF masters, OCR XML, and text files. Default false.default: false
item_id*string
LOC item id from a libofcongress_search_items result's "id" field (where is_item is true): a simple ID ("2009632251", "2005691065") or a slash-separated path for newspaper issues ("sn95047246/1935-...
page_limitinteger
Pages to list. Default 50. A response lists at most 100 pages: a larger page_limit (up to 1000) is served as 100.default: 50
page_offsetinteger
Index of the first page to list, 0-based across all of the item's resources. Default 0. Pass next_page_offset from the previous response to continue.default: 0
libofcongress_search_newspapersSearch historical newspaper pages in the Chronicling America corpus. Returns matching pages with the opening of each page's OCR text (~500 characters), publication title, date, the states LOC indexes the title under, and the page URL needed for libofcongress_get_newspaper_page...8 params

Search historical newspaper pages in the Chronicling America corpus. Returns matching pages with the opening of each page's OCR text (~500 characters), publication title, date, the states LOC indexes the title under, and the page URL needed for libofcongress_get_newspaper_page...

Parameters* required
date_endvalue
End of the date filter, inclusive, in the same forms as date_start (e.g., 1920 or "1912-04-16"). A year or month ends on its last day, so "1912-04" runs through April 30. Omit to run through the cu...
date_startvalue
Start of the date filter, inclusive: an integer year (e.g., 1900) or a "YYYY", "YYYY-MM", or "YYYY-MM-DD" string (e.g., "1912-04-15"); month and day may be one or two digits. A year or month starts...
limitinteger
Results per page. Default 25. A page holds at most 100 results: a larger limit (up to 1000) is served as a 100-result page, and page then counts 100-result pages.default: 25
newspaper_titlestring
Filter to one newspaper. Pass the newspaper_title value of a libofcongress_search_newspapers result exactly (case-insensitive), e.g., "new-york tribune (new york [n.y.]) 1866-1924" — the full catal...
pageinteger
1-indexed page number for paginating results.default: 1
query*string
Keyword search across OCR text and newspaper metadata.
sortstring
Result order: relevance (default), date (oldest first), or date_desc (newest first). Uses LOC catalog dates and upstream ordering.one of relevance · date · date_descdefault: relevance
statestring
Filter by LOC's State/Province facet: a full indexed name (e.g., "oklahoma", "piedmont") or a supported US postal code (e.g., "OK", "NY"), case-insensitive. Use "district of columbia" (or "DC") for...
libofcongress_get_newspaper_pageRetrieve the full text of one LOC page — a historical newspaper page, or a book or manuscript page — or, with match, only the passages around your search terms, with its publication metadata: for newspapers the title, issue date, place of publication, indexed states, and editi...2 params

Retrieve the full text of one LOC page — a historical newspaper page, or a book or manuscript page — or, with match, only the passages around your search terms, with its publication metadata: for newspapers the title, issue date, place of publication, indexed states, and editi...

Parameters* required
matchstring
Return the passages around these terms instead of the whole page — pass the query you gave libofcongress_search_newspapers (e.g., titanic, or "the titanic" iceberg); the q= in a search result url i...
page_url*string
A LOC page URL: the url field from a libofcongress_search_newspapers result (e.g., "https://www.loc.gov/resource/sn83045462/1905-03-15/ed-1/?sp=1"), or a pages[].page_url from libofcongress_get_ite...
libofcongress_search_subjectsSearch Library of Congress Subject Headings (LCSH) by keyword. Returns authorized subject headings and their URIs in a stable paged order, promoting an exact match from the first 50 results to the start; a partial word with no keyword match returns the headings that begin with...3 params

Search Library of Congress Subject Headings (LCSH) by keyword. Returns authorized subject headings and their URIs in a stable paged order, promoting an exact match from the first 50 results to the start; a partial word with no keyword match returns the headings that begin with...

Parameters* required
limitinteger
Maximum number of subject headings to return. Default 10. A call returns at most 250 headings; a larger limit (up to 1000) returns up to 250.default: 10
offsetinteger
Zero-based position in the matching headings. Continue with next_offset from the previous response.default: 0
query*string
Keyword or partial subject heading to search for (e.g., "civil war", "immigration", "jazz").
libofcongress_browse_collectionsList and browse Library of Congress curated digital collections. Returns collection names, descriptions, item counts, slugs, and URLs. Optionally filter by keyword. Collections are curated subsets of the digital holdings with specific focuses (e.g., "Civil War Glass Negatives"...3 params

List and browse Library of Congress curated digital collections. Returns collection names, descriptions, item counts, slugs, and URLs. Optionally filter by keyword. Collections are curated subsets of the digital holdings with specific focuses (e.g., "Civil War Glass Negatives"...

Parameters* required
limitinteger
Maximum number of collections to return. Default 25. A page holds at most 100 collections: a larger limit (up to 1000) is served as a 100-collection page, and page then counts 100-collection pages.default: 25
pageinteger
1-indexed page number for paginating results.default: 1
querystring
Optional keyword to filter collections by name or description. Omit to list all collections.

Sponsors

Configuration

LOC_USER_AGENTdefault: libofcongress-mcp-server/0.6.0

User-Agent header sent with LOC API requests. LOC recommends a descriptive value for polite access.

LOC_REQUEST_DELAY_MSdefault: 3100

Delay in milliseconds between LOC API requests to stay under the 20 req/min rate limit.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_SESSION_MODEdefault: stateless

HTTP session mode: auto, stateful, or stateless.

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/libofcongress-mcp-server

Search LOC digital collections, browse Chronicling America newspapers with full OCR text, and look up LC Subject Headings via MCP. STDIO or Streamable HTTP.

6 Tools • 1 Resource • 1 Skill

Details

Repository
github.com/cyanheads/libofcongress-mcp-server
Category
Search & Web Crawling
Package
@cyanheads/libofcongress-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
1
Tools verified
Nov 6, 2026

More from cyanheads

Related Search & Web Crawling MCP servers

View all
1cyanheads avatarWikipedia Mcp Servercyanheads/wikipedia-mcp-serverSearch and read Wikipedia articles and sections, list cited references, nearby pages, and languages.6stars
2ibeal avatarTidal Mcpibeal/tidal-mcpMCP server for TIDAL - search tracks, manage playlists, and get personalized recommendations6stars
3lineofflight avatarFrankfurterlineofflight/frankfurter-mcpConvert currencies and fetch blended FX rates from 50+ institutional sources.6stars
4jaytheskier avatarFedlex Connectorjaytheskier/fedlex-connectorSearch Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.6stars
5khalidsaidi avatarRAGMapkhalidsaidi/ragmapFind a retrieval MCP server that works today: a daily-checked list of servers that search knowledge.6stars
6mahach666 avatarPilotmcpmahach666/pilotmcpMCP server for ASCON Pilot-ICE PDM: objects, documents, remarks, search, admin6stars