LibraryAPI

Registre officiel Autres

US public libraries and branches near any address, with collections from the IMLS survey

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

PYPI package libraryapi-mcp
Claude Code
claude mcp add libraryapi -e 'LIBRARYAPI_KEY=<your libraryapi_key>' -- uvx libraryapi-mcp==0.1.3
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "libraryapi": {
            "command": "uvx",
            "args": [
                "libraryapi-mcp==0.1.3"
            ],
            "env": {
                "LIBRARYAPI_KEY": "<your libraryapi_key>"
            }
        }
    }
}

Variables d'environnement

  • LIBRARYAPI_KEY obligatoire secret API key from https://libraryapi.dev (free tier: 500 requests/month)

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. libraryapi-mcp
  2. Installation
  3. Configuration
  4. Available Tools
  5. Examples
  6. Data note
  7. Links
  8. License

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.

License

MIT

Questions fréquentes

Qu'est-ce que LibraryAPI ?

US public libraries and branches near any address, with collections from the IMLS survey

Comment installer LibraryAPI ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add libraryapi -e 'LIBRARYAPI_KEY=<your libraryapi_key>' -- uvx libraryapi-mcp==0.1.3. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour LibraryAPI ?

Oui. Il attend LIBRARYAPI_KEY, à renseigner dans sa configuration.

LibraryAPI est-il open source ?

Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.

Qui maintient LibraryAPI ?

Il est publié par library-api. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.