Six days after Mosby’s men rode into Herndon Station, the Richmond Daily Dispatch reported the raid. It got the number of prisoners right and the place wrong, putting the raid “at Bristol Station, on the Orange and Alexandra railroad”, which is a different railway altogether. Washington’s Evening Star did the opposite: it named the right station and got most of the rest wrong.

Setting those two reports side by side is the whole job of rebuilding a place from the record in miniature. You find what was written, you find who disagrees with whom, and you write the disagreement down instead of picking the answer you like. The tool that does the finding is called heritage-research-mcp. Our agents reach for it whenever they go to the archives, and we’ve now released it as open source for anyone to use.

What it is

It is an MCP server, which is a plug-in that lets an AI assistant such as Claude use a set of tools. This one searches six public archives and a Civil War newspaper: the Internet Archive, Wikimedia Commons, the Digital Public Library of America, the US National Archives, Smithsonian Open Access, the Library of Congress’s Chronicling America, and the University of Richmond’s edition of the Daily Dispatch. You ask in plain language, and it comes back with records in one consistent shape. The Open source page has the full list and what each archive is good for.

What it does for us

Without it, every archive is its own website with its own search box and its own idea of what “you may use this” means. With it, an agent can ask all of them at once, and four things have turned out to matter most.

  • It reads inside the books. The memoirs, regimental histories and official reports are scanned and searchable, so a name or a place can be found on a particular page of a particular book. That is how the real Federal regiments that hunt you on the campaign map were found: in the histories their own men wrote.
  • It puts the newspapers side by side, North and South. The Richmond and Washington papers disagreed about Herndon. A tool that hands you both is how you notice.
  • It keeps the rights with the picture. Every record carries what its holder says about reuse, and when the tool saves an original it writes a small file beside it: where it came from, when it was fetched, a checksum and the rights as stated. When we compared our saddles with photographs of real ones, the tool told us each photograph’s licence, some of them asking for attribution or share-alike, so we used them only to compare against, and they aren’t in our repository. The credits for the game’s period drawings are written from that record, down to the checksum of each scan as downloaded.
  • It tells us what isn’t there. In every archive the tool reaches, we found no photograph of Herndon from the nineteenth century. That is why the only period images of the place we can show you are maps, and why the village is rebuilt from deeds, maps and memoirs. An empty search is an answer worth writing down, though not proof that nothing exists, and our notes say so.
Newspaper front page under the "Harper's Weekly" masthead: an engraving of men in slouch hats breaking open crates and barrels beside covered wagons while riders wave them on in a wooded road.
How the Northern press pictured Mosby’s men: the front page of Harper’s Weekly, 5 September 1863. The scan reached us through Wikimedia Commons, one of the archives the tool searches. Harper’s Weekly. Library of Congress, LCCN 93514858. No known restrictions on publication.

The tool finds and reads. It doesn’t decide what is true. The agents gather and cross-check, and I decide what goes into the game, as I describe on How we work.

Why we’re giving it away

The first reason is that none of it is ours. Every archive the tool searches was built and opened up by someone else: a national library, a national archive, a museum, a university and a handful of non-profits. Keeping the glue between them private felt wrong when it can be shared at no cost.

The second is that the part we care about most is the part most search tools skip. Finding a photograph is easy. Knowing where it came from and whether you may use it is the hard part, and teachers, writers, genealogists, local historians and other studios all have the same problem. The tool never treats “the holder said nothing” as permission, and it keeps to each archive’s rate limits. When the Library of Congress’s website answered our own scripted requests with a bot challenge for more than a day, we built the tool to stop and wait when it is blocked, and never to try to look like a browser.

The third is that a tool other people use gets better. Our first National Archives code was written from the documentation, and it was wrong: it expected fields the real service never sends and missed some it does. It was rebuilt on real responses once we had a live key. Other people’s archives, questions and keys will find more of that than we can alone, and the README says plainly which parts have been checked against the live services and which only against recorded ones.

The licence is MIT. Use it, change it, build it into something else, in a classroom or a commercial product; keep the licence notice with it. And there is one more reason, which I’ll admit to. We say we use AI to build history, and that claim only means something if the working is open. This is the part of the working we can show in full.

It is small, and I’m one person, so please be patient with issues.

Getting the keys

Four of the seven sources need no key at all. The Internet Archive, Wikimedia Commons and Chronicling America work as soon as you install it, and the Daily Dispatch needs a one-time download of its text, which the tool does when you ask. Three want a free key: DPLA, the Smithsonian and the National Archives. A source without a key is simply skipped, and everything else carries on, so you can start now and add keys later.

  • DPLA is the quickest. One command, with your own email address in it, and the key is emailed to you. Check your spam folder if it doesn’t show.

    curl -X POST https://api.dp.la/v2/api_key/YOUR_EMAIL_ADDRESS
    
  • Smithsonian Open Access is a form. Go to api.data.gov/signup, give your name and email and a line on what you’ll use it for, and the key is issued when you submit. The limit is set per key, and the tool reports the allowance you have left.

  • The National Archives is the slow one, because a person answers. Make a free account on the National Archives Catalog, then email Catalog_API@nara.gov with your address, your Catalog username and a sentence on what you’ll do with it. NARA doesn’t state a turnaround, so ask early. The key allows 10,000 queries a month, and the tool counts them and stops at the limit. NARA forbids scraping the whole catalogue through the API, and asks for a line of attribution, which the tool includes in its results.

Keep your keys private. NARA deactivates one that turns up in a public repository, and one that goes unused for twelve months. Put each in its own file, named dpla, nara or smithsonian, readable only by you. For DPLA that looks like this:

umask 077
mkdir -p ~/.config/heritage-research-mcp/keys
printf '%s\n' 'PASTE_THE_KEY_HERE' > ~/.config/heritage-research-mcp/keys/dpla
heritage-research-mcp doctor --live

The last command lists each source, says where it found its key, and makes one small real request to prove it works. The tool treats the keys as secrets: they never appear in its results, its error messages or its logs, and a leak would count as a bug. If something fails, the usual cause is a stray space or quote in the key file. A wrong NARA key is the oddest case, because NARA doesn’t answer with an error. It quietly sends back its own website with a success code. The tool recognises that and tells you so.

Try it

You need uv or Python 3.11 or later. To add it to Claude Code:

claude mcp add heritage-research -- uvx --from git+https://github.com/magicianmarty/heritage-research-mcp heritage-research-mcp

Claude Desktop and other MCP clients can run the same command, and the README has the configuration. Then ask it something real:

  • Find 1860s maps of Fairfax County, Virginia, and tell me which I may reuse.
  • Find the passage in Mosby’s memoirs about the capture at Herndon Station, and quote it with the page.
  • Find Brady photographs of Union cavalry in the National Archives and give me archival citations.

One warning from our own experience: the newspaper text is machine-read from the page and often garbled, so names and numbers need checking against the scan before you rely on them. The tool says so too.

The code is on GitHub, and the page for it on this site is Open source. If you use it for your own research, I’d love to hear what you find.

Marty