{
  "markdown": "# mcp-archiveorg\n\n[![npm](https://img.shields.io/npm/v/mcp-archiveorg.svg)](https://www.npmjs.com/package/mcp-archiveorg)\n[![CI](https://github.com/smeet666/mcp-archiveorg/actions/workflows/ci.yml/badge.svg)](https://github.com/smeet666/mcp-archiveorg/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/mcp-archiveorg.svg)](./LICENSE)\n[![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-6E56CF)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.smeet666/mcp-archiveorg)\n[![Glama](https://glama.ai/mcp/servers/smeet666/mcp-archiveorg/badges/score.svg)](https://glama.ai/mcp/servers/smeet666/mcp-archiveorg)\n[![M8ven](https://m8ven.ai/badge/mcp/smeet666-mcp-archiveorg-1wia08?variant=verified)](https://m8ven.ai/mcp/smeet666-mcp-archiveorg-1wia08)\n[![LobeHub](https://lobehub.com/badge/mcp/smeet666-mcp-archiveorg)](https://lobehub.com/mcp/smeet666-mcp-archiveorg)\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=archiveorg&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1hcmNoaXZlb3JnIl19)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=archiveorg&config=%7B%22name%22%3A%22archiveorg%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-archiveorg%22%5D%7D)\n\n<!-- m8ven-verify: 1b912922cee8f3a46080bbb4b83487e1 -->\n\nThe [Internet Archive](https://archive.org) is a non-profit library that keeps\nwhat the world publishes: scanned books, films, recorded music, radio, software,\nand the pages of the web itself, captured over and over since 1996 in the Wayback\nMachine. Millions of its books and documents have been run through optical\ncharacter recognition, so the words inside them can be searched, and the Open\nLibrary index beside it describes works, their editions and their subjects.\n\nThis server connects a chat client to that library. You can search the full text\ninside its documents, search its catalogue of items, read one item's record and\nits files, look up a book by subject, place, period or person, and read the web\nas it stood on a given day. It needs no API key and no account.\n\n_[Version française](#mcp-archiveorg-français)_\n\n---\n\n## Install\n\n**One-click install**\n\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=archiveorg&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1hcmNoaXZlb3JnIl19)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=archiveorg&config=%7B%22name%22%3A%22archiveorg%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-archiveorg%22%5D%7D)\n\n**Claude Code**\n\n```bash\nclaude mcp add archiveorg -- npx -y mcp-archiveorg\n```\n\n**Claude Desktop, Cursor, and any client using the standard config format**\n\n```json\n{\n  \"mcpServers\": {\n    \"archiveorg\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-archiveorg\"]\n    }\n  }\n}\n```\n\nNode 24 or later is required, and no environment variable has to be set.\n\n### With Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"archiveorg\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"ghcr.io/smeet666/mcp-archiveorg:2.0.2\"]\n    }\n  }\n}\n```\n\n`-i` keeps stdin open, which is where the protocol travels, and `-t` is left out\nbecause a TTY rewrites the stream. The container needs outbound HTTPS to\n`archive.org`, `web.archive.org` and `openlibrary.org`, and nothing else: no\nvolume, no port, no credential.\n\n### Bundle, without npm\n\nDownload `mcp-archiveorg-2.0.2.mcpb` from\n[the latest release](https://github.com/smeet666/mcp-archiveorg/releases/latest)\nand open it. A client that supports MCP bundles installs it on its own, with no\nnpm and no configuration file to edit. The bundle carries its dependencies, so\nnothing is fetched at install time.\n\n## What you can ask\n\n- \"Which books mention the Beaumont light-house?\"\n- \"Find me items about the 1906 San Francisco earthquake.\"\n- \"What files does that item hold, and what licence is it under?\"\n- \"Find me books on beekeeping in France published before 1900.\"\n- \"What did that website look like in March 2001?\"\n\nThe ordinary path runs from a search to a record: a row carries an `identifier`,\nand `get_item` reads it.\n\n## Tools\n\n| Tool             | What it does                                                      |\n| ---------------- | ----------------------------------------------------------------- |\n| `search_inside`  | Searches the words inside the archive's scanned documents.        |\n| `search_items`   | Searches the catalogue by title, creator, subject and media type. |\n| `get_item`       | Reads one item's record, its files and its licence.               |\n| `search_books`   | Finds books by subject, place, period, person, length or year.    |\n| `list_snapshots` | Lists the captures the Wayback Machine holds for an address.      |\n| `get_snapshot`   | Reads one capture of an address, at or near a date.               |\n\n### `search_inside`\n\nSearches the text inside the archive's documents, which came off the page through\noptical character recognition, so a passage carries the misreadings of that\nprocess.\n\n| Argument                 | Type                               | Required | What it does                                 |\n| ------------------------ | ---------------------------------- | -------- | -------------------------------------------- |\n| `query`                  | string, 2 to 300 characters        | yes      | The phrase to look for inside the documents. |\n| `limit`                  | integer, 1 to 50, default `10`     | no       | Matches to serve.                            |\n| `page`                   | integer, 1 to 100, default `1`     | no       | Which page of matches.                       |\n| `max_excerpt_chars`      | integer, 80 to 1200, default `300` | no       | How much of a passage to serve.              |\n| `max_excerpts_per_match` | integer, 1 to 10, default `3`      | no       | Passages served per matching document.       |\n\n**In return:** `hits`, each carrying `identifier`, which `get_item` takes;\n`title`, `creator` and `year`; `excerpts`, the passages as a machine read them\noff the page; `matched_file`, naming what actually holds the passage; and\n`source_url`. `inside_container` is true when the item bundles several documents\nand the passage sits in one of them, in which case the title, the creator and the\nyear belong to the container.\n\n**`total` counts documents, and it pages.** It is a number of documents and the last page of a match set is shorter than the\nfirst. **No page number is available:** the index reports where the text sits\ninside the item, which is `1` on nearly every match, so nothing here states a\npage of a book and no link claims one.\n\n### `search_items`\n\nSearches the catalogue itself, across every kind of thing the archive holds.\n\n| Argument     | Type                                                                         | Required | What it does                        |\n| ------------ | ---------------------------------------------------------------------------- | -------- | ----------------------------------- |\n| `query`      | string, 1 to 300 characters                                                  | yes      | Words to look for in the catalogue. |\n| `media_type` | `texts`, `movies`, `audio`, `image`, `software`, `data` or `web`             | no       | The kind of thing to keep.          |\n| `year_from`  | integer, 1 to 2200                                                           | no       | Earliest year.                      |\n| `year_to`    | integer, 1 to 2200                                                           | no       | Latest year.                        |\n| `sort`       | `relevance`, `downloads`, `newest`, `oldest` or `title`, default `relevance` | no       | How the rows are ordered.           |\n| `limit`      | integer, 1 to 50, default `10`                                               | no       | Rows to serve.                      |\n| `page`       | integer, 1 to 100, default `1`                                               | no       | Which page of rows.                 |\n\n**In return:** `items`, each carrying `identifier`, `title`, `creator`, `year`,\n`media_type`, `downloads` and `source_url`, a field the record leaves empty being\n`null`. `total` counts the items matching across the catalogue, which is more\nthan the number returned.\n\n### `get_item`\n\nReads one item's record. The heavier parts are asked for rather than served by\ndefault, since a record can run long.\n\n| Argument                | Type                                                            | Required | What it does                          |\n| ----------------------- | --------------------------------------------------------------- | -------- | ------------------------------------- |\n| `identifier`            | string, 1 to 200 characters                                     | yes      | The identifier a search row carries.  |\n| `sections`              | array of `basic`, `files`, `full_metadata`, default `[\"basic\"]` | no       | Which parts to return.                |\n| `file_format`           | string, up to 60 characters                                     | no       | Keep the files of one format.         |\n| `max_files`             | integer, 1 to 200, default `25`                                 | no       | Ceiling on the files returned.        |\n| `max_description_chars` | integer, 100 to 20000, default `2000`                           | no       | How much of the description to serve. |\n\n**In return:** the item with its `title`, `creator`, `year`, `media_type` and\n`source_url`, plus `description`, `date`, `publisher`, `language`, `collections`\nand `license_url`, each `null` where the record states nothing. `file_count`\ncounts the files the item holds whatever this answer returned, and `total_bytes`\ntheir weight. `files` and `full_metadata` are present only when asked for in\n`sections`.\n\n### `search_books`\n\nFinds books through the index of works beside the archive, which describes a work\nand its editions rather than one scanned copy.\n\n| Argument    | Type                                                                        | Required | What it does                           |\n| ----------- | --------------------------------------------------------------------------- | -------- | -------------------------------------- |\n| `query`     | string, 2 to 300 characters                                                 | no       | Free text, when there is any.          |\n| `subject`   | string, 2 to 100 characters                                                 | no       | A subject the index files works under. |\n| `place`     | string, 2 to 100 characters                                                 | no       | A place a work is about.               |\n| `time`      | string, 2 to 100 characters                                                 | no       | A period a work is about.              |\n| `person`    | string, 2 to 100 characters                                                 | no       | A person a work is about.              |\n| `language`  | string, 2 to 20 characters                                                  | no       | The language of the work.              |\n| `year_from` | integer, 1 to 2200                                                          | no       | Earliest first publication.            |\n| `year_to`   | integer, 1 to 2200                                                          | no       | Latest first publication.              |\n| `pages_min` | integer, 1 to 100000                                                        | no       | Shortest acceptable work.              |\n| `pages_max` | integer, 1 to 100000                                                        | no       | Longest acceptable work.               |\n| `sort`      | `relevance`, `rating`, `readers`, `newest` or `oldest`, default `relevance` | no       | How the rows are ordered.              |\n| `limit`     | integer, 1 to 50, default `10`                                              | no       | Rows to serve.                         |\n| `page`      | integer, 1 to 100, default `1`                                              | no       | Which page of rows.                    |\n\n**In return:** `books`, each carrying `title`, `authors`, `first_published_year`,\n`edition_count`, `archive_identifiers` for the scanned copies the archive holds,\n`scan_count`, `page_count` as a median across editions, `subjects` and\n`source_url`. `searched_for` says in words what this answer answers, free text\nand every criterion applied, and `query` is `null` when the search was made of\ncriteria alone. `total` counts the works matching.\n\n### `list_snapshots`\n\nLists the captures the Wayback Machine holds for one address.\n\n| Argument | Type                            | Required | What it does                               |\n| -------- | ------------------------------- | -------- | ------------------------------------------ |\n| `url`    | string, 3 to 2000 characters    | yes      | The address to look up.                    |\n| `limit`  | integer, 1 to 100, default `20` | no       | Captures to serve.                         |\n| `cursor` | string, up to 500 characters    | no       | The `next_cursor` a previous answer named. |\n\n**In return:** `snapshots`, each with its `captured_at` as an ISO timestamp in\nUTC, the `url` of the capture itself, and the `status` the crawl recorded.\n`first` and `last` describe this answer rather than the whole history, and\n`next_cursor` continues the listing.\n\n### `get_snapshot`\n\nReads one capture of an address, at a date or near it.\n\n| Argument | Type                             | Required | What it does                                        |\n| -------- | -------------------------------- | -------- | --------------------------------------------------- |\n| `url`    | string, 3 to 2000 characters     | yes      | The address to look up.                             |\n| `at`     | `YYYY-MM-DD` or an ISO timestamp | no       | The date to aim for. The newest capture by default. |\n\n**In return:** the `snapshot` with its `captured_at` and its address, beside the\n`requested_url` and `requested_at`, so the distance between the date asked for\nand the capture served is visible. The Wayback Machine answers a date it has no\ncapture for with the nearest one it holds.\n\n## What excerpts are worth\n\nThe text inside a scanned document came off the page through optical character\nrecognition. A passage therefore carries the misreadings of that process, and it\nis served as it was read rather than corrected: a word that reads oddly is what\nthe machine saw. Quote a passage as an excerpt of a scan, and link the item so a\nreader can look at the page.\n\n## Configuration\n\nEvery variable is optional. Set them in the `env` block of your client config.\n\n| Variable                | Default              | What it does                                                                          |\n| ----------------------- | -------------------- | ------------------------------------------------------------------------------------- |\n| `IA_USER_AGENT`         | the project identity | Names your application to the archive, with an address where a person can be reached. |\n| `IA_MIN_INTERVAL_MS`    | `1000`               | Gap between two requests, from 500 to 60000.                                          |\n| `IA_TIMEOUT_MS`         | `20000`              | Deadline for one request, from 1000 to 120000.                                        |\n| `IA_HISTORY_TIMEOUT_MS` | `60000`              | Deadline for a Wayback Machine history, from 5000 to 180000.                          |\n| `IA_MAX_RETRIES`        | `3`                  | Attempts after a transient failure, from 0 to 8.                                      |\n| `IA_CACHE_TTL_MS`       | `900000`             | How long an answer stays in memory, from 0 to 86400000.                               |\n| `IA_CACHE_MAX_ENTRIES`  | `200`                | Answers held in memory at once, from 1 to 5000.                                       |\n| `IA_LOG_LEVEL`          | `error`              | `silent`, `error`, `info` or `debug`, written to stderr.                              |\n\nA value outside its range falls back to the default, and the reason is written to\nstderr.\n\n## Errors\n\nEvery failure carries one of six codes, a message, and where it helps a hint\nnaming the next move.\n\n| Code            | What happened                                           | What to do                                                                                                 |\n| --------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| `not_found`     | The archive answered, and holds no such item.           | Check the identifier with `search_items`.                                                                  |\n| `invalid_input` | The arguments were refused before any request went out. | Read the message, which names the argument.                                                                |\n| `rate_limited`  | The archive asked this client to slow down.             | Wait the number of seconds the hint names and call again with the same arguments. The item is still there. |\n| `parse_failure` | The answer arrived in a shape this client cannot read.  | Report it at [the issue tracker](https://github.com/smeet666/mcp-archiveorg/issues).                       |\n| `network_error` | The request did not complete.                           | Try again shortly.                                                                                         |\n| `timeout`       | The request passed its deadline.                        | Raise `IA_TIMEOUT_MS`, or `IA_HISTORY_TIMEOUT_MS` for a capture history.                                   |\n\n## As a library\n\nThe layer reading the archive is published on its own, with its pacing, its cache\nand its errors, and with no protocol attached.\n\n```ts\nimport { ArchiveClient } from \"mcp-archiveorg/client\";\n\nconst client = new ArchiveClient();\nconst { data, cached } = await client.searchItems({ query: \"san francisco earthquake\" });\nconsole.log(data.total, cached);\n```\n\nEach read answers `{ data, cached }`, and throws an error carrying one of the six\ncodes. The floor between two requests holds here as well.\n\n## Pacing and attribution\n\nRequests go out one at a time with at least a second between them, and the floor\nof half a second holds however the server is configured. The `User-Agent` always\nends with the project identity and an address where a person can be reached. The\nInternet Archive is a non-profit library, and a search inside its documents is\none of the more expensive questions it answers.\n\nEvery result carries the address of the page it was read from. The items belong\nto the people and institutions who deposited them, under the terms each record\nstates in `license_url`.\n\nThis MCP server is an unofficial project, with no affiliation to the Internet\nArchive.\n\n## Privacy\n\nThis server collects nothing about you and sends nothing to its author. It runs\non your machine, contacts `archive.org`, `web.archive.org` and `openlibrary.org` and nothing else, holds its answers in memory\nwhile it runs, and writes nothing to disk.\n[PRIVACY.md](PRIVACY.md) states what a request carries and which settings change\nany of it.\n\n## Development\n\n```bash\nnpm install\nnpm run build:fixtures\nnpm test\nnpm run check\n```\n\nTests run against generated fixtures and make no network request. The live suite,\n`npm run test:live`, makes one request per route and runs nightly against the\narchive itself.\n\n## Contributing\n\nBugs, questions and ideas belong in\n[the issue tracker](https://github.com/smeet666/mcp-archiveorg/issues). Pull\nrequests are welcome; opening an issue first helps agree on the shape of the\nchange. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT, see [LICENSE](LICENSE). The items belong to their depositors, under the\nterms each record states.\n\n---\n\n<a name=\"mcp-archiveorg-français\"></a>\n\n# mcp-archiveorg (français)\n\n_[English version](#mcp-archiveorg)_\n\nL'[Internet Archive](https://archive.org) est une bibliothèque à but non lucratif\nqui conserve ce que le monde publie : livres numérisés, films, musique\nenregistrée, radio, logiciels, et les pages du web elles-mêmes, capturées encore\net encore depuis 1996 dans la Wayback Machine. Des millions de ses livres et\ndocuments sont passés par la reconnaissance optique de caractères, si bien que\nles mots qu'ils contiennent sont cherchables, et l'index Open Library qui la\ncôtoie décrit les œuvres, leurs éditions et leurs sujets.\n\nCe serveur relie un client de conversation à cette bibliothèque. On peut y\nchercher dans le texte intégral de ses documents, chercher dans son catalogue,\nlire la fiche d'un document et ses fichiers, trouver un livre par sujet, lieu,\npériode ou personne, et lire le web tel qu'il était un jour donné. Aucune clé\nd'API, aucun compte.\n\n## Installation\n\n**Installation en un clic**\n\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=archiveorg&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1hcmNoaXZlb3JnIl19)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=archiveorg&config=%7B%22name%22%3A%22archiveorg%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-archiveorg%22%5D%7D)\n\n**Claude Code**\n\n```bash\nclaude mcp add archiveorg -- npx -y mcp-archiveorg\n```\n\n**Claude Desktop, Cursor, et tout client au format de configuration standard**\n\n```json\n{\n  \"mcpServers\": {\n    \"archiveorg\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-archiveorg\"]\n    }\n  }\n}\n```\n\nNode 24 ou plus récent est nécessaire, et aucune variable d'environnement n'est à\nrenseigner.\n\n### Avec Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"archiveorg\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"ghcr.io/smeet666/mcp-archiveorg:2.0.2\"]\n    }\n  }\n}\n```\n\n`-i` garde l'entrée standard ouverte, qui est le canal du protocole, et `-t` est\nomis parce qu'un TTY réécrit le flux. Le conteneur a besoin d'un accès HTTPS\nsortant vers `archive.org`, `web.archive.org` et `openlibrary.org`, et de rien\nd'autre : aucun volume, aucun port, aucun identifiant.\n\n### Bundle, sans npm\n\nTéléchargez `mcp-archiveorg-2.0.2.mcpb` depuis\n[la dernière publication](https://github.com/smeet666/mcp-archiveorg/releases/latest)\net ouvrez-le. Un client qui gère les bundles MCP l'installe seul, sans npm et\nsans fichier de configuration à modifier. Le bundle emporte ses dépendances, donc\nrien n'est téléchargé à l'installation.\n\n## Ce qu'on peut demander\n\n- « Quels livres mentionnent le phare de Beaumont ? »\n- « Trouve-moi des documents sur le tremblement de terre de San Francisco en 1906. »\n- « Quels fichiers contient ce document, et sous quelle licence ? »\n- « Trouve-moi des livres sur l'apiculture en France publiés avant 1900. »\n- « À quoi ressemblait ce site en mars 2001 ? »\n\nLe chemin ordinaire va d'une recherche à une fiche : une ligne porte un\n`identifier`, et `get_item` le lit.\n\n## Les outils\n\n| Outil            | Ce qu'il fait                                                            |\n| ---------------- | ------------------------------------------------------------------------ |\n| `search_inside`  | Cherche dans les mots contenus dans les documents numérisés.             |\n| `search_items`   | Cherche dans le catalogue par titre, auteur, sujet et type de média.     |\n| `get_item`       | Lit la fiche d'un document, ses fichiers et sa licence.                  |\n| `search_books`   | Trouve des livres par sujet, lieu, période, personne, longueur ou année. |\n| `list_snapshots` | Liste les captures que la Wayback Machine garde d'une adresse.           |\n| `get_snapshot`   | Lit une capture d'une adresse, à une date ou près d'elle.                |\n\n### `search_inside`\n\nCherche dans le texte contenu dans les documents, texte issu de la reconnaissance\noptique de caractères, donc un passage porte les erreurs de lecture de ce\nprocédé.\n\n| Argument                 | Type                            | Requis | Ce qu'il fait                               |\n| ------------------------ | ------------------------------- | ------ | ------------------------------------------- |\n| `query`                  | chaîne, 2 à 300 caractères      | oui    | La phrase à chercher dans les documents.    |\n| `limit`                  | entier, 1 à 50, défaut `10`     | non    | Correspondances à servir.                   |\n| `page`                   | entier, 1 à 100, défaut `1`     | non    | Quelle page de correspondances.             |\n| `max_excerpt_chars`      | entier, 80 à 1200, défaut `300` | non    | La longueur de passage à servir.            |\n| `max_excerpts_per_match` | entier, 1 à 10, défaut `3`      | non    | Passages servis par document correspondant. |\n\n**En retour :** `hits`, chacun portant `identifier`, que `get_item` reprend ;\n`title`, `creator` et `year` ; `excerpts`, les passages tels qu'une machine les a\nlus sur la page ; `matched_file`, qui nomme ce qui contient réellement le\npassage ; et `source_url`. `inside_container` est vrai quand le document en\nrassemble plusieurs et que le passage se trouve dans l'un d'eux, auquel cas le\ntitre, l'auteur et l'année appartiennent au contenant.\n\n**`total` compte des documents, et il pagine.** C'est un nombre de documents et la dernière page d'un ensemble est plus courte\nque la première. **Aucun numéro de page n'est disponible :** l'index indique où\nle texte se trouve dans le document, ce qui vaut `1` sur presque toutes les\ncorrespondances, donc rien ici n'énonce une page de livre et aucun lien n'en\nrevendique.\n\n### `search_items`\n\nCherche dans le catalogue lui-même, à travers tout ce que l'archive conserve.\n\n| Argument     | Type                                                                        | Requis | Ce qu'il fait                     |\n| ------------ | --------------------------------------------------------------------------- | ------ | --------------------------------- |\n| `query`      | chaîne, 1 à 300 caractères                                                  | oui    | Les mots à chercher au catalogue. |\n| `media_type` | `texts`, `movies`, `audio`, `image`, `software`, `data` ou `web`            | non    | Le type de chose à garder.        |\n| `year_from`  | entier, 1 à 2200                                                            | non    | Année la plus ancienne.           |\n| `year_to`    | entier, 1 à 2200                                                            | non    | Année la plus récente.            |\n| `sort`       | `relevance`, `downloads`, `newest`, `oldest` ou `title`, défaut `relevance` | non    | L'ordre des lignes.               |\n| `limit`      | entier, 1 à 50, défaut `10`                                                 | non    | Lignes à servir.                  |\n| `page`       | entier, 1 à 100, défaut `1`                                                 | non    | Quelle page de lignes.            |\n\n**En retour :** `items`, chacun portant `identifier`, `title`, `creator`, `year`,\n`media_type`, `downloads` et `source_url`, un champ que la fiche laisse vide\nvalant `null`. `total` compte les documents correspondants dans tout le\ncatalogue, ce qui dépasse le nombre rendu.\n\n### `get_item`\n\nLit la fiche d'un document. Les parties lourdes se demandent au lieu d'être\nservies par défaut, une fiche pouvant être longue.\n\n| Argument                | Type                                                             | Requis | Ce qu'il fait                           |\n| ----------------------- | ---------------------------------------------------------------- | ------ | --------------------------------------- |\n| `identifier`            | chaîne, 1 à 200 caractères                                       | oui    | L'identifiant que porte une ligne.      |\n| `sections`              | tableau de `basic`, `files`, `full_metadata`, défaut `[\"basic\"]` | non    | Les parties à rendre.                   |\n| `file_format`           | chaîne, jusqu'à 60 caractères                                    | non    | Ne garder que les fichiers d'un format. |\n| `max_files`             | entier, 1 à 200, défaut `25`                                     | non    | Plafond sur les fichiers rendus.        |\n| `max_description_chars` | entier, 100 à 20000, défaut `2000`                               | non    | La longueur de description à servir.    |\n\n**En retour :** le document avec son `title`, `creator`, `year`, `media_type` et\n`source_url`, plus `description`, `date`, `publisher`, `language`, `collections`\net `license_url`, chacun `null` là où la fiche n'indique rien. `file_count`\ncompte les fichiers que le document contient quel que soit ce que cette réponse a\nrendu, et `total_bytes` leur poids. `files` et `full_metadata` ne sont là que\nlorsqu'ils sont demandés dans `sections`.\n\n### `search_books`\n\nTrouve des livres via l'index d'œuvres qui côtoie l'archive, lequel décrit une\nœuvre et ses éditions plutôt qu'un exemplaire numérisé.\n\n| Argument    | Type                                                                       | Requis | Ce qu'il fait                          |\n| ----------- | -------------------------------------------------------------------------- | ------ | -------------------------------------- |\n| `query`     | chaîne, 2 à 300 caractères                                                 | non    | Du texte libre, quand il y en a.       |\n| `subject`   | chaîne, 2 à 100 caractères                                                 | non    | Un sujet sous lequel l'index classe.   |\n| `place`     | chaîne, 2 à 100 caractères                                                 | non    | Un lieu dont une œuvre traite.         |\n| `time`      | chaîne, 2 à 100 caractères                                                 | non    | Une période dont une œuvre traite.     |\n| `person`    | chaîne, 2 à 100 caractères                                                 | non    | Une personne dont une œuvre traite.    |\n| `language`  | chaîne, 2 à 20 caractères                                                  | non    | La langue de l'œuvre.                  |\n| `year_from` | entier, 1 à 2200                                                           | non    | Première publication la plus ancienne. |\n| `year_to`   | entier, 1 à 2200                                                           | non    | Première publication la plus récente.  |\n| `pages_min` | entier, 1 à 100000                                                         | non    | Œuvre la plus courte acceptable.       |\n| `pages_max` | entier, 1 à 100000                                                         | non    | Œuvre la plus longue acceptable.       |\n| `sort`      | `relevance`, `rating`, `readers`, `newest` ou `oldest`, défaut `relevance` | non    | L'ordre des lignes.                    |\n| `limit`     | entier, 1 à 50, défaut `10`                                                | non    | Lignes à servir.                       |\n| `page`      | entier, 1 à 100, défaut `1`                                                | non    | Quelle page de lignes.                 |\n\n**En retour :** `books`, chacun portant `title`, `authors`,\n`first_published_year`, `edition_count`, `archive_identifiers` pour les\nexemplaires numérisés que l'archive détient, `scan_count`, `page_count` comme\nmédiane sur les éditions, `subjects` et `source_url`. `searched_for` dit en mots\nce à quoi cette réponse répond, texte libre et chaque critère appliqué, et\n`query` vaut `null` quand la recherche était faite de critères seuls. `total`\ncompte les œuvres correspondantes.\n\n### `list_snapshots`\n\nListe les captures que la Wayback Machine garde d'une adresse.\n\n| Argument | Type                           | Requis | Ce qu'il fait                                      |\n| -------- | ------------------------------ | ------ | -------------------------------------------------- |\n| `url`    | chaîne, 3 à 2000 caractères    | oui    | L'adresse à consulter.                             |\n| `limit`  | entier, 1 à 100, défaut `20`   | non    | Captures à servir.                                 |\n| `cursor` | chaîne, jusqu'à 500 caractères | non    | Le `next_cursor` nommé par une réponse précédente. |\n\n**En retour :** `snapshots`, chacune avec son `captured_at` en horodatage ISO\nUTC, l'`url` de la capture elle-même, et le `status` que la collecte a enregistré.\n`first` et `last` décrivent cette réponse plutôt que tout l'historique, et\n`next_cursor` poursuit la liste.\n\n### `get_snapshot`\n\nLit une capture d'une adresse, à une date ou près d'elle.\n\n| Argument | Type                           | Requis | Ce qu'il fait                                         |\n| -------- | ------------------------------ | ------ | ----------------------------------------------------- |\n| `url`    | chaîne, 3 à 2000 caractères    | oui    | L'adresse à consulter.                                |\n| `at`     | `AAAA-MM-JJ` ou horodatage ISO | non    | La date visée. La capture la plus récente par défaut. |\n\n**En retour :** la `snapshot` avec son `captured_at` et son adresse, à côté de\n`requested_url` et `requested_at`, si bien que l'écart entre la date demandée et\nla capture servie est visible. La Wayback Machine répond à une date dont elle n'a\naucune capture par la plus proche qu'elle détient.\n\n## Ce que valent les extraits\n\nLe texte contenu dans un document numérisé est issu de la reconnaissance optique\nde caractères. Un passage porte donc les erreurs de lecture de ce procédé, et il\nest servi tel qu'il a été lu plutôt que corrigé : un mot qui se lit bizarrement\nest ce que la machine a vu. Citez un passage comme l'extrait d'une numérisation,\net liez le document pour qu'un lecteur puisse regarder la page.\n\n## Configuration\n\nChaque variable est facultative. Elles se posent dans le bloc `env` de la\nconfiguration du client.\n\n| Variable                | Défaut               | Ce qu'elle fait                                                                        |\n| ----------------------- | -------------------- | -------------------------------------------------------------------------------------- |\n| `IA_USER_AGENT`         | l'identité du projet | Nomme votre application auprès de l'archive, avec une adresse où joindre une personne. |\n| `IA_MIN_INTERVAL_MS`    | `1000`               | Écart entre deux requêtes, de 500 à 60000.                                             |\n| `IA_TIMEOUT_MS`         | `20000`              | Délai d'une requête, de 1000 à 120000.                                                 |\n| `IA_HISTORY_TIMEOUT_MS` | `60000`              | Délai d'un historique Wayback Machine, de 5000 à 180000.                               |\n| `IA_MAX_RETRIES`        | `3`                  | Tentatives après un échec passager, de 0 à 8.                                          |\n| `IA_CACHE_TTL_MS`       | `900000`             | Durée pendant laquelle une réponse reste en mémoire, de 0 à 86400000.                  |\n| `IA_CACHE_MAX_ENTRIES`  | `200`                | Réponses gardées en mémoire à la fois, de 1 à 5000.                                    |\n| `IA_LOG_LEVEL`          | `error`              | `silent`, `error`, `info` ou `debug`, écrit sur la sortie d'erreur.                    |\n\nUne valeur hors de sa plage retombe sur le défaut, et la raison est écrite sur la\nsortie d'erreur.\n\n## Erreurs\n\nChaque échec porte un des six codes, un message, et quand cela aide une\nindication du geste suivant.\n\n| Code            | Ce qui s'est passé                                   | Que faire                                                                                          |\n| --------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| `not_found`     | L'archive a répondu, et n'a pas ce document.         | Vérifiez l'identifiant avec `search_items`.                                                        |\n| `invalid_input` | Les arguments ont été refusés avant toute requête.   | Lisez le message, qui nomme l'argument.                                                            |\n| `rate_limited`  | L'archive demande à ce client de ralentir.           | Attendez les secondes indiquées et rappelez avec les mêmes arguments. Le document est toujours là. |\n| `parse_failure` | La réponse est arrivée dans une forme illisible ici. | Signalez-le sur [le suivi d'incidents](https://github.com/smeet666/mcp-archiveorg/issues).         |\n| `network_error` | La requête n'a pas abouti.                           | Réessayez sous peu.                                                                                |\n| `timeout`       | La requête a dépassé son délai.                      | Augmentez `IA_TIMEOUT_MS`, ou `IA_HISTORY_TIMEOUT_MS` pour un historique.                          |\n\n## Comme bibliothèque\n\nLa couche qui lit l'archive est publiée seule, avec son rythme, son cache et ses\nerreurs, sans protocole attaché.\n\n```ts\nimport { ArchiveClient } from \"mcp-archiveorg/client\";\n\nconst client = new ArchiveClient();\nconst { data, cached } = await client.searchItems({ query: \"san francisco earthquake\" });\nconsole.log(data.total, cached);\n```\n\nChaque lecture répond `{ data, cached }`, et lève une erreur portant un des six\ncodes. Le plancher entre deux requêtes tient également ici.\n\n## Rythme et attribution\n\nLes requêtes partent une à une avec au moins une seconde entre elles, et le\nplancher d'une demi-seconde tient quelle que soit la configuration. Le\n`User-Agent` se termine toujours par l'identité du projet et une adresse où\njoindre une personne. L'Internet Archive est une bibliothèque à but non lucratif,\net une recherche dans le texte de ses documents est l'une des questions les plus\ncoûteuses qu'elle traite.\n\nChaque résultat porte l'adresse de la page d'où il a été lu. Les documents\nappartiennent aux personnes et aux institutions qui les ont déposés, sous les\nconditions que chaque fiche indique dans `license_url`.\n\nCe MCP est un projet non officiel, sans affiliation à l'Internet Archive.\n\n## Confidentialité\n\nCe serveur ne collecte rien sur vous et n'envoie rien à son auteur. Il tourne sur\nvotre machine, ne joint que `archive.org`, `web.archive.org` et `openlibrary.org`, garde ses réponses en mémoire le temps qu'il\ntourne, et n'écrit rien sur le disque. [PRIVACY.md](PRIVACY.md) dit ce qu'une\nrequête emporte et quels réglages changent cela.\n\n## Développement\n\n```bash\nnpm install\nnpm run build:fixtures\nnpm test\nnpm run check\n```\n\nLes tests s'exécutent sur des fixtures engendrées et n'émettent aucune requête.\nLa suite en direct, `npm run test:live`, émet une requête par route et tourne\nchaque nuit contre l'archive elle-même.\n\n## Contribuer\n\nLes anomalies, les questions et les idées ont leur place dans\n[le suivi d'incidents](https://github.com/smeet666/mcp-archiveorg/issues). Les\npropositions de modification sont bienvenues ; ouvrir un ticket d'abord aide à\ns'accorder sur la forme du changement. Voir [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Licence\n\nMIT, voir [LICENSE](LICENSE). Les documents appartiennent à ceux qui les ont\ndéposés, sous les conditions que chaque fiche indique.\n",
  "bytes": 39866,
  "sha": "83d160d14f4d23ba1e07e40adcfdafa4237742b25fc7d80ce5a6bcb84c65053d",
  "repo_slug": "smeet666/mcp-archiveorg",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_smeet666_mcp_archiveorg_f8140c90/readme"
}