Skip to content
MCP server

LibraryAPI

US public library branches near any address, with hours, collections and finance data

Runs locallyStatus and history
Pricing
Freemium
Platforms
API, CLI
Runs
Locally
Version
0.1.3
Listing updated
2 days ago

About LibraryAPI

LibraryAPI is a freemium MCP server for local services. It runs locally on your machine and is started by your AI client.

The data behind this server is the federal IMLS Public Libraries Survey, which the vendor says covers 17,586 library outlets nationwide. Each outlet and library system is keyed by its FSCS ID, so results can be cross-referenced with other federal library datasets.

The server separates systems from outlets: a system is the administrative entity, such as a city library, and an outlet is one branch. Proximity searches return outlets, and an address lookup handles the geocoding for you. Statewide totals and per-system profiles cover collections, staffing, visits, programs and finances.

One limit to know: the survey reports total hours open per year and per week, not daily opening times, so it can say a branch is open about 45 hours a week but not that it opens at 9am. You need a LibraryAPI key to use it.

Install

Run in a terminal

claude mcp add libraryapi-mcp --env LIBRARYAPI_KEY='<LIBRARYAPI_KEY>' -- uvx libraryapi-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "libraryapi-mcp": {
      "command": "uvx",
      "args": [
        "libraryapi-mcp"
      ],
      "env": {
        "LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "libraryapi-mcp": {
      "command": "uvx",
      "args": [
        "libraryapi-mcp"
      ],
      "env": {
        "LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "libraryapi-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "libraryapi-mcp"
      ],
      "env": {
        "LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "libraryapi-mcp": {
      "command": "uvx",
      "args": [
        "libraryapi-mcp"
      ],
      "env": {
        "LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "libraryapi-mcp": {
      "command": "uvx",
      "args": [
        "libraryapi-mcp"
      ],
      "env": {
        "LIBRARYAPI_KEY": "<LIBRARYAPI_KEY>"
      }
    }
  }
}

Configuration

  • LIBRARYAPI_KEYAPI key from https://libraryapi.dev (free tier: 500 requests/month)Required

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

find_libraries_near_address
Find the nearest branches to a US street address.
find_libraries_near_coordinates
Find nearby branches from a latitude and longitude, skipping 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.

What it does

Address and coordinate search
Find the nearest branches to a US street address or to a latitude and longitude.
Outlet records
Fetch the full record for a single branch by its outlet ID.
System search and profiles
Search library systems by name, state or city and open a profile by FSCS ID.
State summaries
Get statewide library totals in one call.
Collection and finance data
Collection counts, revenue, spending and program numbers from the IMLS survey.

Good for

  • Show the closest public libraries inside a civic or community app
  • Compare library funding and collection size across systems
  • Count branches and collection totals for a given state
  • Research grant or per-capita analyses with federal library identifiers

Pricing

Freemium

Free tier of 500 requests a month; paid tiers add email support, batch lookups, webhooks and an SLA. Paid prices not listed here.

Prices change. Check libraryapi.dev before you buy.

LibraryAPI FAQ

Does it need an API key?

Yes. Set LIBRARYAPI_KEY from libraryapi.dev; the free tier allows 500 requests a month.

Can it tell me what time a branch opens?

No. The survey only reports annual and weekly hours open, not daily opening times.

What is the difference between a system and an outlet?

A system is the administrative library entity and an outlet is an individual branch; proximity searches return outlets.

How do I install it?

Run it with uvx libraryapi-mcp or install the PyPI package libraryapi-mcp; it is MIT licensed.

Is LibraryAPI free?

LibraryAPI has a free plan, with paid plans for more usage or features.

How do I add LibraryAPI to Claude Code?

Run this command in your terminal: claude mcp add libraryapi-mcp --env LIBRARYAPI_KEY='<LIBRARYAPI_KEY>' -- uvx libraryapi-mcp

What are the best alternatives to LibraryAPI?

The closest alternatives to LibraryAPI are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, World Monitor and CompanyData.

Alternatives to LibraryAPI

  1. Open-source analytics app where an AI agent builds charts and dashboards from your data

    • Remote
    • Open source
    • 7.7K GitHub stars
    • Analytics and data
  2. Hosted MCP connector for managing Google Ads, Meta Ads, GA4 and Search Console from chat

    • 8 tools
    • Remote
    • Freemium
    • 8.1K GitHub stars
    • Marketing and SEO
  3. Indian NSE and BSE stock market data for AI assistants through 48 MCP tools

    • 17 tools
    • Remote
    • Freemium
    • 150 GitHub stars
    • Finance and payments
  4. World Monitor

    MCP server

    Live geopolitical intelligence dashboard with an API and MCP server for agents

    • Remote
    • Freemium
    • Analytics and data
  5. CompanyData

    MCP server

    Search and enrich company records from official registers via the CompanyData API

    • 3 tools
    • Remote
    • Paid
    • 3 GitHub stars
    • Analytics and data
  6. ChartAnt

    MCP server

    Remote MCP server returning charts, maps and dashboards as hosted PNG links

    • 51 tools
    • Remote
    • Freemium
    • Design and media