LibraryAPI

dev.libraryapi由 libraryapi.dev 發布v0.1.3更新於 Oct 24, 2026

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

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

LibraryAPI 讓助理依地址、座標、名稱、州或城市查詢美國公共圖書館與分館,資料來自聯邦 IMLS 調查。

可以做什麼
  • 依美國街道地址或經緯度座標尋找附近的圖書館分館
  • 依名稱、州或城市搜尋圖書館系統,並以 FSCS ID 取得完整系統檔案
  • 依 ID 取得單一分館的完整紀錄
  • 取得全州圖書館彙總資料,例如分館數量與館藏規模
適用情境
適合需要美國公共圖書館位置、分館細節或全州圖書館統計的情境,例如公民科技或在地應用、社區調查,或回答某地址附近最近的分館有哪幾間。
執行需求
以 Python 套件形式在本機透過 stdio 執行(pip install libraryapi-mcp 或 uvx libraryapi-mcp)。需設定環境變數 LIBRARYAPI_KEY,免費金鑰每月 500 次請求。需要連線至 libraryapi.dev 服務的網路存取。
安裝前請注意
API 金鑰透過環境變數 LIBRARYAPI_KEY 傳入,屬機密資訊,不應外流或提交至程式碼倉庫。請求會消耗每月額度,地址或座標查詢會傳送給第三方服務 libraryapi.dev。資料來自 IMLS 調查,僅提供每週/每年開放總時數,不含每日具體開門時間。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LibraryAPI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

bash
pip install libraryapi-mcp

Or run directly with uvx (no install needed):

bash
uvx libraryapi-mcp

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

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

Cursor / other MCP clients

json
{  "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

來源:README.md,提交 4f38f01

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.1.3最新Oct 4, 2026
  2. v0.1.2Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。