Most AI systems are reasoning over what they were trained on. The interesting work happens when they can reach further.
You can ask any current AI assistant for the most recent peer-reviewed work on a specific topic and it will give you a confident, fluent, well-organized answer. Sometimes that answer is correct.
When it isn't, the failure mode is rarely a thinking failure. It is a sourcing failure. The model never had the document. It never had a path to the canonical version of the thing you asked it about. So it did what models do under those conditions, which is generate the most probable string that sounds like an answer, sometimes complete with citations to papers that nobody wrote. The literature has a polite word for this. The actual phenomenon is closer to having a brilliant friend who has read everything published up to a fixed date in the past, has near-perfect memory of everything they read, and has been forbidden from looking anything up since. You can ask them anything. They will say something. The something will sound right.
The standard response is "web search." Web search returns marketing copy and SEO summaries of summaries. It returns blog posts about the paper, not the paper. It returns the press release about the Senate hearing, not the transcript. The closest most working researchers will get to a primary source through a frontier model is one of those forty-five-dollar PDF links sitting behind a paywall the model cannot cross. We have given the model a library card to a library that doesn't exist.
The primary sources, meanwhile, are all open. Most of them have been open for twenty years. arXiv. Europe PMC. The Library of Congress. The US National Archives. UK legislation going back centuries with full historical versioning, which is the kind of public infrastructure most countries do not actually have. Oxford's institutional repository. Cambridge's. Harvard's. OpenAlex, which indexes 240 million scholarly works on a free public API, a fact I had to stop and reread the first time I came across it. The Smithsonian's catalog, which holds 14 million records, a number that is meant to make you sit down. NASA's full technical report archive going back to the 1940s. CourtListener's complete corpus of US federal and state case law, which exists, is free, and is queryable in real time, none of which a randomly selected person working in legal would necessarily believe if you told them at a party.
That is not a controlled-access world. That is a public library it took two thousand years to rebuild after the original one burned down.
Nobody had walked an LLM through any of its doors.
What the door looks like
The thing I built is called Alexandria. It is a Model Context Protocol server, which is the standard adapter the field landed on for letting tools like Claude Desktop talk to external systems without the conversation having to be reshaped around the tool. It exposes seven primitives. The most important one is library_ask. You hand it a sentence in plain English. It routes the question to whichever of its 61 sources are most likely to have an answer, queries them in parallel, deduplicates, and returns titles, authors, dates, abstracts, and links to full text.
That is the entire abstraction. It is also the entire point. You should not have to know which library has the thing. You need the thing.
The implementation behind that one call is doing nontrivial things. The router is a few hundred lines of code wrapping gpt-4o-mini against a registry of source descriptions. It reads your query, scans the source list, picks the five most plausible matches, generates an optimized search string for each one in its native query language, and dispatches them concurrently. Routing cost is roughly a tenth of a cent. Wall time, under a second. The cost of being wrong, which is most of what makes AI assistants feel haunted, mostly goes away.
Forty-six of the sixty-one sources require no registration to use. Most of the remaining fifteen take two minutes to sign up for and cost nothing. The hardest one, BASE, asks you to email the Bielefeld team for IP whitelisting and takes a few days to come back. That is not a holdover from a less hospitable era. That is a considered choice about how a 400-million-record index distributes its bandwidth. Email them.
The interesting case is source 61.
Google Code Wiki generates live AI documentation for any public GitHub repository on demand. Architecture diagrams, API references, dependency maps, the kind of artifact that usually takes a senior engineer a week to produce and that most projects never get around to. It is indexed. It is excellent. It is also, in the strict sense, not a public API. What it has is the same internal batchexecute RPC protocol that powers Google Maps, Google Search, Google Docs, and roughly every Google product surface you have ever used. POST request, form-encoded body, response framed as a sequence of wrb.fr JSON envelopes. The RPC IDs are stable. I read enough of an existing community wrapper to learn the format, wrote the adapter against the raw protocol, and shipped it. It works. Should it? Probably yes. Will it survive an internal Google product decision someday? Eventually no. That is what an MCP adapter is for. When the surface changes, you change the adapter. The user keeps asking questions in plain English.
I mention this not because reverse-engineering an undocumented internal Google endpoint is in itself remarkable, but because it is the boundary case. The other sixty have official, documented, advertised APIs. They were always reachable. Anyone could have done this years ago. The collective fact of no one having actually walked an LLM through all of them is the subject of this piece.
A short history of the original
The library this server is named for was founded in Egypt around 295 BCE, under either Ptolemy I or his son Ptolemy II. The ancient accounts disagree. They agree on this: the Mouseion of Alexandria was unlike anything that had come before it. It was not a repository. It was a research institution built around a universal collection. The explicit ambition, recorded in letters and histories that themselves survived only in fragments, was to collect every book in the world. Not books on specific subjects. Every book.
The Ptolemies ran this as state policy. Their agents bought scrolls in the markets of Athens and Pergamon. Ships entering the harbor at Alexandria had their scrolls confiscated, copied, and returned, with the originals going to the Library and the copies going back to the ship. That is one of the stranger state policies in recorded history, and it is rarely mentioned in passing the way it deserves. There were customs officials in the third century BCE whose actual job, on the books, included boarding incoming vessels, identifying any scrolls aboard, and taking them. This happened for centuries. Estimates of the collection at its height range from 400,000 to 700,000 scrolls. The ancient world's version of a hard number nobody can fully verify.
What happened inside the building is what made the institution. Eratosthenes calculated the circumference of the Earth there, to within a few percent. He used sticks and shadows. Euclid wrote the Elements there, a textbook still being assigned in the twentieth century, which is a useful frame on how slowly human mathematical literacy moves. Herophilus performed the first systematic human dissections in recorded history there, because the Ptolemies had arranged official permission that no other authority in the ancient world would grant, which means a noticeable fraction of what we still know about the human body began with a state policy that said yes, you can. Aristarchus of Samos proposed a heliocentric solar system there, seventeen centuries before Copernicus, was widely ignored, and was right. Callimachus produced the Pinakes, the first major bibliographic catalog and the direct ancestor of the modern library card system, because a collection of that size has to be findable or it might as well not exist. The Septuagint, the Greek translation of the Hebrew Bible that became the canonical Old Testament for early Christianity, was completed there. The Library was not a place you went to read. It was the place you went to think, because for several hundred years it was the only place on Earth where thinking at the highest level was structurally possible. Everything you needed was in one building.
Then it wasn't.
The decline was not the single dramatic burning popular history likes to remember. Julius Caesar setting the harbor on fire in 48 BCE. Christians sacking the Serapeum in 391. The Arab conquest in 642. Each version of the myth carries a satisfying single villain, which is exactly why each version survives. The real destruction was slower and more familiar. Neglect. Political instability. The loss of imperial patronage. Funding cuts. A long succession of partial disasters that nobody fully repaired because the people who could repair them had stopped having the political capital to bother. The knowledge scattered. Some of it was lost outright. Most of what survived did so in fragments, in copies made before the copies were lost, in the kind of institutional memory that outlasts the institution.
What was lost in Alexandria was not just scrolls. It was the original case for why universal collections matter. The case against centralization is that centralization concentrates fragility. The case for it is that the alternative is every person rebuilding their own library out of whatever they happened to come across in their lifetime, which guarantees redundant effort and missed connections at civilizational scale. The trade-off has not been resolved in two thousand years. What has changed is that the cost of distribution has fallen far enough that we no longer have to pick. The actual canonical sources can live in their institutions, where they are maintained by people who care about them. The interface that walks across all of them at once can live anywhere. On your laptop, for example.
That is the structural argument behind this server. The trade-off Alexandria's destruction made expensive is now cheap.
What this enables
Alexandria has three first-order uses, ordered by ambition.
The first is research that requires primary sources. If the work actually matters, the abstract doesn't cut it and the summary-of-the-summary is worse than nothing. You need the document. The real one. The version with the methods section intact and the citations actually checkable.
The second is professional knowledge work where being wrong about a fact has a price tag. Legal research where the wrong citation gets sanctions. Medical research where the wrong dosage hurts a patient. Engineering research where the wrong specification produces a recall. None of these tolerate hallucinated sources. All of them benefit from a system that surfaces real ones and refuses to fabricate when it can't find one, which is the harder behavior to engineer than it sounds.
The third is the case I'm personally most invested in, which is what happens when a retrieval layer like this becomes one component of something larger.
There is a thing in the productivity literature called a "second brain." A structured external memory for everything you have read, written, decided, or wanted to remember. The classic implementation is a closed loop. You put in what you have already collected. You query what you have already put in. It is excellent for what it does. It is also bounded, hard, by the perimeter of your own prior reading. The system gets very good at telling you what you already know. It cannot tell you what you don't.
What an adapter like this changes is that perimeter. The system stops being limited to what you have already encountered. The same conversational interface that lets you query your own notes can reach into 240 million scholarly works, the holdings of the world's major institutional repositories, and the canonical legal and government records of multiple jurisdictions, mid-conversation, without you having to leave the chat. A paper that did not exist in your knowledge base ninety seconds ago can be sitting in it now, queryable in the same thread, alongside everything else you have collected. The line between "what I have read" and "what is being published in the relevant field this week" stops being a wall and starts being something the system crosses on your behalf without asking permission.
I am not going to describe the specifics of how my own setup is built. The architecture decisions are mine and I am still iterating on them. What I will say is what the effect is. The shift from a closed-loop second brain to one with a live retrieval edge is not a small upgrade. It is the difference between an assistant that knows what you have told it and an assistant that knows what you have told it plus what was published in the field this morning. The first is a personal archive with search. The second begins to feel like a research collaborator who happens to live on your hard drive and does not sleep.
None of this is required to use Alexandria. The server works as a standalone retrieval layer the moment you clone the repository, and most of its value lands without any second-brain plumbing behind it. If you already have a knowledge base of your own, the integration is a matter of pointing the right tools at the right schema, and that will look different for everyone. The point is that the option exists. The retrieval layer being open and standardized means anyone building one of these personal systems gets the same external reach without having to rebuild it from scratch. This is the whole point of infrastructure.
How to use it
The server is open source under MIT license at github.com/suavecito585/alexandria-mcp. Clone it, build it, point Claude Desktop at the compiled binary, and forty-six sources work immediately with no configuration. The fifteen that need keys are tiered in the README in the order you should bother with them. CORE first if you do academic work. Semantic Scholar second. NASA ADS if you are in physics. CourtListener if you are in law. BASE last, because the IP whitelist takes a few days, and you will get plenty out of the other sixty while you wait.
That is the entire setup. Six hours of effort, total, against sources that have been sitting open for twenty years waiting to be assembled in one place. We have spent those twenty years arguing about whether the model is smart enough. The model has gotten dramatically smarter. The doors to the public archives have changed very little, which is the point. They were always open. They were never the bottleneck. The piece that was missing was the one that could walk through all of them at once and come back with something useful.
It exists now. The library is not on fire. Come in.
Mohammed Islam writes as Suavecito at The 13th Letter. He builds AI infrastructure and releases music. He is not affiliated with any of the institutions whose APIs Alexandria queries. The server is at github.com/suavecito585/alexandria-mcp, MIT licensed.
