# LibraryAPI

> LibraryAPI is a freemium MCP server for local services. US public library branches near any address, with hours, collections and finance data. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI
- **Website:** https://libraryapi.dev
- **Repository:** https://github.com/library-api/libraryapi-mcp
- **MCP Registry name:** dev.libraryapi/libraryapi-mcp
- **Categories:** local services, analytics and data
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## 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

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/libraryapi
