Library of Congress MCP Server for LangChainGive LangChain instant access to 8 tools to Get Collection Items, Get Image Info, Get Item, and more
LangChain is the leading Python framework for composable LLM applications. Connect Library of Congress through Vinkius and LangChain agents can call every tool natively. combine them with retrievers, memory, and output parsers for sophisticated AI pipelines.
Ask AI about this MCP Server for LangChain
The Library of Congress MCP Server for LangChain is a standout in the Knowledge Management category — giving your AI agent 8 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
async def main():
# Your Vinkius token. get it at cloud.vinkius.com
async with MultiServerMCPClient({
"library-of-congress": {
"transport": "streamable_http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
response = await agent.ainvoke({
"messages": [{
"role": "user",
"content": "Using Library of Congress, show me what tools are available.",
}]
})
print(response["messages"][-1].content)
asyncio.run(main())
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About Library of Congress MCP Server
Connect your AI agent to the Library of Congress (LOC) and explore the vast digital archives of the United States' oldest federal cultural institution. Access millions of records, from historical newspapers to rare maps and sound recordings.
LangChain's ecosystem of 500+ components combines seamlessly with Library of Congress through native MCP adapters. Connect 8 tools via Vinkius and use ReAct agents, Plan-and-Execute strategies, or custom agent architectures. with LangSmith tracing giving full visibility into every tool call, latency, and token cost.
What you can do
- Global Search — Search across the entire LOC catalog including items, legislation, and blogs using the
searchtool. - Digital Collections — Browse and list all available digital collections or drill down into specific ones like the 'Abraham Lincoln Papers' using
list_collectionsandget_collection_items. - Format-Specific Discovery — Filter your research by specific media types such as maps, audio, or photos with
search_format. - Deep Bibliographic Research — Retrieve detailed metadata and digital resource links for specific items using
get_item. - OCR & Text Analysis — Access full-text OCR, word coordinates, and context snippets for digitized documents via
get_text_service. - Technical Image Metadata — Fetch IIIF technical data for high-resolution images using
get_image_info.
The Library of Congress MCP Server exposes 8 tools through the Vinkius. Connect it to LangChain in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 8 Library of Congress tools available for LangChain
When LangChain connects to Library of Congress through Vinkius, your AI agent gets direct access to every tool listed below — spanning digital-archives, historical-data, catalog-search, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Get collection items on Library of Congress
List items within a specific collection
Get image info on Library of Congress
json for a specific image identifier. Get technical metadata about an image (IIIF)
Get item on Library of Congress
Get detailed bibliographic data for a single item
Get resource on Library of Congress
g., a specific page of a newspaper) using resource_id. Get access to discrete digitized files
Get text service on Library of Congress
Access full-text OCR, word coordinates, and context snippets
List collections on Library of Congress
List all digital collections
Search on Library of Congress
using a keyword query. Search the entire Library of Congress website
Search format on Library of Congress
g., maps, photos, audio). Search items of a specific format
Connect Library of Congress to LangChain via MCP
Follow these steps to wire Library of Congress into LangChain. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
pip install langchain langchain-mcp-adapters langgraph langchain-openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the agent
python agent.pyExplore tools
Why Use LangChain with the Library of Congress MCP Server
LangChain provides unique advantages when paired with Library of Congress through the Model Context Protocol.
The largest ecosystem of integrations, chains, and agents. combine Library of Congress MCP tools with 500+ LangChain components
Agent architecture supports ReAct, Plan-and-Execute, and custom strategies with full MCP tool access at every step
LangSmith tracing gives you complete visibility into tool calls, latencies, and token usage for production debugging
Memory and conversation persistence let agents maintain context across Library of Congress queries for multi-turn workflows
Library of Congress + LangChain Use Cases
Practical scenarios where LangChain combined with the Library of Congress MCP Server delivers measurable value.
RAG with live data: combine Library of Congress tool results with vector store retrievals for answers grounded in both real-time and historical data
Autonomous research agents: LangChain agents query Library of Congress, synthesize findings, and generate comprehensive research reports
Multi-tool orchestration: chain Library of Congress tools with web scrapers, databases, and calculators in a single agent run
Production monitoring: use LangSmith to trace every Library of Congress tool call, measure latency, and optimize your agent's performance
Example Prompts for Library of Congress in LangChain
Ready-to-use prompts you can give your LangChain agent to start working with Library of Congress immediately.
"Search the Library of Congress for Civil War maps of Virginia."
"List all items in the 'world-war-i-posters' collection."
"Get the full text for the document segment 'service/gdc/gdcscd/00/01/02/03/0001.txt'."
Troubleshooting Library of Congress MCP Server with LangChain
Common issues when connecting Library of Congress to LangChain through Vinkius, and how to resolve them.
MultiServerMCPClient not found
pip install langchain-mcp-adaptersLibrary of Congress + LangChain FAQ
Common questions about integrating Library of Congress MCP Server with LangChain.
How does LangChain connect to MCP servers?
langchain-mcp-adapters to create an MCP client. LangChain discovers all tools and wraps them as native LangChain tools compatible with any agent type.Which LangChain agent types work with MCP?
Can I trace MCP tool calls in LangSmith?
Explore More MCP Servers
View all →
Amazon DSP
7 toolsDemand-Side Platform orchestration — manage display campaigns, audiences, and creatives via AI.

UK ONS Trade — International Trade & Business Activity
3 toolsUK trade and business statistics: trade in goods by country and commodity (imports, exports, balance), business counts by industry and geography from the IDBR register, and experimental traffic camera activity indicators from the ONS.

Unbounce
10 toolsBuild high-converting landing pages with AI-powered optimization that tests headlines, copies, and layouts automatically.

HeyGen
11 toolsAutomate AI video generation via HeyGen — manage avatars, videos, and templates directly from any AI agent.
