Library of Congress MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Library of Congress MCP Server
A Model Context Protocol (MCP) server providing access to the U.S. Library of Congress digital collections API. This server enables Claude and other MCP clients to search, browse, and retrieve information from the Library of Congress's vast digital archives.
Features
π Universal Search: Search across all Library of Congress digital collections
π Format-Specific Search: Search within specific material types (books, audio, photos, maps, etc.)
ποΈ Collection Browsing: Browse and explore digital collections
π Item Details: Get detailed information about specific items
π Resource Access: Access individual pages and segments of items
π Advanced Filtering: Filter results by location, subject, contributor, and more
Related MCP server: Library of Congress MCP Server
Available Tools
loc_search
Search across all Library of Congress digital collections.
Parameters:
query(optional): Search query stringfacets(optional): Array of facet filters (e.g., ["location:ohio", "subject:baseball"])count(optional): Results per page (1-100, default 25)page(optional): Page number for paginationsort(optional): Sort by date, title, or shelf ID (with _asc/_desc)attributes(optional): Specific attributes to return
loc_search_format
Search within a specific material format.
Parameters:
format(required): One of: audio, books, film-and-videos, journals, maps, manuscripts, music, newspapers, notated-music, photos, prints, software, web-pagesquery(optional): Search query stringOther parameters same as
loc_search
loc_get_collections
Get a list of all available digital collections.
Parameters:
count(optional): Collections per pagepage(optional): Page number
loc_get_collection
Get information about a specific collection and browse its contents.
Parameters:
collectionName(required): Collection identifierquery(optional): Search within the collectioncount(optional): Items per pagepage(optional): Page number
loc_get_item
Get detailed information about a specific item.
Parameters:
itemId(required): Item identifierattributes(optional): Specific attributes to return
loc_get_resource
Get information about a specific resource (page/segment of an item).
Parameters:
resourceId(required): Resource identifierattributes(optional): Specific attributes to return
Installation
npm install
npm run buildIntegration with AI Desktop Applications
This MCP server works with any application that supports the Model Context Protocol (MCP).
Claude Desktop
Add to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"loc": {
"command": "node",
"args": ["/path/to/loc-mcp-server/dist/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
}Or use npx (after publishing to npm):
{
"mcpServers": {
"loc": {
"command": "npx",
"args": ["loc-mcp-server"]
}
}
}OpenAI ChatGPT Desktop
Add to your ChatGPT Desktop configuration file:
macOS: ~/Library/Application Support/ChatGPT/config.json
Windows: %APPDATA%/ChatGPT/config.json
Linux: ~/.config/ChatGPT/config.json
{
"mcpServers": {
"loc": {
"command": "node",
"args": ["/absolute/path/to/loc-mcp-server/dist/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
}Note: Replace /absolute/path/to/loc-mcp-server with the actual path where you cloned this repository.
Other MCP-Compatible Applications
This server follows the standard MCP protocol and should work with any MCP-compatible application. Refer to your application's documentation for MCP server configuration instructions.
Example Queries
Search for Abraham Lincoln materials:
Use the loc_search tool to find materials related to Abraham LincolnFind historical photographs:
Use the loc_search_format tool to search for "civil war" in the "photos" formatBrowse a specific collection:
Use the loc_get_collection tool to explore the "american-folklife-center" collectionGet item details:
Use the loc_get_item tool to get detailed information about a specific item IDAPI Information
This server uses the Library of Congress JSON/YAML API:
Base URL: https://www.loc.gov/
Documentation: https://www.loc.gov/apis/json-and-yaml/requests/
No authentication required
Rate Limiting
Important: The Library of Congress API has strict rate limits:
20 requests per minute maximum
1 hour blocking if rate limit is exceeded
429 status codes trigger automatic retry with exponential backoff
This MCP server implements:
β Automatic rate limiting (20 requests/minute)
β Request queuing and spacing
β 429 status code handling with retry logic
β Exponential backoff for failed requests
β Automatic window reset every minute
Available Material Formats
audio: Audio recordings and spoken word
books: Books and texts
film-and-videos: Motion pictures and videos
journals: Periodicals and serials
maps: Maps and cartographic materials
manuscripts: Handwritten and typescript materials
music: Musical recordings and scores
newspapers: Newspaper collections
notated-music: Sheet music and scores
photos: Photographs and images
prints: Prints and graphic arts
software: Digital software and programs
web-pages: Archived web content
Common Facet Filters
Use these in the facets parameter to filter results:
location:state_name(e.g., "location:virginia")subject:topic(e.g., "subject:baseball")contributor:name(e.g., "contributor:lincoln")language:code(e.g., "language:english")date:year(e.g., "date:1865")
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Start the server
npm startLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Access U.S. congressional data (bills, votes, members, committees) via MCP.
Unofficial Archive MCP β wraps the Internet Archive APIs (free, no auth)
Victoria and Albert Museum (V&A) Collections MCP. Keyless. Wraps the V&A Collections API v2.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying U.S. legislative data from Congress.gov API using MCP resources for direct lookups and tools for searching and retrieving related data.8MIT
- AlicenseNot gradedqualityCmaintenanceProvides access to the Library of Congress (loc.gov) data, enabling AI agents to search and retrieve information from the world's largest library.4 npmMIT
- AlicenseAqualityDmaintenanceEnables searching and retrieving historical records from the Library of Congress, including newspapers, photos, maps, manuscripts, audio, and film, via the Model Context Protocol.101MIT
- AlicenseAqualityCmaintenanceMCP server for searching and retrieving full-text pages from the Library of Congress, including newspapers, books, and manuscripts, via the loc.gov API.3Apache 2.0