libofcongress-mcp-server — Claude Code MCP server
Connects AI assistants to Library of Congress digital archives, Chronicling America historical newspapers with OCR, and LCSH subject headings.
claude mcp add --transport http libofcongress-mcp-server https://libofcongress.caseyjhand.com/mcpWhat libofcongress-mcp-server does
This server connects agents to digitized collections from the Library of Congress and the Chronicling America newspaper archive. It provides six tools and one resource URI (libofcongress://item/{+item_id}) to inject catalog metadata directly into conversation context. Catalog queries support filters across eight formats, including photos, maps, audio, films, books, and manuscripts.
Newspaper searches return only an initial snippet of roughly 500 characters from the OCR text. Reading the full page or extracting sentences around a specific keyword requires calling libofcongress_get_newspaper_page with a match parameter. The catalog search caps results at 100 entries per request, ignoring larger limits up to 1000 with a notice. The collection filter cannot be combined with a format filter.
Users can run the server locally through npx or point directly to the public hosted HTTP endpoint. The hosted setup needs no local runtime configuration.
What it helps with
- Search Library of Congress digital archives by format, location, and date
- Extract OCR transcripts and contextual passages from historic US newspapers
- Resolve standardized Library of Congress Subject Headings for research
- Retrieve structured bibliographic metadata, rights details, and media links
Example prompts for the agent
- Search the Library of Congress catalog for panoramic maps of Chicago published between 1870 and 1890.
- Find articles mentioning the influenza pandemic in Kansas newspapers from late 1918.
- Retrieve metadata and direct download files for item
sn95047246/1935-09-05/ed-1.
How to install libofcongress-mcp-server
1Platform CLI: remote server
claude mcp add --transport http libofcongress-mcp-server https://libofcongress.caseyjhand.com/mcp2Platform CLI
claude mcp add --env LOC_USER_AGENT=<LOC_USER_AGENT> --env LOC_REQUEST_DELAY_MS=<LOC_REQUEST_DELAY_MS> --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --env MCP_SESSION_MODE=<MCP_SESSION_MODE> --env MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> --transport stdio libofcongress-mcp-server -- npx -y @cyanheads/libofcongress-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
1Platform CLI: remote server
codex mcp add libofcongress-mcp-server --url https://libofcongress.caseyjhand.com/mcp2Platform CLI
codex mcp add libofcongress-mcp-server --env LOC_USER_AGENT=<LOC_USER_AGENT> --env LOC_REQUEST_DELAY_MS=<LOC_REQUEST_DELAY_MS> --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --env MCP_SESSION_MODE=<MCP_SESSION_MODE> --env MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> -- npx -y @cyanheads/libofcongress-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"mcpServers": {
"libofcongress-mcp-server": {
"url": "https://libofcongress.caseyjhand.com/mcp"
}
}
}{
"mcpServers": {
"libofcongress-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/libofcongress-mcp-server"
],
"env": {
"LOC_USER_AGENT": "<LOC_USER_AGENT>",
"LOC_REQUEST_DELAY_MS": "<LOC_REQUEST_DELAY_MS>",
"MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>",
"MCP_SESSION_MODE": "<MCP_SESSION_MODE>",
"MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"servers": {
"libofcongress-mcp-server": {
"type": "http",
"url": "https://libofcongress.caseyjhand.com/mcp"
}
}
}{
"servers": {
"libofcongress-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/libofcongress-mcp-server"
],
"env": {
"LOC_USER_AGENT": "<LOC_USER_AGENT>",
"LOC_REQUEST_DELAY_MS": "<LOC_REQUEST_DELAY_MS>",
"MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>",
"MCP_SESSION_MODE": "<MCP_SESSION_MODE>",
"MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
1Platform CLI: remote server
gemini mcp add -t http libofcongress-mcp-server https://libofcongress.caseyjhand.com/mcp2Platform CLI
gemini mcp add -e LOC_USER_AGENT=<LOC_USER_AGENT> -e LOC_REQUEST_DELAY_MS=<LOC_REQUEST_DELAY_MS> -e MCP_LOG_LEVEL=<MCP_LOG_LEVEL> -e MCP_SESSION_MODE=<MCP_SESSION_MODE> -e MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> libofcongress-mcp-server npx -y @cyanheads/libofcongress-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about libofcongress-mcp-server
How to install libofcongress-mcp-server in Claude Code?
Run this command in your terminal:
claude mcp add --transport http libofcongress-mcp-server https://libofcongress.caseyjhand.com/mcp
What does libofcongress-mcp-server do?
It queries Library of Congress catalogs, searches the Chronicling America newspaper archive, looks up LCSH headings, and retrieves page-level OCR text.
Why does newspaper search show only a snippet?
libofcongress_search_newspapers returns only the initial 500 characters of OCR text as an excerpt. To extract passages around a specific term or fetch the entire page, use libofcongress_get_newspaper_page.