US public libraries and branches near any address, with collections from the IMLS survey
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.
pip install libraryapi-mcp
Or run directly with uvx (no install needed):
uvx libraryapi-mcp
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"libraryapi": {
"command": "uvx",
"args": ["libraryapi-mcp"],
"env": {
"LIBRARYAPI_KEY": "your_api_key_here"
}
}
}
}
{
"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.
| Tool | Description |
|---|---|
find_libraries_near_address | Find the nearest branches to a US street address |
find_libraries_near_coordinates | Same, but from a lat/lng (skips geocoding) |
get_outlet | Full record for one branch outlet by ID |
search_libraries | Search library systems by name, state, or city |
get_library | Full system profile by FSCS ID |
get_state_summary | 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.
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."
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.
MIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx libraryapi-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"dev-libraryapi-libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencelibraryapi-mcppypiLibraryAPI works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.