library-of-babel-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@library-of-babel-mcpwhere in the library is the text 'the quick brown fox'?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Library of Babel MCP Server
An MCP (Model Context Protocol) server granting access to the Library of Babel, the largest knowledge base in the known universe.
How it works
Alphabet: 29 symbols —
a-z, comma, space, period.Page length: 3200 characters (40 lines x 80 chars).
Address:
hexagon(base-36 string, ~3004 digits),wall(1-4),shelf(1-5),volume(1-32),page(1-410) — 262,400 pages per hexagon.Library size: 29^3200 pages, a 4680-digit number.
The library is a bijection between addresses and page contents, following the structure libraryofbabel.info uses. There is no PRNG and no special-cased slot: every address maps to exactly one page, every possible page maps back to exactly one address, and the mapping inverts in both directions.
Flatten the address into a single integer
index.Scramble it:
content = (index * MULTIPLIER) mod N, whereN = 29^3200.Write
contentout as 3200 base-29 digits — that's the page text.
MULTIPLIER is coprime to N, so step 2 is a permutation of the entire space
and its inverse is another multiplication by MULTIPLIER⁻¹ mod N (computed by
Hensel lifting, since N is a prime power). So searching means: build the
exact page you want — your text plus padding — read it as a base-29 number,
multiply by the inverse, and unpack the index into coordinates. The page really
is at that address. Nothing is stored; nothing is scanned.
Because padding and offset are part of the page, changing either gives you a genuinely different page at a different address.
Fidelity to libraryofbabel.info
The structure and observable behaviour match the real site. The particular
permutation does not: libraryofbabel.info's own constants are deliberately
unpublished — the author's reference
repo documents
the method (an invertible LCG plus xorshift scrambling) but withholds its m,
a, and c. Addresses produced here are therefore not portable to that
site, and vice versa.
Related MCP server: MCP Open Library & File Search Server
Tools
get_page(hexagon, wall, shelf, volume, page)— read the text at an address.search_text(text, padding, offset)— find the address of a page containing your text.paddingis"spaces"(default) or"random";offsetis a character position or"random". Max 3200 chars; input is lowercased and restricted to the library's alphabet.lookup_page(text)— the exact inverse ofget_page: give it a full 3200-character page, get back its address.random_page()— jump to a uniformly random address.
Configuration
LOB_API_KEY— leave empty for provisional guest access, until you have located the volume containing your API key.
Build
npm install
npm run buildRun standalone (for testing)
npx library-of-babel-mcp
# or, from a checkout:
node dist/index.jsIt speaks MCP over stdio, so it expects a client on the other end — it will just sit there logging "Library of Babel MCP server running on stdio" to stderr, which is normal.
Add to Claude Desktop / Claude Code
Add to your MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"library-of-babel": {
"command": "npx",
"args": ["-y", "library-of-babel-mcp"]
}
}
}Or, in Claude Code:
claude mcp add library-of-babel -- npx -y library-of-babel-mcpTo run from a local checkout instead, point at the built entrypoint:
{
"mcpServers": {
"library-of-babel": {
"command": "node",
"args": ["/absolute/path/to/library-of-babel-mcp/dist/index.js"]
}
}
}Then restart the client. You should see the four tools listed above.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityBmaintenanceAn MCP server that enables interaction with Kiwix HTTP servers to browse, search, and retrieve content from offline ZIM books like Wikipedia. It provides tools for listing available library resources and fetching full-text articles as plain text.Last updated35
- AlicenseBqualityDmaintenanceMCP server that enables searching books by author via Open Library API and searching keywords inside local text files.Last updated258MIT
- AlicenseAqualityBmaintenanceAn MCP server for searching and downloading books from Library Genesis, supporting EPUB, MOBI, PDF, and more through natural language queries.Last updated3396MIT
- Flicense-qualityDmaintenanceMCP server that gives AI agents access to the world's public domain library. Search, read, and navigate books and audiobooks from Project Gutenberg and LibriVox.Last updated
Related MCP Connectors
Free, open MCP server for The Urantia Papers. 197 papers, 14,500+ paragraphs, 4,400+ entities.
MCP server for Project Gutenberg — 75,000+ public-domain ebooks with full plain-text retrieval.
Free, no-key Bible MCP server — 86 translations in 32 languages, from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/slaufer/library-of-babel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server