Connect this dataset to Claude

Wire the historical-event explorer into Claude via the Model Context Protocol so an AI can read events, traverse relationships, and write reports.

← back to timeline

What you're connecting

This site ships with an MCP server (mcp/server.js) that exposes the same SQLite database the timeline reads from. Pointing Claude at it gives the model 12 tools — search, fetch, traverse, subgraph extraction, report-context formatting — plus a write_report prompt template and every topic-pack JSON file as a browsable resource.

This is a stdio MCP server. Claude spawns it as a local subprocess; there's no URL or port. So Claude needs to be running on the same machine (or container) where this repo is checked out.

1. Make sure the server runs

From the repo root:

npm install
npm run mcp

You should see [mcp] historical-event-explorer ready on stdio. Hit Ctrl-C — you don't run it manually; Claude launches it. This was just a sanity check.

Two ways to connect

ModeWhen to use
Remote (HTTP) The hosted instance (this site) exposes MCP over HTTP at /mcp. Use this if you don't have the repo checked out locally — works from anywhere with a token. See below.
Local (stdio) You have the repo cloned and want Claude to spawn the server directly. No network, no auth. See below.

Option 1 — Remote MCP (hosted)

Endpoint:

https://hts.michiganpublic.tech/mcp

Auth: bearer token. If you're the operator, fetch it from the cluster:

kubectl -n hts get secret hts-secrets -o jsonpath='{.data.admin-token}' | base64 -d

Otherwise ask the deployer for it. Then:

Claude Code (CLI)

claude mcp add --transport http historical-events https://hts.michiganpublic.tech/mcp \
  --header "Authorization: Bearer YOUR_TOKEN_HERE"

Claude Desktop

Add to claude_desktop_config.json under mcpServers:

{
  "mcpServers": {
    "historical-events": {
      "transport": {
        "type": "http",
        "url": "https://hts.michiganpublic.tech/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_TOKEN_HERE"
        }
      }
    }
  }
}
The remote endpoint shares state with the website. Tool calls that mutate (add_event, delete_event, add_relationship) edit the live database. Treat the token like a database password.

Option 2 — Local stdio

Replace the path with the absolute path to mcp/server.js in your local checkout.

Claude Code (CLI)

claude mcp add historical-events node /absolute/path/to/historical_data_visualization/mcp/server.js

Claude Desktop

Open your Claude Desktop config (Settings → Developer → Edit Config, or directly):

Add the historical-events entry under mcpServers (replace the path):

{
  "mcpServers": {
    "historical-events": {
      "command": "node",
      "args": ["/absolute/path/to/historical_data_visualization/mcp/server.js"]
    }
  }
}

Save, fully quit Claude Desktop, and reopen it. The hammer/plug icon should show historical-events connected.

3. Try it

In a new chat, ask Claude something like:

Or if your client surfaces MCP prompts, pick the write_report prompt directly and pass a topic — Claude will receive a pre-formatted briefing and produce a report in one round trip.

What the AI can do

Resources & prompts

The server also exposes every topic-pack JSON file under data/ as a readable MCP resource (history://data/<file>.json) plus the app config (history://config), so a client can browse the raw seeds. And there's one templated prompt — write_report — taking topic, angle, and hops arguments; it returns a user-message with the briefing already inlined.

Security note. The MCP server runs locally and the database is shared with the website you're looking at. Anything an AI does via the write tools (add_event, delete_event, add_relationship) lands in the same SQLite file the site reads from. Treat it as you would a writable database connection.

Troubleshooting