Skip to main content
Glama
tobbaz

runeberg-mcp

by tobbaz

Runeberg MCP 📖

License: MIT Python 3.10+ MCP

A Model Context Protocol (MCP) server and CLI tool for searching and reading digitized classic Nordic literature, historical encyclopedias, biographies, and source documents from Projekt Runeberg.

Project Runeberg has been publishing free electronic editions of classic Nordic literature out of copyright since 1992. It includes vast cultural treasures such as Nordisk familjebok, Svenskt biografiskt handlexikon, Salmonsens konversationsleksikon, parish histories, memoirs, drama, and poetry.


✨ Features

  • 🔎 Full-Text Search (runeberg_search): Search the actual text of millions of scanned book pages across Projekt Runeberg.

  • 📄 Clean Page Reading (runeberg_read_page): Extract and format the transcribed/OCR text for any page, stripped of web markup and navigation. Includes links to original facsimile scans.

  • 📚 Work & Chapter Inspector (runeberg_get_work_info): Retrieve metadata, authors, publication years, and tables of contents/chapter links for any digitized volume.

  • ⚡ Zero-Config by Default: Works out-of-the-box using privacy-respecting search backends (DuckDuckGo/multi-engine) without requiring any API keys.

  • 🚀 Optional Google Custom Search API: Supports official Google Custom Search JSON API for high-volume or specialized setups.

  • 🛠️ Dual-mode CLI & MCP: Use directly in your terminal as a CLI or seamlessly integrate with LLM agents (Claude Desktop, Cursor, Antigravity, etc.).


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

To connect this MCP server to your AI assistant, add it to your client's configuration file.

1. Claude Desktop (claude_desktop_config.json)

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "runeberg": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/runeberg-mcp",
        "run",
        "runeberg-mcp",
        "serve"
      ]
    }
  }
}

2. Cursor / Antigravity / Other MCP Clients

Configure as a stdio MCP server with:

  • Command: uv

  • Args: ["--directory", "/path/to/runeberg-mcp", "run", "runeberg-mcp", "serve"]


🔧 Search Engine Options

Default: Zero-Config (No API keys needed)

By default, searches against site:runeberg.org run via multi-engine fallback (ddgs), requiring no API keys or signups.

Optional: Google Custom Search JSON API

If you prefer to query Google's official Custom Search API:

  1. Create an API key in the Google Cloud Console.

  2. Create a Programmable Search Engine configured to search runeberg.org/*.

  3. Set the environment variables in your client configuration:

{
  "mcpServers": {
    "runeberg": {
      "command": "uv",
      "args": ["--directory", "/path/to/runeberg-mcp", "run", "runeberg-mcp", "serve"],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "GOOGLE_CSE_ID": "your-custom-search-engine-id"
      }
    }
  }
}

💻 CLI Usage

You can test and use the tool directly in your terminal:

Search for books or phrases:

uv run runeberg-mcp search "Dödsdansen"
uv run runeberg-mcp search "Abraham Brodersson"

Read a specific page:

# By work slug and page number:
uv run runeberg-mcp read dasakungen 5

# Or by full URL:
uv run runeberg-mcp read https://runeberg.org/strindbg/dodsdans/0057.html

View work metadata and chapters:

uv run runeberg-mcp info dasakungen
uv run runeberg-mcp info sbh

🧪 Testing

Run the test suite to verify search, retrieval, and text parsing:

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 tools
runeberg_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').
ParametersJSON Schema
NameRequiredDescriptionDefault
work_slugYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral burden. It clearly communicates a read-only 'get' operation and what the result will contain. It does not disclose potential error behavior or rate limits, but for a simple retrieval tool this is not a major gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences plus a parameter block with no filler. The purpose is front-loaded and the parameter explanation is immediately actionable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only one required parameter and an output schema present, the description is nearly complete. The only missing context is a brief nod to the sibling tools or how to obtain a valid work_slug, but that is a minor omission for this low-complexity tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description fully compensates by explaining work_slug as 'The work identifier' and giving four concrete examples. This tells the agent exactly what value to supply and what form it takes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Get'), a concrete resource ('a work in Project Runeberg'), and the exact information returned (metadata, publication details, table of contents/chapter list). This makes it easy to distinguish from the sibling tools runeberg_search and runeberg_read_page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied: after you already have a work_slug, this tool fetches overview information. However, the description does not explicitly contrast this with searching for works or reading pages, so the agent must infer when to select this tool over its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).
ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
url_or_slugYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses that this is a read operation returning cleaned/OCR text and that the page parameter only applies when a slug is used. However, it does not state what happens when a slug is provided without a page, how invalid inputs are handled, or whether any normalization occurs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: the purpose appears in the first sentence, followed by a clean Args section. Every sentence adds necessary information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value details do not need to be in the description. The two parameters are thoroughly documented and the read behavior is clear. The main gaps are the lack of explicit sibling differentiation and the unspecified default behavior when page is omitted, but overall this is nearly complete for a simple read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description is the only documentation for the parameters. It fully explains url_or_slug with a concrete URL and slug example, and page with both string and numeric examples, while also clarifying the conditional relationship between the two parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read') and the resource ('cleaned, transcribed/OCR text of a specific book page from Project Runeberg'). This distinguishes it from the sibling tools runeberg_search and runeberg_get_work_info, which serve clearly different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the use case clear: retrieve page text when you have a full page URL or a work slug plus optional page number. It does not explicitly mention alternatives or exclusions, but the context is strong enough for an agent to infer when this tool applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedruneberg_get_work_info
    • First observedruneberg_read_page
    • First observedruneberg_search

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables 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.
    2
    24
    Apache 2.0
  • A
    license
    B
    quality
    C
    maintenance
    Provides 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.
    9
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to search and retrieve consolidated Swedish statutes (SFS) from the Riksdagen open data API, with verifiable citations and persistent identifiers.
    4
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables search and reading of Project Gutenberg books with tools for searching by title/author/subject and fetching word-range slices of book text.
    MIT