marl-book-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., "@marl-book-mcpSearch for 'decentralized POMDP' in the book."
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.
marl-book-mcp
An MCP server that exposes the full text of Multi-Agent Reinforcement Learning: Foundations and Modern Approaches by Stefano V. Albrecht, Filippos Christianos, and Lukas Schäfer (The MIT Press, 2024), so an LLM can search it, pull a specific page, or read a whole chapter instead of guessing from memory.
Built with FastMCP. Runs locally over stdio,
or as a remote HTTP server with OAuth for clients like claude.ai. Modeled on the
sibling rlbook/ server (Sutton & Barto).
Licensing: the code is MIT. The book text under
pages_corrected/and the raw OCR underocr_raw/is not — it belongs to the authors and MIT Press. ReadNOTICE.mdbefore you reuse anything from those directories.
Tools
Tool | What it does |
| Case-insensitive term search across all 381 reconstructed pages. Returns the best-scoring pages with a surrounding excerpt and the chapter each one falls in. |
| One page verbatim, 1–395. Page numbers are PDF page numbers (printed number = PDF number − 29). |
| A whole chapter, 0–16. Index |
| All 17 sections with their page ranges. |
Math is returned as LaTeX (inline \( … \), display \[ … \]), reconstructed
from the Nougat OCR pass.
Related MCP server: AI Book Agent MCP Server
The corpus and how it was built
The book PDF is freely available (color, ~8 MB) at https://www.marl-book.com
(the "Download" link). It is a native-text PDF, but a plain PyMuPDF
extraction flattens all the mathematics. To keep the equations, the corpus was
built with a two-source OCR + reconciliation pipeline (same idea as
rlbook/, but the source here is digital rather than scanned):
PyMuPDF (
extract.py) — faithful running text, used as the spelling / wording reference. Output inocr_raw/pymupdf_pages_*.txt.Nougat (
run_nougat.py, run on thedataia25GPU cluster, 2× RTX 3090) — math-aware OCR producing LaTeX. Output inocr_raw/nougat_pages_*.mmd.Reconciliation — every page was cross-checked between the two sources and hand-corrected into
pages_corrected/pages_XXX-YYY.md(10–14 pages/file,--- PAGE N ---separators, N = PDF page). Section numbers Nougat dropped were restored, all algorithm boxes and linear programs were reconstructed, figures are described in-line as[Figure N.M: …], and Nougat runaway/repeat pages (191, 283, 37, …) were rebuilt from PyMuPDF.
pages_corrected/ is what the server actually reads via _load_all_pages().
References (p.370–391) and the index (p.392–395) are included from the PyMuPDF
text. The source PDF is gitignored (*.pdf) — download it yourself if you want
to re-extract.
Nougat on the cluster (gotchas)
Nougat 0.1.17 is abandoned and hostile to modern Python. The working recipe (isolated venv, py3.12) pins around it:
transformers==4.34.1(5.x →NameError: name 'nn' is not defined)albumentations==1.3.1(2.x changed theImageCompressionsignature)pypdfium2==4.20.0(≥4.25 removedPdfDocument.render)install
nougat-ocr --no-depsafter the pinned wheels (itsdatasets[vision]otherwise backtracks to an ancientpyarrowsdist that won't build on 3.12)sentencepieceis required but not pulled in with--no-deps.
Drive it page-by-page with batch_size=1 (run_nougat.py) so page↔prediction
alignment is guaranteed and --- PAGE N --- markers are exact.
Chapter map (PDF page ranges)
Front matter 1–29 · Ch1 30–45 · Part I 46–47 · Ch2 48–71 · Ch3 72–89 · Ch4 90–117 · Ch5 118–143 · Ch6 144–187 · Part II 188–189 · Ch7 190–211 · Ch8 212–247 · Ch9 248–333 · Ch10 334–347 · Ch11 348–365 · Appendix A 366–369 · References 370–391 · Index 392–395.
Run
Local (stdio)
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python server.pyRegister with Claude Code:
claude mcp add marlbook -- /home/bnj/mcp_servers/.venv/bin/python /home/bnj/mcp_servers/marlbook/server.pyLocal editor integrations (Continue, Zed, …)
Loopback, no auth:
python server.py --http --no-auth --port=8008--no-auth binds to 127.0.0.1 and refuses any other host. Do not put this mode
behind a reverse proxy — use OAuth for anything off-machine. See
continue-mcp.yaml.
Remote (HTTP + OAuth)
Copy .env.example to .env and fill it in (MCP_CLIENT_SECRET from
openssl rand -hex 32, a MCP_ACCESS_PIN, and the public MCP_BASE_URL). Then:
set -a && source .env && set +a
python server.py --http --port=8008Deployed here as the systemd user service mcp-marlbook.service on port 8008,
behind Caddy on the rpi5 (mcp-marlbook.benjamin-lepourtois.fr, flush_interval -1
for SSE), with a Hostinger A record and the connector registered on claude.ai.
Known limitations
Page numbers are PDF-relative (printed number = PDF − 29).
Figures are described, not reproduced — schematics, learning curves, and matrix-game diagrams are summarized in brackets from their captions.
Search is literal (term counts, no stemming/semantics).
OCR is imperfect on the densest equations and tables; a handful of Nougat runaway pages were rebuilt from PyMuPDF and are marked as such.
Credits
The book is by Stefano V. Albrecht, Filippos Christianos, and Lukas Schäfer,
published by The MIT Press. This repository only wraps its text in an MCP
interface. See NOTICE.md.
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
- Alicense-qualityCmaintenanceProvides AI agents with research capabilities for local Calibre e-book libraries, including fulltext search across titles, ISBNs, and comments, plus structured excerpt retrieval from books.Last updated2GPL 3.0
- Flicense-quality-maintenanceProvides AI assistants with intelligent access to ML textbook content through RAG-powered search, chapter retrieval, and documentation generation capabilities. Uses local models for privacy-focused, source-grounded responses from indexed technical books.Last updated
- Alicense-qualityCmaintenanceEnables AI agents to read and navigate EPUB files through 13 specialized tools for pagination, full-text search, metadata access, and footnote resolution. Supports session-based reading with table of contents navigation and chapter summaries.Last updatedMIT
- Alicense-qualityDmaintenanceEnables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.Last updated67598MIT
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Token-efficient search for coding agents over public and private documentation.
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/BNJ02/marl-book-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server