runeberg-mcp
This MCP server lets you research historical Nordic people, families, and places by searching and reading digitized literature from Project Runeberg.
Global full-text search across all digitized works via
runeberg_search, with automatic historical spelling expansion and optional user-provided spelling variants.Read page text from any work via
runeberg_read_page, using either a full URL or work slug plus page number, with cleaned OCR/proofread content and links to facsimile images.Inspect work metadata via
runeberg_get_work_info, including publication details and table of contents/chapter/lemma indexes.Targeted in-work search (as described in the README) for fuzzy/lemma matching within alphabetical encyclopedias and biographical works.
CLI usage for the same workflows:
search,in-work,read, andinfocommands for terminal-based research.
Provides full-text search of Projekt Runeberg content using DuckDuckGo as the default privacy-respecting search backend, requiring no API keys.
Supports Google Custom Search JSON API for site-restricted searches of runeberg.org, enabling higher-volume or specialized search setups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@runeberg-mcp what is the table of contents for Strindberg's Dödsdansen?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Runeberg MCP 📖
A Model Context Protocol (MCP) server and CLI tool for researching historical people, noble families, and places across digitized Nordic literature, encyclopedias, and archives on Projekt Runeberg.
Project Runeberg has been publishing free electronic editions of classic Nordic literature out of copyright since 1992. It is a treasure trove for genealogy and local history, containing monumental works like:
karlxiioff: Karl XII:s officerare. Biografiska anteckningar (Adam Lewenhaupt)sbh: Svenskt biografiskt handlexikon (Hofberg et al.)anrep/elgenst: Svenska adelns ättar-taflor (Gabriel Anrep / Gustaf Elgenstierna)rosenberg: Geografiskt-statistiskt handlexikon öfver Sverige (C.M. Rosenberg – all Swedish villages, farms, and parishes)hgsl: Historiskt-geografiskt och statistiskt lexikon öfver Sverigenf: Nordisk familjebok (all editions)
✨ Features
🔎 Smart Global Search (
runeberg_search): Full-text search across all digitized works with automatic historical spelling expansion and support for caller/LLM-provided spelling variants (variants).🎯 In-Work Lemma Bisection & Fuzzy Search (
runeberg_search_in_work): Instantly locates candidate pages in alphabetical encyclopedias (e.g. searching for Hilpershausen finds Hilperhaussen on page 297 of Karl XII:s officerare with 92% similarity).📄 Page Reader with Context Window (
runeberg_read_page): Extracts clean OCR/proofread text with links to original facsimile images. Supportscontext_pagesto read across page breaks seamlessly.📚 Work & Chapter Inspector (
runeberg_get_work_info): Retrieves metadata, publication details, and full chapter/lemma index.⚡ Zero-Config by Default: Built-in multi-engine search (
ddgs) requiring no API keys or setup.🚀 Optional Google Custom Search API: Set
GOOGLE_API_KEYandGOOGLE_CSE_IDto use Google's official API.
Related MCP server: DHLAB MCP Server
🛠️ Installation
Managed with modern Python packaging via uv:
git clone https://github.com/tobbaz/runeberg-mcp.git
cd runeberg-mcp
uv sync🤖 MCP Server Configuration
Add to your MCP client configuration (claude_desktop_config.json, Cursor, Antigravity, etc.):
{
"mcpServers": {
"runeberg": {
"command": "uv",
"args": [
"--directory",
"/path/to/runeberg-mcp",
"run",
"runeberg-mcp",
"serve"
]
}
}
}💻 CLI Usage
Test and research directly in your terminal:
1. Global Search (with automatic historical variants):
# Finds hits across all of Runeberg, automatically testing historical spelling shifts
uv run runeberg-mcp search "Hilpershausen"
# Or provide your own historical variants:
uv run runeberg-mcp search "Hilpershausen" -v "Hilperhaussen" -v "Hilpershusen"2. Targeted In-Work Fuzzy Search:
# Search within Karl XII:s officerare:
uv run runeberg-mcp in-work karlxiioff "Hilpershausen"
# Search within Svenskt biografiskt handlexikon:
uv run runeberg-mcp in-work sbh "Bellman"
# Search for a farm or village in Rosenberg:
uv run runeberg-mcp in-work rosenberg "Långtora"3. Read Page (with optional context window):
# Read a single page:
uv run runeberg-mcp read dasakungen 5
# Read a page and the subsequent page across page breaks:
uv run runeberg-mcp read https://runeberg.org/karlxiioff/0311.html -c 14. Inspect Work:
uv run runeberg-mcp info karlxiioff🧪 Running Tests
Run the test suite:
uv run python test_server.py📜 License
Distributed under the MIT License. Digital works hosted on Projekt Runeberg are public domain cultural heritage.
Available Tools
3 toolsruneberg_get_work_infoA
Get metadata, publication details, and table of contents/chapter list for a work in Project Runeberg.
Args:
work_slug: The work identifier (e.g. 'dasakungen', 'sbh', 'nfda', 'salmonsen').
Inputs: work_slug (required). Returns: result
runeberg_read_pageA
Read the cleaned, transcribed/OCR text of a specific book page from Project Runeberg.
Args:
url_or_slug: Full page URL (e.g. 'https://runeberg.org/pvmhall/0105.html') or work slug (e.g. 'pvmhall').
page: Optional page number if slug was provided (e.g. '0105' or 105).
Inputs: url_or_slug (required), page. Returns: result
runeberg_searchA
Full-text search across digitized books, encyclopedias, and literature in Project Runeberg (runeberg.org).
Args:
query: Search keywords or phrases (e.g. "Abraham Brodersson", "Dödsdansen", or "Falun gruva").
max_results: Maximum number of search results to return (default: 10).
Inputs: query (required), max_results. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: search for discovery, read_page for content access, and get_work_info for metadata. No overlap in functionality or ambiguous boundaries.
All tool names follow the same pattern: 'runeberg_' prefix with verb_noun structure (search, read_page, get_work_info). Consistent use of snake_case and clear verbs.
With only 3 tools, the set is minimal but appropriate for a focused read-only library access server. It covers search, retrieval, and metadata without excess.
The tools cover the core lifecycle: discover (search), access (read_page), and understand context (get_work_info). Minor gaps exist, such as lack of a browse/list tool, but search effectively covers discovery.
Related MCP Connectors
Public, read-only search and cited passages from The Old Ways historical-text and mythology reference library. Covers Norse, Greek/Hellenic, Egyptian/Kemetic, Celtic and Zoroastrian traditions. No account or API key required. Imported editions may contain transcription errors; editorial summaries are reading aids rather than passage-level verification. Connection and source policy: https://theoldways.co/ai
Search books and authors, fetch editions, browse subjects, and resolve cover images.
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Academic literature search, retrieval, and private library management on top of OpenAlex.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables users to search and access digital collections from the Swedish National Archives (Riksarkivet) through multiple APIs. Supports searching records by keywords, exploring collections, and downloading historical images and documents.227Apache 2.0
- AlicenseBqualityDmaintenanceProvides access to the National Library of Norway's Digital Humanities Lab, enabling text and image search, NGram analysis, word lookup, concordance finding, and corpus statistics from Norwegian digital collections.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables search and reading of Project Gutenberg books with tools for searching by title/author/subject and fetching word-range slices of book text.MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and retrieving Project Gutenberg books by title, author, topic, and popularity, along with book details and download statistics through the Gutendex API.261 npm1MIT