Purpose
mcp-databnf is an unofficial MCP (Model Context Protocol) server for connecting chat clients to the French National Library's open data service data.bnf.fr. The service publishes authority records maintained by the National Library: catalogued people (with dates, places, languages and fields of activity), the works they wrote (including published editions of each work), and links to digitised copies in Gallica. Each record indicates whether the Library considers it established or provisional.
Through this server, users can search for authors or works by name, read full records, list all works by an author, list all editions of a work, and find digitised copies associated with an author or work.
Main capabilities
The server provides the following MCP tools:
- Find people by name (author search): returns a list of authors, each containing id (for use with get_author, list_works and find_digitised), name, label (authority heading, usually with dates), birth_year and death_year (may be null), role and source_url. Also returns words_searched, has_more and index_window_full.
- get_author: reads a person's full record, returning name, label, given_name, family_name, other_names, birth_date and death_date, birth_year and death_year (numbers), birth_place, death_place, biographical_information, occupation, languages (ISO 639-2 codes), countries and fields (as recorded). Empty fields are null.
- Find works by title (work search): returns a list of works, each containing id (for use with get_work, list_editions and find_digitised), title, date (the year given in the record, by publication form), creators, status (established or provisional) and source_url. Also returns words_searched, has_more and index_window_full.
- get_work: reads a work's full record, returning title, label, date (by publication form), first_year, creators ({ id, name }), languages, forms, subjects and dewey_classes (as recorded), expression_count, same_as (BnF-aligned registries) and catalogue_url. status is established or provisional, and status_statement explains the Library's definition of status: a provisional record means the Library has not yet completed verification.
- list_works: lists works associated with a person. Returns works, each containing id, title, date (by publication form), year (number, if available), forms, status and source_url, as well as has_more.
- list_editions: lists all editions of a work. Returns editions, each containing its id in the BnF catalogue, that edition's title, date and year, publisher, place, edition_statement, extent, isbn, note (as written by the cataloguer), catalogue_url, digitised and source_url. Empty fields are null.
- find_digitised: finds Gallica digitised copies associated with a person or work. Returns kind (catalogue type) and links, each containing a Gallica ark, url, rendering and that person's role in it. links_returned_by_role counts by role. This server only describes digitised documents and never opens documents.
Usage
Installation
- One-click installation: suitable for Claude Desktop, Cursor and any client using the standard configuration format. Requires Node 24 or higher, noSet the environment variables. Keep standard input open (-i), because the protocol is transported over standard input, and omit -t because a TTY rewrites the stream. The container needs outbound HTTPS to data.bnf.fr, with no volumes, ports, or credentials required.
- Bundle (no npm needed): download mcp-databnf-2.1.2.mcpb from the latest release and open it. Clients that support MCP bundles install it automatically, with no npm and no editing of configuration files. The bundle carries its own dependencies, so nothing needs to be fetched during installation.
Configuration
All variables are optional and can be set in the env block of the client configuration. Out-of-range values fall back to the default, and the reason is written to stderr. Each failure carries one of six codes, a message, and, when helpful, a hint indicating the next step to take.
Example questions
- "What does the BnF say about Colette?"
- "List everything Marguerite Duras wrote."
- "Which editions of that work does the library hold?"
- "Are any of them digitised in Gallica?"
- "When was that record last established?"
The usual path goes from search to record: search result rows carry an id, and get_author or get_work reads that id.
When to use it
Suitable for researchers, librarians, literary scholars, or general users who need to query the authority data of the National Library of France, to quickly retrieve author information, work editions, and links to digitised copies. It is also suitable for integration into chat clients that support MCP, to explore BnF open data in natural language.
Limitations and notes
- This is an unofficial project and is not affiliated with the National Library of France.
- Metadata use is free and unrestricted, but the source statement must be retained and the retrieval date noted. Each answer's payload includes retrieved_at, and the text ends with the source and that date. Cached answers report the moment of the initial read, that is, the retrieval date. When presenting retrieved content, the source and date must be repeated.
- Requests are issued one by one, at least three seconds apart, and this lower bound applies regardless of how the server is configured. Each question queries the publicly funded endpoint run by the BnF via SPARQL, becausethis interval is wide and the deadline is long. The User-Agent always ends with the project identifier and a contactable address.
- The server does not collect any information about the user and does not send anything to the author. It runs on the user's machine, contacts only data.bnf.fr, keeps answers in memory during runtime, and does not write to disk.
- Tests run against generated fixed data and make no network requests. The live suite npm run test:live makes one request per route and runs nightly against the service.
- Licensed under MIT; the metadata belongs to the National Library of France, and free use requires stating the source and the retrieval date.