annas-mcp Anna's Archive MCP server and command-line tool
Search Anna's Archive for books and papers by title, author or DOI and download the copy you pick. Run annas-cli in your terminal or connect annas-mcp to Claude, Cursor, Codex and other AI clients.
What it does
| Tool | What it does |
|---|---|
book_search | Finds books, textbooks, manuals and standards by title, author or topic, filtered by format, language, source or year |
article_search | Finds journal articles by keyword, author or year, or looks one up by DOI |
metadata_search | Searches library catalogs such as Open Library, WorldCat and ISBNdb for editions and ISBNs |
book_details | Shows a result's ISBNs and other identifiers, edition, description and reported file problems |
account_status | Shows your membership and how many fast downloads are left |
book_download | Downloads a book using the hash from a search result |
article_download | Downloads an article by DOI or hash |
Downloads are checked against the archive's MD5 hash. The server signs in with your membership's secret key and renews the session by itself, so you never copy cookies from a browser.
Setup
You need Node.js 18 or newer and an Anna's Archive membership: Lucky Librarian or higher to search, any tier to download. Copy your secret key from your account page.
CLI setup
npm install -g annas-mcp
export ANNAS_SECRET_KEY="your-secret-key"
annas-cli --help
annas-cli book-search "pride and prejudice" --format epubIn PowerShell, set the key with $env:ANNAS_SECRET_KEY="your-secret-key". Installation adds both commands automatically: annas-cli shows help with no arguments, while annas-mcp starts MCP. Both support the same operations and settings. No MCP client is needed for the CLI.
For one-off commands, use npx -y --package=annas-mcp annas-cli followed by the command and its options. See the README for configuration and all CLI commands.
MCP setup
To use the tools from an AI client, add the server using the instructions for your client below.
Claude Code
claude mcp add annas-mcp \
--env ANNAS_SECRET_KEY=your-secret-key \
-- npx -y annas-mcpClaude Desktop
Download annas-mcp.mcpb and open it. Claude Desktop asks for your secret key.
Cursor, or Claude Desktop by hand
{
"mcpServers": {
"annas-mcp": {
"command": "npx",
"args": ["-y", "annas-mcp"],
"env": {
"ANNAS_SECRET_KEY": "your-secret-key"
}
}
}
}Codex
[mcp_servers.annas-mcp]
command = "npx"
args = ["-y", "annas-mcp"]
[mcp_servers.annas-mcp.env]
ANNAS_SECRET_KEY = "your-secret-key"Then ask something like "Find the EPUB of Pride and Prejudice and download it." Files are saved to an annas-archive folder in your home folder; set ANNAS_DOWNLOAD_PATH to use another one. Docker, the command line and every option are in the README.
Use it from Go
The public Go SDK provides the same search, metadata, account and verified-download operations as the MCP server and CLI. It requires Go 1.26 or newer and shares the project's release versions.
go get github.com/SokolskyNikita/annas-mcp/anna@v0.7.0See the SDK guide and examples for explicit configuration, timeouts, error handling and concurrent use.
Coming from iosifache/annas-mcp?
It keeps the same four tools, adds three more, and reads the same ANNAS_SECRET_KEY, ANNAS_DOWNLOAD_PATH and ANNAS_BASE_URL variables. Replace the path to the old binary with npx -y annas-mcp. Searches then run as your signed-in member account, so they aren't turned away with 403. What changes.