Natural-language prosopographic queries for the Roman Republic. Generates validated SPARQL against the DPRR RDF dataset and synthesises results with uncertainty flags and source citations.
Requires Python 3.13+ and uv.
uv sync
uv run dprr-server
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
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.
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.
| Tool | Description |
|---|---|
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 |
Start the server, then add to .claude/settings.json:
{
"mcpServers": {
"dprr": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
Start the server, then add to claude_desktop_config.json:
{
"mcpServers": {
"dprr": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
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.
See the architecture page for detailed diagrams of server startup, data initialisation, and tool execution flows.
| Variable | Description |
|---|---|
DPRR_DATA_DIR | Override data directory (default: $XDG_DATA_HOME/dprr-mcp) |
DPRR_DATA_URL | Override URL for auto-downloading the data tarball |
DPRR_QUERY_TIMEOUT | Query timeout in seconds (default: 600) |
This tool queries data from the Digital Prosopography of the Roman Republic (DPRR), which draws on the following secondary sources:
@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}
}
uv run pytest
uv run ruff check .