- Python 95.5%
- PLpgSQL 3.9%
- JavaScript 0.5%
- Shell 0.1%
Replace source quotations, names, titles, article IDs and publisher links in examples, tests and documentation with explicitly fictional data. Load live retrieval cases and the expected research candidate from private operator configuration. Validate case inputs before campaign writes, preserve citation and multilingual test coverage, and refresh provenance checksums. Validation: 137 tests passed with one existing deprecation warning; 137 source files scanned; 81 release and 13 passage-tooling hashes verified. Service build contexts remain identical to the verified production baseline. Previous Git history remains unchanged. No production deployment performed. |
||
|---|---|---|
| docs | ||
| infra | ||
| reports/scaleway-batches/20260922-gemma4-scaleway-full-v1 | ||
| third_party/backfield | ||
| .gitignore | ||
| README.md | ||
Reference Circle MCP
Reference Circle is a read-only research service for journalism archives. It provides nine tools for finding articles, passages, people, organisations and quotes, and for checking citations against the stored source text. Enrichment helps users find material. Verify claims and speaker attribution against the original articles.
Start here
This repository contains the production source verified on 17 November 2026.
The hosted MCP service runs reference-circle-mcp:20261014-performance with
MCP SDK 1.30.0, Streamable HTTP and Curity authentication. Local clients can
use stdio, which remains the default transport. The dependency lock records
the packages installed in production.
Use Python 3.12. From the repository root, create an environment and run the tests:
python3.12 -m venv .venv
.venv/bin/python -m pip install -r infra/mcp/requirements-passages.txt
.venv/bin/python -B -m pytest -p no:cacheprovider infra/mcp/tests infra/production/tests -q
These tests use fixtures or stand-ins for external services. The stdio tests
launch the server as a subprocess. For a real archive connection, use the
configuration and restore steps below before pointing an MCP client at
infra/mcp/server.py.
Handover
- Data, configuration and restore checklist
- Production layout, builds and restore requirements
- Active passage index: generation, migration and rollback
- Detailed tool documentation and analytics documentation
- Source provenance and third-party licensing
Start with the unit tests, then agree on a staging database and verify a
known source through search, article retrieval and citation lookup. Treat
scripts named integration_*, smoke*, bootstrap*, import_* and
launch* as operator commands. Check their target database and side
effects before running them. Some write data or call paid APIs.
The repository contains code, schemas, tests, documentation, a classification
catalogue and deployment configuration. The article corpus, database backups,
embeddings, credentials, licences, usage logs and private Curity runtime state
require a separate handover. Files with -v1 in their name are historical
references. The repository uses an explicit file allowlist in .gitignore.
Article-specific quotations, identities and links in the current source tree have been replaced with fictional examples using reserved example domains. Tests retain multilingual and repeated-quotation coverage. Live acceptance targets are supplied privately, as described in the passage-index guide. These changes do not remove the previous examples from Git history.
The active production database uses paragraph-based segmentation
(paragraph_sections_v2). The runtime consumes that precomputed index.
Its bundled citations.py still contains the earlier contiguous segmentation
function. The paragraph-index generator, source-heading resolver, embedding
worker and migration/rollback tools are included separately as operator
commands. Their provenance is recorded in infra/production/passage-index.json.