libraryapi-mcp
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@libraryapi-mcp What are the three closest public libraries to 350 Fifth Ave, New York?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
libraryapi-mcp
mcp-name: dev.libraryapi/libraryapi-mcp
MCP server for libraryapi.dev — US public library data for AI agents.
Expose library lookups as tools to any MCP-compatible AI assistant (Claude, Cursor, Copilot, etc.). Built on the federal IMLS Public Libraries Survey — public domain, commercially usable.
Installation
pip install libraryapi-mcpOr run directly with uvx (no install needed):
uvx libraryapi-mcpRelated MCP server: Library of Congress MCP Server
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"libraryapi": {
"command": "uvx",
"args": ["libraryapi-mcp"],
"env": {
"LIBRARYAPI_KEY": "your_api_key_here"
}
}
}
}Cursor / other MCP clients
{
"mcpServers": {
"libraryapi": {
"command": "uvx",
"args": ["libraryapi-mcp"],
"env": {
"LIBRARYAPI_KEY": "your_api_key_here"
}
}
}
}Get a free API key at libraryapi.dev — 500 requests/month, no credit card.
Available Tools
Tool | Description |
| Find the nearest branches to a US street address |
| Same, but from a lat/lng (skips geocoding) |
| Full record for one branch outlet by ID |
| Search library systems by name, state, or city |
| Full system profile by FSCS ID |
| Statewide library totals |
Systems vs. outlets: a system is the administrative entity (e.g. "Chicago Public Library"); an outlet is an individual branch. Proximity searches return outlets.
Examples
Once configured, you can ask your AI assistant:
"What are the three closest public libraries to 350 Fifth Ave, New York?"
"How many public library branches are there in Vermont, and what's the total collection size?"
"I'm building a civic app — give me every library branch within 5 miles of downtown Chicago as JSON."
Data note
The IMLS survey covers locations, collections, staffing, visits, programs, and finances. It reports hours-open totals (annual, and per week) but not daily opening times — so this API can tell you a branch is open ~45 hours/week, not that it opens at 9am.
Links
Website: libraryapi.dev
REST API docs: libraryapi.dev/docs
License
MIT
Available Tools
6 toolsfind_libraries_near_addressA
Find the public library branches nearest to a US street address, sorted by distance.
Args: address: Full US street address, e.g. "350 Fifth Ave, New York, NY" radius_miles: Search radius in miles (0.1–50, default 10) limit: Maximum branches to return (1–100, default 10) include_closed: Include temporarily-closed branches (default False)
Inputs: address (required), limit, radius_miles, include_closed.
find_libraries_near_coordinatesA
Find the public library branches nearest to a latitude/longitude, sorted by distance. Use this when you already have coordinates; it skips geocoding and is faster than find_libraries_near_address.
Args: lat: Latitude (WGS84) lng: Longitude (WGS84) radius_miles: Search radius in miles (0.1–50, default 10) limit: Maximum branches to return (1–100, default 10) include_closed: Include temporarily-closed branches (default False)
Inputs: lat (required), lng (required), limit, radius_miles, +1 more.
get_libraryA
Get the full profile for a library system by its FSCS ID, including collections, staffing, visits, programs, and finances.
Args: fscs_id: IMLS FSCS ID for the library system, e.g. "IL0021"
Inputs: fscs_id (required).
get_outletA
Get the full record for one library branch (outlet) by its ID, including address, phone, coordinates, and service details.
Args: outlet_id: IMLS outlet ID
Inputs: outlet_id (required).
get_state_summaryA
Get statewide public library totals — systems, branch outlets, collections, and usage — for one state.
Args: state_code: Two-letter state abbreviation, e.g. "IL"
Inputs: state_code (required).
search_librariesA
Search public library systems by name, state, and/or city. A system is the administrative entity (e.g. "Chicago Public Library") that operates one or more branch outlets. Provide at least one of name, state, or city.
Args: name: Library system name (full-text search) state: Two-letter state code, e.g. "IL" city: City name (substring match) limit: Results per page (1–100, default 20) offset: Pagination offset (default 0)
Inputs: city, name, limit, state, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct purpose: get_library fetches system-level data by ID, get_outlet fetches branch-level data, search_libraries finds systems by criteria, find_libraries_near_address/coordinates handle geolocation, and get_state_summary provides aggregates. No two tools overlap in a way that would confuse an agent.
All tool names follow a consistent verb_noun snake_case pattern (get_, find_, search_). The naming is predictable and clearly indicates the action and target resource.
Six tools is well-scoped for a library data API. Each tool covers a distinct query pattern (lookup by ID, search, geospatial, summary) without unnecessary redundancy or bloat.
The tool surface covers the core domain tasks: retrieving individual records (library, outlet), searching for systems, finding nearby branches by address or coordinates, and getting statewide summaries. This is a complete set for the apparent purpose of accessing public library statistics and locations.
Maintenance
Related MCP Connectors
U.S. civic data for AI agents: reps, votes, bills, finance, lobbying, cited gov sources. 47 tools.
Search US grants + federal contracts (Grants.gov + SAM.gov) from any LLM.
SEC filings, Wikipedia, arXiv, US Census and more for AI agents, with every answer source-linked.
Search verified-open US grants (federal, state, foundation). Read-only MCP for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI assistants to the Open Library API for searching books and authors, retrieving metadata, and comparing works.1267 npmMIT
- 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
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query U.S. public-health datasets such as disease surveillance, mortality, behavioral risk factors, and flu activity through the Socrata API, using natural language or direct tool calls.296 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to access official Census Bureau statistics through the Census Data API and other official sources, supporting dataset discovery, geography resolution, FIPS lookup, and aggregate data retrieval.-