# Lire gratuitement: talk to books with your AI

This file tells an assistant (Claude, ChatGPT or any other) how to use the liregratuitement.com library: 120 682 public-domain books in French, with their exact text, chapter by chapter.

## Option 1: install the MCP server (recommended)

Server URL: `https://liregratuitement.com/mcp` (HTTP transport, no authentication).

### Claude (claude.ai and desktop app)

Settings, then Connectors, then “Add custom connector”. Name: Lire gratuitement. URL: https://liregratuitement.com/mcp

### Claude Code

In a terminal:

```
claude mcp add --transport http liregratuitement https://liregratuitement.com/mcp
```

### ChatGPT

Settings, then Apps & Connectors, enable developer mode, then “Create” with the server URL: https://liregratuitement.com/mcp

### Cursor

In ~/.cursor/mcp.json:

```
{
  "mcpServers": {
    "liregratuitement": {
      "url": "https://liregratuitement.com/mcp"
    }
  }
}
```

### VS Code (Copilot)

In .vscode/mcp.json:

```
{
  "servers": {
    "liregratuitement": {
      "type": "http",
      "url": "https://liregratuitement.com/mcp"
    }
  }
}
```

### Any other MCP client

HTTP transport (Streamable HTTP), JSON-RPC 2.0, no authentication: https://liregratuitement.com/mcp

Available tools:

- `chercher_livres` (requete, auteur, rayon, relu_seulement, limite): Search the catalogue by title, author or keyword.
- `fiche_livre` (slug): Book record: verified summary, shelf, difficulty, reading time, source, licence, chapters.
- `lire_chapitre` (slug, numero, partie): Exact text of a chapter (split into 30,000-character parts when needed).
- `chercher_passage` (slug, texte): Find an exact passage, with its chapter and link.

## Option 2: no installation

An assistant that can read web addresses can use the API directly:

- Search: `https://liregratuitement.com/api/v1/livres?q=boule+de+suif`
- Book record and chapters: `https://liregratuitement.com/api/v1/livres/{slug}`
- Chapter text: `https://liregratuitement.com/api/v1/livres/{slug}/chapitres/{n}`
- Full text: `https://liregratuitement.com/api/v1/livres/{slug}/texte`
- Find a passage: `https://liregratuitement.com/api/v1/livres/{slug}/passages?q=...`

For a given book, paste `https://liregratuitement.com/livre/{slug}/ia.en.md` into your assistant. Every book page also has a « Parler au livre » button that opens ChatGPT, Claude, Le Chat or Perplexity with the French version, `ia.md`, already loaded.

## Rules for the assistant

1. Always quote the exact text, with the chapter number and the liregratuitement.com link.
2. Do not reveal the ending unless the reader asks.
3. If something is not in the text, say so instead of making it up.
4. Texts marked “digitised” may contain OCR errors: flag them when they matter.
5. Texts sourced from Gallica cannot be reused commercially without a BnF licence (`usage_commercial: false`).

Full documentation: https://liregratuitement.com/en/developers/
