Library Loans MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Library Loans MCP Server Record that I checked out The Hidden Life of Trees at Northgate today."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Library Loans MCP Server
A small, local-first MCP server that keeps track of the books you borrow from your public library branches. Record loans when you check books out, track holds while you wait your turn, renew when you get to, and ask simple questions any time: what's due soon? what's overdue? how do things look per branch? The answers come back as plain, readable text that you (or an AI agent) can act on directly.
Everything lives in one JSON file on your own disk. There is no cloud, no
account, and nothing to install beyond Python and the official mcp package.
What it is not
This project is about borrowed physical books and their logistics. It is distinct from:
reading-room-mcp-server - reading notes and content you already own (highlights, annotations, what the book said).
dates-to-remember-mcp-server - general-purpose date reminders (birthdays, appointments, deadlines of every kind).
Library-loans is purely for the borrowed-copy lifecycle: checked out, due, renewed, returned, hold placed, hold ready, picked up.
Related MCP server: Toolbox Lending MCP Server
Tools
Tool | What it does |
| Save a checkout: title, author, branch, checkout date, due date (defaults: today, +21 days) |
| Push the due date out (renews from the current due date; blocked when overdue, out of renewals, or a hold waits on the title) |
| Mark a loan returned so it stops showing up in queries |
| All loans, or just active ones, with status marks |
| Loans due within the next N days (default 7) |
| Loans past their due date, most urgent first |
| Per-branch counts: active loans, due soon, overdue, open holds |
| Add a hold (waiting) for a title at a branch; one active hold per title per branch |
| Move a hold along: |
| Cancel a hold (final state) |
| All holds, optionally filtered by status |
House rules an agent can rely on:
Renewals extend from the current due date, never from today.
A loan can be renewed at most 2 times, and never while it is overdue.
An active hold (waiting or ready) on the same title blocks renewal - someone is waiting for that copy.
Hold statuses only move forward;
picked_upandcancelledare final.
Getting started
Requires Python 3.10+.
pip install -e .
# or: pip install mcp and run the module directly from the repoData lives in one JSON file. Set its location before starting the server:
export LIBRARY_LOANS_PATH="$HOME/library-loans/loans.json"Then add the server to your MCP client (opencode, Claude Desktop, anything that speaks MCP):
{
"mcpServers": {
"library-loans": {
"command": "python",
"args": ["-m", "library_loans.server"],
"env": { "LIBRARY_LOANS_PATH": "/home/you/library-loans/loans.json" }
}
}
}A typical conversation:
"Record that I checked out The Hidden Life of Trees at Northgate today." "What's due in the next week?" "Where do things stand across my branches?"
The tool results are plain text with status marks like [OVERDUE] and
[due soon], plus per-branch tallies, so an agent can summarize and suggest
next steps without parsing anything exotic.
Privacy
All data stays in the local JSON file you point it at. Nothing is uploaded, no metrics are collected, and there is nothing to sign into. Delete the file and your data is gone. Don't put names of family members into the title or author fields you don't want sitting in plaintext on disk - this is a plain JSON file, treat it like any other local document.
Development
python -m pytest tests/ -vTests use a frozen "today" date and a throwaway JSON file, so they are deterministic and never touch real data.
Changelog summary
0.1.0 - First version: loans, holds, renewals, due-soon/overdue queries, and per-branch tallies.
About the maker
Library Loans MCP Server is brought to you by Asdale Dynamics, LLC - the publishing/company hub behind Dylan Asdale's plain-English AI books and beginner-friendly tools. Like everything at Asdale Dynamics, it's local-first, respects your privacy, and is designed for people who want AI explained like a friend would: step by step, never condescending.
License
MIT - see LICENSE. Copyright (c) 2026 Asdale Dynamics, LLC.
Available Tools
11 toolsbranch_talliesA
Per-branch counts: active loans, overdue, due soon, and open holds.
Inputs: no named parameters. Returns: result
cancel_holdB
Cancel a hold that is waiting or ready (final state).
Inputs: hold_id (required). Returns: result
due_soonB
Active loans due within days of today (default 7).
Inputs: days. Returns: result
list_holdsA
List holds (all, or filtered: waiting, ready, picked_up, cancelled).
Inputs: status. Returns: result
list_loansA
List loans, newest last. Default shows only active (not returned).
Inputs: active_only. Returns: result
list_overdueA
Loans past their due date, most-urgent first.
Inputs: no named parameters. Returns: result
place_holdB
Place a hold (waiting status) on a title at a branch. One active hold per title per branch.
Inputs: title (required), branch (required). Returns: result
record_loanA
Record a checked-out book. Dates use YYYY-MM-DD; checked_out defaults to today and due defaults to checked_out + loan_days (21).
Inputs: title (required), branch (required), due, author, +2 more. Returns: result
renew_loanA
Extend a loan by days from its current due date. Blocked if the
loan is overdue, out of renewals (2), or an active hold has that title.
Inputs: loan_id (required), days. Returns: result
return_loanB
Mark a loan returned (default today, or YYYY-MM-DD).
Inputs: loan_id (required), returned_on. Returns: result
update_holdB
Move a hold along: waiting -> ready -> picked_up. Cancel from waiting or ready. Use YYYY-MM-DD-worthy caution; statuses cannot undo.
Inputs: status (required), hold_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Loan actions (record/renew/return) and hold actions (place/update/cancel) are clearly distinct, and the query tools have focused filters. However, cancel_hold largely duplicates a subset of update_hold (cancelling from waiting/ready), and due_soon/list_overdue are filtered views that overlap with list_loans, creating minor selection ambiguity.
Most names follow a predictable verb_noun snake_case pattern (renew_loan, record_loan, return_loan, place_hold, update_hold, cancel_hold, list_holds). A few deviations break the pattern: due_soon and list_overdue use adjective/adverb forms, and branch_tallies is noun_noun.
Eleven tools is well within the ideal range and each maps to a meaningful loan or hold operation. The set is neither bloated nor thin for a library circulation domain.
Loan lifecycle (record, renew, return, list, overdue, due soon) and hold lifecycle (place, advance/cancel, list) are well covered, with branch reporting. Minor gaps exist: no single-loan or single-hold lookup, no way to filter loans by patron/title, and no correction/update path for a mis-recorded loan.
Maintenance
Related MCP Connectors
AI assistant integration for Leaf — track books, log reading sessions, and manage your library.
Manage your Readlink book library: add books, track reading, rate, notes, highlights, shelves.
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
Track subscriptions and renewals from your AI chat: schedules, due dates, reminders, local data.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to interact with BookLore self-hosted libraries, allowing natural language queries to search books, manage reading status, ratings, series, authors, and highlights.71-
- AlicenseNot gradedqualityCmaintenanceEnables household tracking of tools and consumables, tool lending and returns, maintenance reminders, project gap shopping lists, and seasonal tune-up prompts through natural language, with local JSON storage and backups.MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to search a self-hosted ebook, comic and audiobook library, inspect books' metadata and shelves, and safely edit metadata, tags, genres, authors and shelf assignments. Safety is enforced in code: no delete tools, locked fields are refused, and bulk edits require a preview plus explicit confirmation.8MIT
- AlicenseAqualityBmaintenanceEnables an AI agent to track per-character FFXIV daily and weekly chores—such as grand company turn-ins, duty support queues, beast tribe allowances, and custom tasks—and receive readable due/overdue summaries from local JSON data.8MIT