ao3-mcp
Connect AI agents to Archive of Our Own (AO3) for intelligent fanfiction search, reading, and recommendation, using a secondary AI model (Gemini) to read and analyze full fics, keeping the main agent's context clean.
Search AO3 with rich filters: fandom, ship, character, tags (freeform), rating, word count, completion status, categories (F/F, M/M, etc.), sorting, and free-text queries supporting AO3's search operators and wildcards. Returns up to 20 results per page, up to 5 pages.
Resolve fuzzy tags to canonical AO3 tags via live autocomplete (e.g., "coffee shop" → "Alternate Universe - Coffee Shops & Cafés") for fandoms, relationships, characters, and freeform tags.
Get full metadata for a single work by ID: tags, stats, summary, series.
Read and analyze fics (up to 20 at once, up to 150k words each) using the secondary AI, producing structured reports covering plot, characters, writing style, prose samples, content notes, and a comparative ranking when multiple fics are read together. Recommendations are based on actual content, not just author blurbs.
Retrieve raw fic text as an escape hatch for close reading or quoting (optionally capped).
Cache downloads locally for 24 hours to avoid repeated AO3 requests.
Inspiration engine for writers: get style references and structured reports on how specific tropes, narrative beats, or character voices are handled in existing fics.
Respect AO3's volunteer-run service with throttled, polite requests and Cloudflare bypass.
Search AO3 fanfiction with full filters, resolve fuzzy wording to canonical tags, and get structured reports from reading the actual fic text.
ao3-mcp
An MCP (Model Context Protocol) server that connects AI agents — Claude, Cursor, or any MCP client — to the Archive of Our Own. Search AO3 fanfiction with full filters, resolve fuzzy wording to canonical tags, and get fics actually read before they're recommended.
The trick: your agent never reads fic text. It delegates reading to a cheap secondary model (Gemini), which digests whole fics — even 150k-word novels — and returns structured reports. Your agent's context stays clean; the recommendations are based on the real text, not the blurb.
agent ──MCP──> server.py
├─ ao3.py AO3 scraping (no public API exists) — throttled and polite
└─ reader.py Gemini reads the fics, reports back: plot, style,
prose samples, content notes, a rankingWhy this beats blurb-based recommendations
An AO3 blurb is an ad written by the author. This server's workflow is: search wide (40–60 results), have the reader model read the shortlist — up to 20 full fics in one call — and recommend only what was actually read, with verbatim prose samples so quality is judged from the text itself.
Related MCP server: CodeAlive MCP
Not just for finding your next read
If you write with an AI — fanfic, original fiction, roleplay — this doubles as an inspiration engine. Mid-scene, your agent can pull up how real fic authors handle the exact beat you're on:
Find three highly-kudosed fics where rivals are forced to share a bed, read them,
and tell me how each one builds the tension — pacing, POV, what they leave unsaid.The reader reports back with structure, style notes, and verbatim prose samples, so the model gets grounded in how the trope is actually written — not what it imagines fanfic sounds like. Works the same for roleplay: pull reports on fics that nail a character's voice and feed them in as style reference.
Install
Requires Python 3.10+ and a free Gemini API key:
Go to aistudio.google.com/api-keys, sign in with any Google account, and click "Create API key". The free tier is enough — no billing setup needed.
pip install ao3-mcpAdd to your agent
Point command at ao3-mcp and pass your key with --api-key:
{
"mcpServers": {
"ao3": {
"command": "ao3-mcp",
"args": ["--api-key", "YOUR_GEMINI_KEY"]
}
}
}Prefer to keep the key out of the args list? Drop --api-key and pass it in an env
block instead — the server reads GEMINI_API_KEY from the environment as a fallback:
"env": { "GEMINI_API_KEY": "YOUR_GEMINI_KEY" }claude mcp add ao3 -- ao3-mcp --api-key YOUR_GEMINI_KEYCursor Settings → MCP → New MCP Server, paste the JSON config above.
Add the JSON config above to .gemini/antigravity/mcp_config.json.
code --add-mcp '{"name":"ao3","command":"ao3-mcp","args":["--api-key","YOUR_GEMINI_KEY"]}'Then just ask:
Find me a completed enemies-to-lovers longfic in <fandom>, read the top candidates, and tell me which is best written.Launch params
Param | Env var | Default | What it does |
|
| — | Gemini API key (required). |
|
|
| Model the reader uses. |
|
|
| Fallback model when the main one is throttled. |
|
|
| Minimum seconds between AO3 requests. |
Tools
Tool | What it does |
| Search AO3: fandom, ship, character, tags, rating, word count, completion, sorting. 20 results/page, up to 5 pages per call. The |
| Live autocomplete — fuzzy wording → canonical AO3 tag, fandom, ship, or character names. |
| Full metadata card for one work: tags, stats, summary, series info. |
| Reads 1–20 full fics with the secondary model and returns a structured report per fic — plot, characters, style, verbatim prose samples, content notes — plus a comparison ranking them against your question. |
Fic downloads are cached locally for 24h, so re-reading a fic with a new question costs no AO3 requests.
Good to know
AO3 has no API — this scrapes its (clean) HTML, one request at a time, throttled to one every 0.6s by default (tune with
--min-interval) and honoringRetry-After. AO3 is volunteer-run; the politeness is deliberate.Cloudflare: AO3 blocks plain HTTP clients. This uses
curl_cffiwith a mobile-Safari TLS fingerprint, which passes as of writing. If requests start failing with 403 +cf-mitigated: challenge, changeIMPERSONATEinao3.py.Privacy: fic text goes to Google's Gemini API for reading; nothing else leaves your machine, no telemetry.
Adult content: AO3 hosts works across all ratings. The server passes through whatever your search scopes — use the
ratingfilter and AO3's warning tags to control what gets fetched.
Make it yours
It's a small, single-purpose server — a few hundred readable lines with no framework magic. Fork it and edit anything: rewrite the reader's prompt, swap in a different model, change the throttle, add a tool. That's the intended way to use it.
Run it from source:
git clone https://github.com/ArturLys/ao3-mcp.git
cd ao3-mcp
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python smoke_test.py YOUR_GEMINI_KEY # end-to-end check: search → download → digest
python server.py --api-key YOUR_GEMINI_KEY # or point your client's command at thisCredits
AO3 access approach builds on ao3_api by wendytg.
All fanworks belong to their authors on the Archive of Our Own, a project of the Organization for Transformative Works.
License
MIT
Maintenance
Related MCP Servers
- Flicense-qualityFmaintenanceThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.57

CodeAlive MCPofficial
Alicense-qualityAmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.86MIT- Alicense-qualityFmaintenanceA Model Context Protocol server that manages character knowledge and relationships for creative writing projects, offering semantic search and AI-powered analysis.4MIT

ouro-mcpofficial
Alicense-qualityAmaintenanceMCP server for the Ouro platform, enabling AI agents to search, read, query datasets, create content, and execute API routes on Ouro through the Model Context Protocol.1MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Official remote MCP server for Archivist AI TTRPG campaign memory: characters, sessions, and more.
A Model Context Protocol server for Wix AI tools
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/ArturLys/ao3-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server