<div align="center">
<img src="https://raw.githubusercontent.com/AI-Riksarkivet/ra-mcp/main/docs/assets/logo-rm-bg.png" alt="RA-MCP Logo" width="350">
</div>
# ra-mcp
[](https://github.com/AI-Riksarkivet/ra-mcp/actions/workflows/ci.yml)
[](https://github.com/AI-Riksarkivet/ra-mcp/actions/workflows/codeql.yml)
[](https://github.com/AI-Riksarkivet/ra-mcp/actions/workflows/publish.yml)
[](https://github.com/AI-Riksarkivet/ra-mcp/actions/workflows/trufflehog.yml)
[](https://www.python.org/downloads/)
[](https://github.com/astral-sh/ruff)
[](https://github.com/astral-sh/uv)
[](https://hub.docker.com/r/riksarkivet/ra-mcp)
[](https://scorecard.dev/viewer/?uri=github.com/AI-Riksarkivet/ra-mcp)
[](https://slsa.dev/spec/v1.0/levels#build-l2)
[](https://www.sigstore.dev/)
[](https://github.com/AI-Riksarkivet/ra-mcp/releases/latest)
A [Model Context Protocol](https://modelcontextprotocol.io/) server and CLI for searching and browsing transcribed historical documents from the Swedish National Archives (Riksarkivet). Provides full-text search across millions of AI-transcribed pages, complete page transcriptions, handwritten text recognition, interactive document viewing, and archival research guides — all as MCP tools that any LLM client can use.
## Quick Start (MCP)
**Streamable HTTP** — works with ChatGPT, Claude, and any MCP-compatible client:
```
https://riksarkivet-ra-mcp.hf.space/mcp
```
**Claude Code:**
```bash
claude mcp add --transport http ra-mcp https://riksarkivet-ra-mcp.hf.space/mcp
```
**IDE (mcp.json):**
```json
{
"mcpServers": {
"ra-mcp": {
"type": "streamable-http",
"url": "https://riksarkivet-ra-mcp.hf.space/mcp"
}
}
}
```
## Quick Start (CLI)
```bash
uv pip install ra-mcp
```
```bash
# Search transcribed documents
ra search "trolldom"
ra search "((Stockholm OR Göteborg) AND troll*)"
# Browse specific pages
ra browse "SE/RA/310187/1" --pages "7,8,52" --search-term "trolldom"
# Interactive terminal browser
ra tui "trolldom"
```
## Documentation
For architecture, development setup, deployment, tool reference, CLI reference, and more:
**[ai-riksarkivet.github.io/ra-mcp](https://ai-riksarkivet.github.io/ra-mcp/)**
## License
[Apache 2.0](https://github.com/AI-Riksarkivet/ra-mcp/blob/main/LICENSE)