Skip to main content
Glama
swedish-portrait-archive-mcp

swedish-portrait-archive-mcp

by tobbaz

Swedish Portrait Archive MCP Server (swedish-portrait-archive-mcp)

A Model Context Protocol (MCP) server for searching and retrieving historical Swedish portraits, biographies, and printed matrikel sources from Svenskt Porträttarkiv (Swedish Portrait Archive).

Svenskt Porträttarkiv contains over one million portraits scanned from printed Swedish biographical collections, military rolls, professional directories, and anniversary publications from the 19th and 20th centuries.


Features

  • Historical Portrait Search (search-portraits): Search by first name, last name, birth/death year, birth parish/county, occupation, and free-text queries.

  • Biographical Details & Transcriptions (get-portrait-details): Fetch full biographical texts, printed book references, Swedish Death Index cross-references (Sveriges Dödbok ID), and formatted genealogical citations.

  • Direct Image Access (get-portrait-image): Generate direct URLs to high-resolution portrait scans (JPEG) and online archive records.

  • Genney Compatibility: Produces ready-to-paste citation blocks designed for Swedish genealogical software (Genney).


Related MCP server: KB MCP Server

Ethics, Politeness & Fair Use

Svenskt Porträttarkiv is operated as a volunteer, non-profit community initiative founded by Omar Henriksson. To ensure respectful, fair, and responsible integration, this MCP server adheres to strict ethical guidelines:

  1. Strict Rate Limiting (RequestQueue): All outgoing network requests are queued sequentially with an enforced delay of at least 400 ms (+ randomized jitter) between requests.

  2. Transparent User-Agent: Every request identifies itself clearly:

    User-Agent: SwedishPortraitArchiveMCP/1.0 (+https://github.com/tobbaz/swedish-portrait-archive-mcp)
  3. No Bulk Scraping: The tools operate exclusively on-demand for targeted genealogical queries. The server does not support mass harvesting or mirroring of the archive.

  4. Attribution & Licensing:

    • Individual portraits and biographical texts are generally licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

    • The composite archive collection is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).

    • Every search result and detail query provides direct links back to the original entry at https://portrattarkiv.se/details/{id}.


MCP Tools

1. search-portraits

Searches the archive for portraits matching given genealogical parameters.

Parameter

Type

Description

firstName

string (optional)

Given name (e.g. "Emanuel" or "Carl August")

lastName

string (optional)

Surname (e.g. "Kastengren" or "Lindahl")

birthYear

string | number (optional)

Birth year (e.g. 1826)

deathYear

string | number (optional)

Death year (e.g. 1904)

birthPlace

string (optional)

Parish, town or county of birth

occupation

string (optional)

Occupation or title (e.g. "Löjtnant", "Veterinär")

employmentPlace

string (optional)

Workplace or place of residence

query

string (optional)

Free-text search across all metadata

limit

number (optional)

Results limit (default: 20, max: 100)

from

number (optional)

Pagination offset

2. get-portrait-details

Retrieves full details for a portrait record.

Parameter

Type

Description

portraitId

string (required)

Portrait unique ID (e.g. "sj9PGLAlnmUAAAAAABlg4w")

Returns transcribed biographies, source collections/books, Sveriges Dödbok ID, and a Genney-formatted citation.

3. get-portrait-image

Returns direct links to the high-resolution JPEG image and archive web page.

Parameter

Type

Description

portraitId

string (required)

Portrait unique ID


Installation & Building

Prerequisites

  • Node.js 18+ or 20+

  • npm

Setup

git clone https://github.com/tobbaz/swedish-portrait-archive-mcp.git
cd swedish-portrait-archive-mcp
npm install
npm run build

Running Tests

npm test

MCP Configuration

Antigravity / Claude Desktop Configuration

Add the server to your mcp_config.json (or claude_desktop_config.json):

{
  "mcpServers": {
    "swedish-portrait-archive": {
      "command": "node",
      "args": [
        "/absolute/path/to/swedish-portrait-archive-mcp/build/index.js"
      ]
    }
  }
}

License

  • Code: Released under the MIT License.

  • Archive Data & Portraits: Provided by Svenskt Porträttarkiv under Creative Commons licenses (CC BY-SA 4.0 / CC BY-NC-SA 4.0).

Available Tools

3 tools
get-portrait-detailsA

Retrieve comprehensive metadata, transcribed biography, book citation, vital statistics, and Genney-ready citation snippet for a specific portrait ID.

Inputs: portraitId (required).

get-portrait-imageB

Get direct high-resolution image URL (JPEG) and web page links for a portrait by its identifier.

Inputs: portraitId (required).

search-portraitsA

Search Svenskt Porträttarkiv (Swedish Portrait Archive) for historical portraits by name, birth/death year, birth place, occupation, or free text. Returns matched individuals with ID, book source, biographical snippet, and links.

Inputs: from, limit, query, lastName, +6 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool addresses a distinct stage of the workflow: searching for individuals, retrieving detailed metadata for a selected portrait, and fetching the image URL. There is no overlap or ambiguity between these three operations.

    Naming Consistency5/5

    All tool names follow a consistent lowercase hyphenated verb_noun pattern: search-portraits, get-portrait-details, get-portrait-image. The pattern is predictable and uniform across the set.

    Tool Count5/5

    Three tools is a perfectly concise scope for this server: search, retrieve details, and retrieve image. Each tool has a clear purpose and none feel redundant or missing.

    Completeness5/5

    The tool set covers the full user journey for the domain: discovering portraits via search, inspecting detailed metadata and citations, and obtaining the actual image. No obvious operational gaps exist for the stated purpose.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      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
      27
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides access to Sweden's National Library (Kungliga biblioteket) open APIs, enabling search and retrieval of 20M+ bibliographic records, 10M+ cultural heritage objects, 2M+ research publications, and linked data through 52 tools across 10 endpoints.
      3
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables users to search the SNAC Cooperative's index of archival collections and the people, families, and organizations linked to them, and to construct ArchiveGrid search links. It helps genealogists and historians discover which repositories hold papers and related collections.
      8
      21 PyPI
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables searching Dutch archival deeds and records via the Open Archieven API, discovering every scan of a register, and downloading images with full provenance and metadata. It also offers a conservative, locally-OCR-based resolver that suggests candidate scans for a given act without performing automatic matching.
      6
      MIT