mcpField
L
LibraryAPI

LibraryAPI

Local
libraryapi.devMaps & Travel0Updated 3w ago

About LibraryAPI

LibraryAPI provides US public library and branch data for AI agents and applications, based on the federal IMLS Public Libraries Survey. It supports proximity searches, system lookups, and state-level summaries, with collection and service data but not daily opening times.

Key features

  1. 01Find branches near an address
  2. 02Search near latitude and longitude
  3. 03Look up library systems and branches
  4. 04Retrieve statewide library totals
  5. 05Access collections, staffing, and service data

Use cases

  1. 01Find nearby branches for a given address
  2. 02Explore library systems by name, state, or city
  3. 03Build civic apps using branch and collection data

MCP support

The MCP server exposes six tools for searching nearby branches, retrieving branch and system records, and getting state summaries.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dev-libraryapi-libraryapi": {
"command": "uvx",
"args": [
"libraryapi-mcp"
],
"env": {
"LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
}
}
}
}
Run commanduvx libraryapi-mcp
Environment variables to set
LIBRARYAPI_KEYSecretAPI key from https://libraryapi.dev (free tier: 500 requests/month)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypilibraryapi-mcp0.1.3

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
limitintegerNo
addressstringYes
radius_milesnumberNo
include_closedbooleanNo

Details

From the project README

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

ToolDescription
find_libraries_near_addressFind the nearest branches to a US street address
find_libraries_near_coordinatesSame, but from a lat/lng (skips geocoding)
get_outletFull record for one branch outlet by ID
search_librariesSearch library systems by name, state, or city
get_libraryFull system profile by FSCS ID
get_state_summaryStatewide 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

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.