Skip to main content
Glama
reading-cottage

reading-cottage

by 1nwooozip

Reading Cottage / 共读小屋

English | 简体中文

A local EPUB reader for reading together with AI agents.

Read, highlight, annotate, and reply in the browser. Connect an agent through MCP to read the same pages, join the discussion, and carry its notes into the next reading session.

Features

  • Bookshelf and reading: import EPUBs, favorite books, read by chapter, and track shared progress.

  • Bilingual interface: switch between English and Chinese; your choice is saved. Book text stays in its original language.

  • Selection annotations: select text to highlight it or leave a note, then open the discussion drawer to read annotations and replies.

  • Ongoing reading: each participant keeps their own cross-chapter notes. Starred annotations provide shared context for later reading.

  • Parallel editions: link two editions, match paragraphs by their relative position within a chapter, and mirror annotations and replies.

Related MCP server: Co-Reading MCP

Install and run

Requires Python 3.12 or later.

git clone https://github.com/1nwooozip/reading-cottage.git
cd reading-cottage
python3.12 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/reading-cottage --data-dir "$PWD/.reading-cottage" init
.venv/bin/reading-cottage --data-dir "$PWD/.reading-cottage" serve

Open http://127.0.0.1:3002 and upload an EPUB to start reading.

These commands store books, configuration, and reading records in the project's .reading-cottage directory. Without --data-dir, the default is ~/.reading-cottage.

You can also import books and link editions from the command line:

.venv/bin/reading-cottage --data-dir "$PWD/.reading-cottage" import /path/to/book.epub
.venv/bin/reading-cottage --data-dir "$PWD/.reading-cottage" link 1 2

Connect an agent

Add the service to a client that supports stdio MCP. The example below uses a common JSON configuration format; replace the paths with absolute paths on your machine. The browser app and MCP server should use the same data directory.

{
  "mcpServers": {
    "reading-cottage": {
      "command": "/absolute/path/to/reading-cottage/.venv/bin/reading-cottage-mcp",
      "args": [
        "--data-dir", "/absolute/path/to/reading-cottage/.reading-cottage",
        "--agent-id", "my-agent",
        "--agent-name", "My Reading Agent"
      ]
    }
  }
}

Once connected, ask your agent to check the bookshelf, read a chapter, and leave annotations. Reply to its notes in the browser.

Tool

Purpose

reader_list_books

List books and reading progress

reader_start_reading

Get a chapter, the agent's notes, starred context, and the previous chapter's discussion

reader_get_chapter

Read a chapter with annotations and highlights

reader_add_annotation

Add a paragraph annotation or reply

reader_mark_chapter_done

Mark a chapter as read and advance progress

reader_update_journal

Append to cross-chapter notes

reader_get_paragraph_thread

Read a paragraph's full discussion

Names and reading records

The first init creates config.toml in the data directory:

[human]
id = "reader"
name = "Reader"

[agent]
id = "agent"
name = "Reading Agent"

name is the display name. Keep id stable so it stays associated with earlier records. The browser uses [human]; MCP uses [agent] or the identity supplied through startup arguments. Give another agent a different --agent-id to keep its authorship and notes separate.

Progress and starred annotations are shared per book. Cross-chapter notes are stored per participant; when starting a chapter, MCP retrieves the current agent's own notes.

Usage notes

  • Best suited to text-focused EPUBs. Complex layouts, footnotes, and images in the body may not be fully parsed.

  • Parallel editions are matched by relative paragraph position within the same chapter number. Use the browser controls to adjust the position when the match is off.

  • The server listens on the local machine by default and is intended for personal use. Remote access requires separate authentication and access controls.

Development

.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest -q

Integration tests use temporary databases and generated EPUB fixtures to cover import, annotations, replies, mirroring, and reading records across HTTP and stdio MCP.

Dependencies and license

Licensed under AGPL-3.0-or-later. See SOURCE.md for project provenance and third-party credits.

Available Tools

7 tools
reader_add_annotationB

Write a paragraph annotation as this MCP server's stable agent identity.

Inputs: content (required), paragraph_id (required), reply_to_id. Returns: result

reader_get_chapterA

Get a chapter with all paragraph annotations and highlights.

Inputs: book_id (required), chapter_index (required). Returns: result

reader_get_paragraph_threadA

Get one paragraph and its complete annotation thread.

Inputs: paragraph_id (required). Returns: result

reader_list_booksC

List the local bookshelf and shared reading progress.

Inputs: order. Returns: result

reader_mark_chapter_doneB

Mark a chapter done and advance the book's shared progress.

Inputs: book_id (required), chapter_index (required). Returns: result

reader_start_readingA

Return one chapter plus this agent's journal, pinned context, and previous discussion.

This is context, not an unread-reply queue. Keep comments short and avoid later-chapter spoilers by convention; the tool does not enforce a spoiler access boundary.

Inputs: book_id (required), chapter_index (required). Returns: result

reader_update_journalA

Append to this agent identity's separate per-book running journal.

Inputs: text (required), book_id (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools are clearly distinct: listing books, annotating, marking done, updating the journal, and fetching paragraph threads all have separate purposes. However, reader_start_reading and reader_get_chapter both return chapter content, so an agent could be uncertain which to use if it simply wants to read a chapter.

    Naming Consistency4/5

    All tools share the reader_ prefix and mostly follow a verb_noun pattern such as list_books, get_chapter, add_annotation, and update_journal. reader_start_reading and reader_mark_chapter_done deviate slightly from the pure noun-object form but are still predictable and readable.

    Tool Count5/5

    Seven tools is a well-scoped count for a reading, annotation, progress, and journal workflow. Each tool serves a distinct purpose and the set does not feel bloated or thin.

    Completeness4/5

    The set covers the core lifecycle: list books, read chapters, annotate paragraphs, view annotation threads, advance progress, and update a journal. Minor gaps exist, such as no standalone journal retrieval or annotation update/delete, but reader_start_reading surfaces the journal and annotations appear designed as append-only.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to read and navigate EPUB files through 13 specialized tools for pagination, full-text search, metadata access, and footnote resolution. Supports session-based reading with table of contents navigation and chapter summaries.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A low-token human-AI co-reading MCP tool that imports local EPUB/TXT/Markdown books into chunks, enabling AI to read only relevant fragments and write co-reading results to long-term reading notes and progress files.
      79
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables browsing, searching, and quote verification of a local ebook library via MCP, providing deterministic RAG with no embeddings or network.
      6
      2
      MIT