Skip to main content
Glama
README.md
# Open Public Domain

MCP server that gives AI agents access to the world's public domain library. Search, read, and navigate books and audiobooks from Project Gutenberg and LibriVox.

## What It Does

Agents can't read books. This fixes that.

Every other tool gives agents access to APIs, databases, and live data. But the written knowledge of human civilization -- books, essays, speeches, historical documents -- is largely inaccessible to agents through clean, legal APIs. Open Public Domain opens that up.

## Sources

| Source | Content | Access |
|--------|---------|--------|
| Project Gutenberg | 70,000+ books, full text | Text, HTML, EPUB |
| LibriVox | 15,000+ audiobooks | MP3 chapters |

## Tools

### Text (Gutenberg)

- **search_books** -- Search across all sources by title, author, or subject. Returns metadata.
- **get_book** -- Full metadata for a book, including parsed chapter list.
- **read_chapter** -- Read a specific chapter. The natural unit of reading.
- **read_work** -- Full text for short works (essays, poems, short stories under ~15k chars).
- **search_text** -- Full-text search within a book. Find where a concept appears across chapters, with context.

### Audio (LibriVox)

- **search_audiobooks** -- Search LibriVox by title or author.
- **list_audio_chapters** -- List all audio chapters for an audiobook with MP3 URLs and durations.
- **get_audio_chapter** -- Get the MP3 URL for a specific chapter.

## Setup

### Claude Desktop / Cursor / Windsurf

Add to your MCP config:

```json
{
  "mcpServers": {
    "open-public-domain": {
      "command": "npx",
      "args": ["-y", "open-public-domain"]
    }
  }
}
```

### Hermes

Add to `~/.hermes/config.yaml`:

```yaml
mcp_servers:
  open-public-domain:
    command: npx
    args: ["-y", "open-public-domain"]
```

### Development

```bash
git clone https://github.com/stuchapin909/open-public-domain.git
cd open-public-domain
npm install
npm start
```

## Design Decisions

**Chapter-level navigation, not full-book dumps.** A novel is 150,000+ tokens. Agents can't process that. read_chapter gives the agent one chapter at a time -- the same way a human reads.

**Full-text search with context.** search_text lets an agent say "where does Hobbes talk about the state of nature?" and get back the passage with surrounding context, plus which chapter it's in.

**No API keys.** All sources are public domain with open APIs. No configuration needed.

**Unified search.** search_books aggregates across all sources. The agent doesn't need to know or care which source a book comes from.

## Roadmap

- Standard Ebooks integration (better formatting, curated catalog)
- Wikisource integration (primary source documents)
- Internet Archive public domain subset
- DOAB (open access academic books)
- HathiTrust public domain collection
- Semantic search across full text
- Cross-book citation and quotation tracking

## License

MIT