mcp-databnf 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0
4
+
5
+ - **This server now needs node 24 or later.** Node 20 reached its end of
6
+ support on 2026-04-30 and node 22 is no longer what this code is built and
7
+ typed against. That is what makes this a major version: an install on an
8
+ older node is refused rather than left to fail somewhere later.
9
+ - **Every refusal of an argument opens with `invalid_input`.** A value outside
10
+ its bounds, of the wrong type, or outside the set an argument reads used to
11
+ come back in the validator's own words, with no code to branch on.
12
+ - **A container image is published for each version**, on ghcr, for amd64 and
13
+ arm64. The readme carries the configuration that runs it.
14
+ - The published package carries its changelog, and the entry point it declares
15
+ for the package root now publishes its types.
16
+
3
17
  This project follows [semantic versioning](https://semver.org/).
4
18
 
5
19
  ## 1.1.1
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [![license](https://img.shields.io/npm/l/mcp-databnf.svg)](./LICENSE)
6
6
  [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-6E56CF)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.smeet666/mcp-databnf)
7
7
  [![Glama](https://glama.ai/mcp/servers/smeet666/mcp-databnf/badges/score.svg)](https://glama.ai/mcp/servers/smeet666/mcp-databnf)
8
+ [![M8ven](https://m8ven.ai/badge/mcp/smeet666-mcp-databnf-abxqfo?variant=verified)](https://m8ven.ai/mcp/smeet666-mcp-databnf-abxqfo)
8
9
  [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=databnf&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1kYXRhYm5mIl19)
9
10
  [![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=databnf&config=%7B%22name%22%3A%22databnf%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-databnf%22%5D%7D)
10
11
 
@@ -47,6 +48,23 @@ npx mcp-databnf
47
48
  }
48
49
  ```
49
50
 
51
+ ### With Docker
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "databnf": {
57
+ "command": "docker",
58
+ "args": ["run", "-i", "--rm", "ghcr.io/smeet666/mcp-databnf:2.0.0"]
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ `-i` keeps stdin open, which is where the protocol travels, and no `-t` is
65
+ passed: a TTY rewrites the stream and breaks it. The container needs outbound
66
+ HTTPS to `data.bnf.fr`, `catalogue.bnf.fr` and `isni.org`, and nothing else: no volume, no port, no environment variable, no credential.
67
+
50
68
  ## The seven tools
51
69
 
52
70
  | Tool | Answers |
@@ -272,6 +290,24 @@ npx mcp-databnf
272
290
  }
273
291
  ```
274
292
 
293
+ ### Avec Docker
294
+
295
+ ```json
296
+ {
297
+ "mcpServers": {
298
+ "databnf": {
299
+ "command": "docker",
300
+ "args": ["run", "-i", "--rm", "ghcr.io/smeet666/mcp-databnf:2.0.0"]
301
+ }
302
+ }
303
+ }
304
+ ```
305
+
306
+ `-i` garde l'entrée standard ouverte, qui est le canal du protocole, et aucun
307
+ `-t` n'est passé : un terminal réécrit le flux et le casse. Le conteneur a besoin
308
+ d'un accès HTTPS sortant vers `data.bnf.fr`, `catalogue.bnf.fr` et `isni.org`, et de rien d'autre :
309
+ aucun volume, aucun port, aucune variable d'environnement, aucun identifiant.
310
+
275
311
  ## Les sept outils
276
312
 
277
313
  | Outil | Répond à |
@@ -18,10 +18,10 @@ interface Config {
18
18
  logLevel: LogLevel;
19
19
  }
20
20
  interface Logger {
21
- debug(message: string): void;
22
- info(message: string): void;
23
- warn(message: string): void;
24
- error(message: string): void;
21
+ debug: (message: string) => void;
22
+ info: (message: string) => void;
23
+ warn: (message: string) => void;
24
+ error: (message: string) => void;
25
25
  }
26
26
 
27
27
  /** The shapes the access layer produces. Nothing here knows about MCP. */
@@ -244,17 +244,6 @@ interface Page<T> {
244
244
  indexWindowFull?: boolean | null;
245
245
  }
246
246
 
247
- /** How a piece of caller text became the terms the index was given. */
248
- interface SearchReading {
249
- /** The words the text was cut into, each one quoted into the query. */
250
- words: string[];
251
- /** The terms the index requires, after it splits inside a word. */
252
- terms: string[];
253
- /** The characters that marked nothing and were removed before the cutting. */
254
- invisible: string[];
255
- /** The visible characters that reached no term. */
256
- setAside: string[];
257
- }
258
247
  type EntityKind = "ark" | "temp-work";
259
248
  interface EntityId {
260
249
  kind: EntityKind;
@@ -318,7 +307,6 @@ declare class BnfClient {
318
307
  /** The deadline one query is given, which callers report rather than guess. */
319
308
  get timeoutMs(): number;
320
309
  /** The one address this client sends anything to. */
321
- get endpoint(): string;
322
310
  /**
323
311
  * `cacheKey` is stated rather than taken from the query, because two reads of
324
312
  * one query can produce different values: a list cut to five rows is not the
@@ -328,24 +316,7 @@ declare class BnfClient {
328
316
  private read;
329
317
  private fetchAndParse;
330
318
  /** Read an identifier a caller wrote, refusing anything this dataset cannot address. */
331
- identify(input: string): EntityId;
332
319
  /** The words a search will actually look for, which a tool reports back. */
333
- words(input: string): string[];
334
- /**
335
- * The terms the index requires, which is what a row's presence rests on.
336
- *
337
- * The index splits inside a word at an apostrophe and at a hyphen, so a word
338
- * a caller wrote as one can reach it as two, each required on its own.
339
- */
340
- indexTerms(words: readonly string[]): string[];
341
- /**
342
- * How a piece of caller text became the terms the search was run with.
343
- *
344
- * A tool reports the reading back, so the same reading has to be the one the
345
- * query was built from: the words, the terms the index makes of them, and
346
- * the characters that reached neither.
347
- */
348
- searchReading(input: string): SearchReading;
349
320
  searchAuthors(name: string, limit: number, offset: number): Promise<Read<Page<AuthorSummary>>>;
350
321
  getAuthor(id: EntityId): Promise<Read<AuthorDetail>>;
351
322
  /**