Skip to main content
Glama
dnb-mcp

dnb-mcp

README.md
# dnb-mcp πŸ“š

mcp-name: io.github.mohammad-abbasi-sh/dnb-mcp

Unofficial **read-only** MCP server for **[services.dnb.de](https://www.dnb.de)** β€” Deutsche Nationalbibliothek catalogue via its official SRU API: keyword, title and author search, ISBN and DNB-ID lookup. No key, no login. No key, no login.

> Built by Mohammad Abbasi as part of the "Germany MCP factory". Not affiliated with services.dnb.de.

## For AI agents

Add to your MCP client config (stdio):

```json
{
  "mcpServers": {
    "dnb": {
      "command": "uvx",
      "args": ["dnb-mcp==0.1.0"]
    }
  }
}
```

Or run locally: `python -m dnb_mcp.server` (needs `mcp<2`, `httpx`).

## Tools

| Tool | Description |
|------|-------------|
| `dnb_search_books` | Keyword search across the DNB catalogue β€” `query`, `limit` 1..50 |
| `dnb_search_by_title` | Title search β€” `title`, `limit` 1..50 |
| `dnb_search_by_author` | Author search β€” `author` (e.g. "Kafka, Franz"), `limit` 1..50 |
| `dnb_by_isbn` | Look up one book by ISBN β€” `isbn` (13 or 10 digits, with or without dashes) |
| `dnb_get_record` | Full record by DNB identifier β€” `dnb_id` (e.g. "1306459214") |
| `dnb_health` | Reachability probe (ok / blocked / error) β€” one polite request |

## Notes

- All data comes from the **Deutsche Nationalbibliothek SRU API** (free, no key, no login).
- Indexes used (from the API's own explain response): `woe` (all terms), `tit` (title), `per` (person/author), `num` (number incl. ISBN), `idn` (DNB identifier).
- There is **no newspapers-only filter**: the `mat` (material type) index returns 0 for every German value tried (BΓΌcher, Zeitschriften, Zeitung, Zeitungen, Online-Ressource), so no newspapers-only tool is offered; newspapers are still found by the keyword and title searches.
- Dublin Core recordSchema is unsupported by the API β€” MARC21-xml only.

Tests: 20/20 green (14 offline + 6 live, 2026-11-10).

## Development

```bash
python3 -m venv .venv && .venv/bin/pip install "mcp<2" httpx pytest
.venv/bin/pip install -e .
.venv/bin/python -m pytest tests/ -q
```

## License

[PolyForm Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/) β€” free for personal and non-commercial use; commercial use needs a separate license (see LICENSE).

---

Built by [Mohammad Abbasi](https://github.com/mohammad-abbasi-sh) β€” [Almanibama](https://almanibama.ir) Β· [mabbasi.ir](https://mabbasi.ir)

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct access point: keyword, title, author, ISBN, identifier, and service health. The only real overlap is that dnb_search_books (all fields) can approximate title/author searches, but the specific-field variants are clearly described and useful for precision. No tool boundaries are confusing enough to cause likely misselection.

Naming Consistency4/5

All names share a consistent dnb_ prefix and mostly follow a verb-led pattern (dnb_search_books, dnb_get_record). Two slight deviations: dnb_by_isbn drops the verb and dnb_health is a bare noun, but both remain readable and predictable.

Tool Count5/5

Six tools is well-scoped for a bibliographic lookup service: four access points for finding records, one for full-record retrieval, one for connectivity diagnostics. Every tool earns its place with no filler.

Completeness3/5

Core discovery and retrieval are covered for a read-only catalogue, and a health probe is a nice touch. However, there is no pagination/offset (only a limit capped at 50), so deep result sets are unreachable, and there are no filters for year, publisher, or subject that bibliographic searching typically needs.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues