Before you begin: Read the Caveat Utilitor — a guide to the risks, biases, and inferential fallacies inherent in the DPRR dataset. The database documents a narrow, elite slice of Roman Republican society filtered through multiple layers of modern scholarly interpretation.

Setup

From source

Requires Python 3.13+ and uv.

uv sync
uv run dprr-server

Docker

Prebuilt images are published to GHCR on every release:

docker run -p 8000:8000 ghcr.io/gillisandrew/dprr-mcp:latest

Or build locally:

docker build -t dprr-mcp .
docker run -p 8000:8000 dprr-mcp

To persist data across container restarts, mount a volume:

docker run -p 8000:8000 \
  -v dprr-data:/root/.local/share/dprr-mcp \
  ghcr.io/gillisandrew/dprr-mcp:latest

Data

On first startup the server automatically downloads the DPRR RDF dataset from the latest GitHub release and initialises the local Oxigraph store. No manual data setup is required.

Why bundle the data? The upstream DPRR site experiences frequent downtime and serves a proof-of-work challenge page that blocks programmatic access. Bundling a snapshot in each release ensures reliable initialisation. The dataset is distributed under its original CC BY-NC 4.0 license.

Data is stored in $XDG_DATA_HOME/dprr-mcp/ (defaults to ~/.local/share/dprr-mcp/). Override with DPRR_DATA_DIR.

Usage

MCP server

The server uses the streamable-http transport — it runs as a standalone HTTP process that MCP clients connect to over the network.

# From source
uv run dprr-server

# Custom host/port
uv run dprr-server --host 0.0.0.0 --port 9000

# Docker
docker run -p 8000:8000 ghcr.io/gillisandrew/dprr-mcp:latest

Listens on http://127.0.0.1:8000/mcp by default. Health check at /healthz. Queries exceeding the timeout (default 600s, configurable via DPRR_QUERY_TIMEOUT) return a structured error.

MCP tools

ToolDescription
get_schema Returns DPRR ontology prefixes, available classes, and general query tips
validate_sparql Syntax check, auto-repairs missing PREFIX declarations, semantic validation against the ontology
execute_sparql Full validation + execution against the local Oxigraph RDF store

Claude Code configuration

Start the server, then add to .claude/settings.json:

{
  "mcpServers": {
    "dprr": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Claude Desktop configuration

Start the server, then add to claude_desktop_config.json:

{
  "mcpServers": {
    "dprr": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Claude Code skill

With the MCP server configured, use the built-in skill:

/dprr Who held the office of praetor in 150 BC?

Claude will load the DPRR schema, generate a SPARQL query, validate and execute it, then synthesise the results into an academic summary with source citations and uncertainty flags.

Architecture

See the architecture page for detailed diagrams of server startup, data initialisation, and tool execution flows.

Environment variables

VariableDescription
DPRR_DATA_DIROverride data directory (default: $XDG_DATA_HOME/dprr-mcp)
DPRR_DATA_URLOverride URL for auto-downloading the data tarball
DPRR_QUERY_TIMEOUTQuery timeout in seconds (default: 600)

References

This tool queries data from the Digital Prosopography of the Roman Republic (DPRR), which draws on the following secondary sources:

Citing this tool

@software{dprr_mcp,
  author    = {Gillis, Andrew},
  title     = {dprr-mcp: Natural Language {SPARQL} Queries
               for the Digital Prosopography of the Roman Republic},
  year      = {2025},
  url       = {https://github.com/gillisandrew/dprr-mcp}
}

Development

uv run pytest
uv run ruff check .