pypi libraryapi-mcpstdioupdated 23d ago
MCP server for libraryapi.dev — US public library data for AI agents.
What can you do with LibraryAPI?
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-mcp
Or run directly with uvx (no install needed):
uvx libraryapi-mcp
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_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.
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
- PyPI: pypi.org/project/libraryapi-mcp
- REST API docs: libraryapi.dev/docs
License
MIT
Install
Add LibraryAPI to your client. Pick the one you use.
claude mcp add libraryapi-mcp -- uvx libraryapi-mcpcodex mcp add libraryapi-mcp -- uvx libraryapi-mcpamp mcp add libraryapi-mcp -- uvx libraryapi-mcp{
"mcpServers": {
"libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"libraryapi-mcp","command":"uvx","args":["libraryapi-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"libraryapi-mcp": {
"command": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"libraryapi-mcp": {
"type": "local",
"command": "uvx",
"args": [
"libraryapi-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"libraryapi-mcp": {
"command": {
"path": "uvx",
"args": [
"libraryapi-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
uvx libraryapi-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
6 tools
LibraryAPI exposes 6 tools to a connected agent.
- 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
Score
65 / 100
Good
- Documentation22/25
- Maintenance19/25
- Trust6/20
- Capability6/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 15 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 6 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.1.2Latest | Aug 16, 2026 |