Skip to main content
Glama
smeet666

mcp-libraryofcongress

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOC_LOG_LEVELNosilent, error, info or debug. Logs go to stderr.error
LOC_TIMEOUT_MSNoPer-request deadline for the catalogue, the records and the collections. Accepted between 1000 and 120000.30000
LOC_USER_AGENTNoIdentify your own client. The project's identifier is appended, so the Library can reach a human.
LOC_MAX_RETRIESNoRetries on rate limiting and transient errors, up to 8.3
LOC_CACHE_TTL_MSNoIn-memory cache lifetime. 0 turns it off.900000
LOC_MIN_INTERVAL_MSNoMinimum gap between requests. Values below 3000 ms are refused, as are values above 60000.6000
LOC_CACHE_MAX_ENTRIESNoIn-memory cache size, up to 5000.200
LOC_NEWSPAPER_TIMEOUT_MSNoPer-request deadline for search_newspapers, which reads the text of millions of pages and answers in tens of seconds. Accepted between 1000 and 300000.90000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_newspapersA

Search the text inside digitised American newspaper pages held by the Library of Congress. This reads what optical recognition took off the scanned pages, so it finds a phrase that appears nowhere in a title or a catalogue record. Put a phrase in double quotes to match it whole; without quotes the words are matched separately, which finds far more. 'total' counts the pages that match, and they page: ask for page 2, 3 and so on to see beyond the first answer. It is not a count of how many times the words occur. Each match names the newspaper, the date, the leaf of the issue and the state it was published in, and 'source_url' opens that leaf with the query applied. 'location' keeps to papers published in one state, 'publication' to a single paper, and 'year_from' with 'year_to' to a span of years. A filter matching nothing is dropped and the answer says so. The Library returns the opening of a page's text with each row rather than the whole page, so the searched words are often further down than the excerpts reach: 'words_located' says which of the two happened for each match. Use search_items instead when looking for a work by its title, creator or subject.

search_itemsA

Search the Library of Congress catalogue: books, photographs, maps, recordings, films, manuscripts, sheet music and newspaper titles. 'media_type' is required, because the Library keeps a separate catalogue for each kind of thing. This matches titles, creators and catalogue descriptions. It does not read the text inside a scan; use search_newspapers for a phrase printed on a newspaper page. 'subject', 'location', 'language' and 'collection' take the words the Library itself uses, as they appear on the rows this tool returns. A filter matching nothing is dropped and the answer says so. By default only material with a digitised copy is returned; set 'online_only' to false to take in records the Library holds on a shelf alone. Every row carries an 'identifier', which get_item takes.

get_itemA

Read one Library of Congress record by its identifier, as returned by search_items or search_newspapers. An identifier can carry slashes: a single newspaper issue is named by its paper, its date and its edition together. Sections are opt-in: 'basic' is the default and covers what a description needs. 'citations' returns the ready-made citations the Library publishes for the record. 'resources' lists the served copies, such as page images and downloadable files. 'full_metadata' returns every field the Library publishes for the record, which is large and rarely needed. A long description paginates: when 'next_offset' is not null, call again with 'offset' set to it.

list_collectionsA

List the digital collections of the Library of Congress: bodies of material a curator chose, described and published together. Use it to see what is there before searching, since a collection names a corpus that a query would have to guess at. 'collection_filter' on each row is the wording search_items takes as its 'collection' argument. 'item_count' is how many records the collection gathers, which is the size of the corpus rather than the number of rows here.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/smeet666/mcp-libraryofcongress'

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