๐จ๐ญ Part of the Swiss Public Data MCP Portfolio
๐ swiss-academic-libraries-mcp
MCP server providing access to Swiss academic libraries โ swisscovery, e-rara, e-periodica, e-manuscripta. No API key required.
Demo
Overview
swiss-academic-libraries-mcp connects AI models to the full Swiss academic library infrastructure via standardised, open protocols. It covers the swisscovery union catalogue (500+ libraries, 10M+ records) and three digitalisation platforms: historical prints (e-rara), periodicals (e-periodica) and manuscripts (e-manuscripta).
All data sources use open, authentication-free protocols (SRU/MARC21, OAI-PMH/Dublin Core). The server supports both local use via Claude Desktop (stdio transport) and cloud deployment (Streamable HTTP).
Beyond the catalogue, the server also covers Swiss open-access legal literature โ freely readable legal scholarship from sui generis, ex/ante and Repositorium.ch โ as metadata (title, authorship, year, licence, DOI, link), never full text.
Anchor demo query (catalogue): "Which Swiss university dissertations on primary school pedagogy are held in Swiss libraries, and are any of them digitised in e-rara?"
Anchor demo query (OA legal literature): "Which freely accessible legal-scholarship articles exist on data protection in education? Give me title, authorship, year, licence and DOI." โ oa_law_search(query="Datenschutz im Bildungsbereich") โ results are ranked by relevance: articles matching all terms rank first, articles matching only the core term (Datenschutz) follow, so the query returns the real privacy-law corpus rather than an empty set.
Features
- 13 tools across 4 catalogue sources + 3 open-access legal-literature sources โ all read-only, no API key required
- swisscovery search with full CQL syntax: full-text, title, author, subject, ISBN/ISSN
- OAI-PMH harvesting with date range and collection filters plus pagination via resumption tokens
- MARC21 parser extracting 20+ fields (title, creator, publication info, subjects, abstract, URLs)
- Dublin Core parser for all three digitalisation portals
- Dual transport: stdio for Claude Desktop ยท Streamable HTTP for cloud/self-hosted deployments
- OA legal-literature search across sui generis, ex/ante and Repositorium.ch with a declarative source registry (new sources = one config entry), best-effort Crossref licence enrichment, and graceful per-source degradation
- 2 built-in prompts:
research-workflowandeducation-research - Markdown and JSON output for all tools
- 76 unit tests (no network) + 28 live smoke tests
Data Sources
| Source | Protocol | Content | Records |
|---|---|---|---|
| swisscovery (SLSP) | SRU / MARC21 | 500+ Swiss libraries | 10M+ |
| e-rara | OAI-PMH / Dublin Core | Digitised historical prints | 250k+ |
| e-periodica | OAI-PMH / Dublin Core | Digitised periodicals (1750โtoday) | 1M+ articles |
| e-manuscripta | OAI-PMH / Dublin Core | Manuscripts & archival material | 100k+ |
Open-Access legal literature (metadata only)
| Source | Protocol | Content | DOI coverage |
|---|---|---|---|
| sui generis | OAI-PMH / Dublin Core | OA legal journal & non-profit publisher | ~100 % (10.21257/โฆ) |
| ex/ante | OAI-PMH / Dublin Core | Peer-reviewed journal for (young) legal scholarship, multilingual | none (persistent URL) |
| Repositorium.ch | Supabase / PostgREST (JSON) | Subject repository for Swiss law | partial |
Tools
| Tool | Source | Function |
|---|---|---|
library_info |
โ | Entry point: overview of all sources and tools |
swisscovery_search |
swisscovery | Full-text / CQL search across the union catalogue |
swisscovery_get_record |
swisscovery | Single record by MMS-ID |
erara_list_records |
e-rara | Prints filtered by date / collection |
erara_get_record |
e-rara | Single item by OAI identifier |
erara_list_collections |
e-rara | All participating libraries |
eperiodica_list_records |
e-periodica | Articles filtered by date |
eperiodica_get_record |
e-periodica | Single article by OAI identifier |
emanuscripta_list_records |
e-manuscripta | Manuscripts filtered by date / collection |
emanuscripta_get_record |
e-manuscripta | Single object by OAI identifier |
emanuscripta_list_collections |
e-manuscripta | All archives / collections |
oa_law_search |
OA legal (all 3) | Search OA legal scholarship (title/abstract/author) with source, language, year and peer-review filters |
oa_law_get |
OA legal (all 3) | Single OA legal article by DOI or resolvable URL |
Example Use Cases
| Query | Tool |
|---|---|
| "Which books about Swiss primary schools are held in Swiss libraries?" | swisscovery_search |
| "Show digitised historical works from ETH Library" | erara_list_records |
| "Which Swiss periodicals were digitised in 2023?" | eperiodica_list_records |
| "What manuscript collections does e-manuscripta hold?" | emanuscripta_list_collections |
| "Which OA legal articles exist on facial recognition?" | oa_law_search |
Architecture
Two independent paths share one HTTP client (retry with exponential backoff, shared connection pool, project User-Agent):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ swiss-academic-libraries-mcp โ
โ (FastMCP ยท stdio / HTTP) โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ โ
โโโโโโ CATALOGUE path โโโ โโโ OA-LEGAL path โโโโโโ
โ (api_client.py) (oa_legal.py) โ
โ โ
โโโโโโโโโโโดโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโ
โ swisscovery SRU โ โ declarative source registry โ
โ e-rara OAI โ โ โโ sui generis โ OAI-PMH โ
โ e-periodica OAI โ โ โโ ex/ante โ OAI-PMH โ
โ e-manuscripta OAI โ โ โโ Repositorium โ PostgREST/JSON โ
โโโโโโโโโโโฌโโโโโโโโโโ โ harvest โ in-memory cache โ filter โ
โ โ Crossref DOIโlicence enrichment โณ โ
MARC21 / Dublin Core โ (best-effort, OA_LAW_CROSSREF_ENRICH)โ
โ catalogue records โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
OaLegalPublication (metadata only,
licence never empty, no full text)
- Catalogue path returns bibliographic records (books, digitised prints, periodicals, manuscripts).
- OA-legal path harvests OA legal-scholarship metadata once, caches it in memory (small corpus), and filters locally โ because OAI-PMH has no keyword search of its own. Adding a fourth OA source is a single registry entry, not new code.
Licensing & Scope
This server is deliberately conservative about what it emits โ a portfolio that treats governance as a feature cannot be careless here.
- Metadata, not full text. For OA legal literature the server returns title, authorship, year, licence, DOI/link and โ where the source provides it as a metadatum โ the abstract. It never ingests, stores, or outputs the article body. The full-text PDF path exposed by Repositorium.ch is intentionally not carried into any field.
licenceis always set. Open Access means free to read, not free to reuse. Licences range from CC0 and CC BY to CC BY-NC-ND, and some articles are simply "free to read" with no open licence at all. When no machine-readable licence is available, the field is"unknown"โ never guessed, never omitted. The native OAI metadata of all three sources carries only copyright statements, so"unknown"is the default; a best-effort Crossref lookup upgrades it to the real CC licence where a DOI resolves (e.g. sui generis โCC BY-SA 4.0). Disable withOA_LAW_CROSSREF_ENRICH=0.- Citation integrity. Every result carries a resolvable reference โ a DOI where present, otherwise a persistent URL. No result is emitted without one. A fabricated citation in legal literature is worse than no citation, so the server prefers one hit fewer over one hit invented.
- Language is carried, never silently filtered. ex/ante and Repositorium.ch are multilingual (DE/FR/IT/EN). The
languagefield is always populated, but results are only filtered by language when you explicitly ask โ otherwise half the Romandie would vanish from the results. - Scope boundary. OA legal literature belongs here because it is the same capability already in this server โ authentication-free bibliographic-metadata harvesting of Swiss scholarly sources over standard protocols โ with the same output contract (metadata, not full text). It is institution-independent and subject-focused, which is why it does not overlap
eth-library-mcp(ETH-institution Discovery & Persons) โ the catalogue finds the book, the OA-legal path finds the freely readable article with its licence and DOI.
Known Limitations
- Small, focused corpus. The three OA sources together hold on the order of a few hundred articles. Results are ranked by relevance โ articles matching all query terms first, then partial matches โ so a topical query like "Datenschutz im Bildungsbereich" returns the privacy-law corpus (ranked) rather than nothing; if no article covers the full topic intersection, the closest real matches are returned, never a fabricated one. A query that matches no term at all still returns an honest empty result.
- No full-text search. Matching runs over metadata (title, abstract, authorship) only โ never the article body.
- Uneven DOI coverage. sui generis โ 100 %, Repositorium.ch partial, ex/ante has no DOIs (persistent URLs only). Aggregators (Crossref/OpenAlex) therefore cover sui generis well but miss ex/ante entirely and do not index Repositorium.ch as a source โ which is why the server harvests each source natively rather than relying on an aggregator.
- Licence gaps. The native metadata rarely carries a machine-readable licence;
"unknown"is common and only lifted where a DOI resolves in Crossref. - Not a substitute for a paid legal database. This surfaces freely accessible Swiss legal scholarship only โ it is not Swisslex/Weblaw and does not cover commercial or paywalled legal publishing.
Prerequisites
- Python 3.11 or higher
- uv / uvx (recommended) or pip
- Internet access (all APIs are publicly available)
Installation
Claude Desktop (recommended)
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"swiss-academic-libraries": {
"command": "uvx",
"args": ["swiss-academic-libraries-mcp"]
}
}
}
Restart Claude Desktop โ the server starts automatically on first use.
Cloud / Self-hosted (Streamable HTTP)
uvx swiss-academic-libraries-mcp --http --port 8000 [--host 127.0.0.1]
Security & Deployment Notes
- Default binding is
127.0.0.1(loopback only). The server has no built-in authentication. - Use
--host 0.0.0.0only when running behind a reverse proxy that provides authentication and per-IP rate limits (e.g. nginx withlimit_req+ OAuth2-Proxy). Non-loopback bindings emit a WARN log. - Logs go to stderr; set verbosity with
MCP_LOG_LEVEL=DEBUG|INFO|WARNING.
Development
git clone https://github.com/malkreide/swiss-academic-libraries-mcp
cd swiss-academic-libraries-mcp
pip install -e .
Quickstart
Start by calling library_info for a full overview. Then:
"Which books about Swiss primary schools are held in Swiss libraries?"
โ swisscovery_search(query='subject = "Volksschule"', max_records=20)
"Show digitised historical works from ETH Library"
โ erara_list_records(set_spec="zut")
"Which Swiss periodicals were digitised in 2023?"
โ eperiodica_list_records(from_date="2023-01-01", until_date="2023-12-31")
"What manuscript collections does e-manuscripta hold?"
โ emanuscripta_list_collections()
โ [More use cases by audience](EXAMPLES.md) โ
๐ก "No API key โ just install and query."
CQL Search Syntax (swisscovery)
Full text: Volksschule Zรผrich
Title: title = "education reform"
Author: creator = "Pestalozzi"
Subject: subject = "pedagogy"
ISBN: isbn = "978-3-05-006234-0"
Combined: title = "school" AND creator = "Pestalozzi"
Pagination: start_record = 11
Configuration
No API keys required. All environment variables are optional.
| Parameter | Default | Description |
|---|---|---|
--http |
off | Enable Streamable HTTP transport |
--port |
8000 | Port for HTTP transport |
MCP_LOG_LEVEL |
INFO |
Log verbosity (DEBUG/INFO/WARNING) |
OA_LAW_CROSSREF_ENRICH |
1 |
OA legal: DOIโlicence enrichment via Crossref; set 0 to disable |
OA_LAW_REPOSITORIUM_ANON_KEY |
(public key) | OA legal: override for Repositorium.ch's public read-only Supabase anon key (allows rotation without a code change) |
Project Structure
swiss-academic-libraries-mcp/
โโโ src/
โ โโโ swiss_academic_libraries_mcp/
โ โโโ __init__.py # Package init
โ โโโ server.py # FastMCP server, 13 tools, 2 prompts, 2 resources
โ โโโ api_client.py # HTTP client (+ retry), MARC21 + OAI-PMH/DC parsers
โ โโโ oa_legal.py # OA legal-literature registry, adapters, model
โโโ tests/
โ โโโ test_server.py # catalogue unit tests + live smoke tests
โ โโโ test_20_scenarios.py # end-to-end catalogue scenarios
โ โโโ test_oa_legal.py # OA legal-literature tests (mocked + live)
โโโ pyproject.toml
โโโ CHANGELOG.md
โโโ CONTRIBUTING.md # Contributing guide (English)
โโโ CONTRIBUTING.de.md # Contributing guide (German)
โโโ SECURITY.md # Security policy (English)
โโโ SECURITY.de.md # Security policy (German)
โโโ LICENSE
โโโ README.md # This file (English)
โโโ README.de.md # German version
Testing
# Unit tests (no network required)
PYTHONPATH=src pytest tests/ -m "not live"
# Live smoke tests (internet required)
PYTHONPATH=src pytest tests/ -m "live"
Safety & Limits
- Read-only: All tools perform HTTP GET requests against public SRU and OAI-PMH endpoints โ no data is written, modified, or deleted.
- No personal data: The APIs return bibliographic metadata (titles, authors, publication info, subject headings) and public digitisation records. No personally identifiable information (PII) about library users is processed or stored.
- Rate limits: swisscovery SRU and the OAI-PMH endpoints are public and have no documented hard limits, but OAI-PMH harvesting is paginated via resumption tokens โ use
from_date/until_dateand keepmax_recordsreasonable. The server enforces a 30s timeout per request. - Data freshness: Results reflect the upstream catalogues at query time. No caching is performed by this server; indexing latency is controlled by SLSP and the digitisation platforms.
- Terms of service: Data is subject to the ToS and licences of each source โ swisscovery / SLSP, e-rara, e-periodica, e-manuscripta. Most digitised material is in the public domain or under Creative Commons licences; always check the rights statement on the individual record before redistribution.
- No guarantees: This is a community project, not affiliated with SLSP, ETH Library, or any of the participating institutions. Availability depends on the upstream APIs.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines on:
- Reporting bugs and requesting features
- Setting up the development environment
- Code style and test requirements
- Submitting pull requests
This project follows the conventions of the Swiss Public Data MCP Portfolio.
Security
To report a vulnerability, please follow the responsible disclosure process in SECURITY.md. The server is read-only and requires no API key; see the Safety & Limits section above for the security model.
Changelog
See CHANGELOG.md
Deployment for Swiss Public Administration
If you self-host this server for a Swiss school authority, archive, or municipal use case:
- Data residency: prefer on-premise or a CH-based cloud provider. The query patterns themselves (which library searches a civil servant runs) may reveal ongoing research and are best kept on Swiss infrastructure.
- Upstream calls go exclusively to CH-hosted services: SLSP / swisscovery, ETH-Bibliothek (e-rara, e-periodica, e-manuscripta). No data leaves Switzerland.
- Logging: logs are written to stderr; configure your IT
retention policy accordingly (e.g. systemd-journal
MaxRetentionSec). - HTTP transport must run behind a reverse proxy with authentication and per-IP rate limits (see Security & Deployment Notes above).
License
MIT License โ see LICENSE
Author
Hayal Oezkan ยท github.com/malkreide
Credits & Related Projects
- Data (catalogue): swisscovery / SLSP ยท e-rara ยท e-periodica ยท e-manuscripta
- Data (OA legal literature): sui generis ยท ex/ante ยท Repositorium.ch โ licence enrichment via Crossref. Each source's metadata is used under its own terms; open-access status does not imply an open reuse licence.
- Protocol: Model Context Protocol โ Anthropic / Linux Foundation
- Related: eth-library-mcp โ ETH Library Discovery & Persons API
- Portfolio: Swiss Public Data MCP Portfolio
| Server | Description |
|---|---|
zurich-opendata-mcp |
City of Zurich Open Data |
eth-library-mcp |
ETH Library Discovery & Persons API |
swiss-statistics-mcp |
Swiss Federal Statistics (BFS) |
fedlex-mcp |
Swiss Federal Law via Fedlex SPARQL |
swiss-transport-mcp |
OJP journey planning, SIRI-SX disruptions |
Installation
Run via uv's uvx โ no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
{
"mcpServers": {
"swiss-academic-libraries-mcp": {
"command": "uvx",
"args": [
"swiss-academic-libraries-mcp"
]
}
}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swiss_academic_libraries_mcp-1.1.0.tar.gz.
File metadata
- Download URL: swiss_academic_libraries_mcp-1.1.0.tar.gz
- Upload date:
- Size: 88.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98100d0f0874adc3a6e84daf77c490c8a8e78154ff1de0c3d87056b24b43594
|
|
| MD5 |
a0e43618b105a4d510f13ee9be246f0e
|
|
| BLAKE2b-256 |
61c0b922ec22504fab3085982d1e685039a18cda66b70966917e2aeb3d43c10f
|
Provenance
The following attestation bundles were made for swiss_academic_libraries_mcp-1.1.0.tar.gz:
Publisher:
publish.yml on malkreide/swiss-academic-libraries-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swiss_academic_libraries_mcp-1.1.0.tar.gz -
Subject digest:
a98100d0f0874adc3a6e84daf77c490c8a8e78154ff1de0c3d87056b24b43594 - Sigstore transparency entry: 2206590407
- Sigstore integration time:
-
Permalink:
malkreide/swiss-academic-libraries-mcp@a6f4367c5d83d78b8641f56f9adb8c239d260f0a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/malkreide
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f4367c5d83d78b8641f56f9adb8c239d260f0a -
Trigger Event:
release
-
Statement type:
File details
Details for the file swiss_academic_libraries_mcp-1.1.0-py3-none-any.whl.
File metadata
- Download URL: swiss_academic_libraries_mcp-1.1.0-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8860e997aab0d0f351146ca28613ab02d98f84098c6544ca7244d35acbc26abc
|
|
| MD5 |
40ecc2b54fe7ac02d4812eb2a56ef077
|
|
| BLAKE2b-256 |
20c630ed27119f58f30219a23802f4902393a3a1c91ac0267ddd29b95c82ca7d
|
Provenance
The following attestation bundles were made for swiss_academic_libraries_mcp-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on malkreide/swiss-academic-libraries-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swiss_academic_libraries_mcp-1.1.0-py3-none-any.whl -
Subject digest:
8860e997aab0d0f351146ca28613ab02d98f84098c6544ca7244d35acbc26abc - Sigstore transparency entry: 2206590711
- Sigstore integration time:
-
Permalink:
malkreide/swiss-academic-libraries-mcp@a6f4367c5d83d78b8641f56f9adb8c239d260f0a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/malkreide
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f4367c5d83d78b8641f56f9adb8c239d260f0a -
Trigger Event:
release
-
Statement type: