Content
# Tool List
## Licensed Academic Archive Gateway (Stealth MCP)
Designed for local MCP plugins for AI assistants (Codex, Claude Desktop, etc.) to retrieve and download e-books.
## One-Click Installation
**Prerequisites:** Python 3.12+ and a free Z-Library account are required.
1. Place the entire folder in a fixed location (not in a temporary directory).
2. On macOS, double-click `一键安装.command`; on Windows, double-click `一键安装.bat`.
3. Enter your Z-Library email and password as prompted.
4. The script will automatically create a virtual environment, install dependencies, and configure Codex.
Open Codex after completion to use it.
## Manual Configuration
If you don't use the one-click installation script, follow these steps:
### 1. Create a Virtual Environment
```bash
cd academic-archive-gateway
python3.12 -m venv venv
venv/bin/pip install fastmcp httpx playwright beautifulsoup4 pydantic python-dotenv
venv/bin/playwright install chromium
```
### 2. Configure MCP
**Codex CLI** — Edit `~/.codex/config.toml`:
```toml
[mcp_servers.academic-gateway]
command = "/your/path/academic-archive-gateway/venv/bin/python3"
args = ["/your/path/academic-archive-gateway/stealth_mcp.py"]
[mcp_servers.academic-gateway.env]
ARCHIVE_USER = "your email"
ARCHIVE_TOKEN = "your password"
ANNAS_BASE_URL = "https://annas-archive.gl"
```
**Codex GUI** — Fill in the custom MCP configuration interface:
| Field | Content |
|---|---|
| Name | `academic-gateway` |
| Protocol | STDIO |
| Startup Command | `/your/path/academic-archive-gateway/venv/bin/python3` |
| Arguments | `/your/path/academic-archive-gateway/stealth_mcp.py` |
| Environment Variable ARCHIVE_USER | Your Z-Library email |
| Environment Variable ARCHIVE_TOKEN | Your Z-Library password |
| Environment Variable ANNAS_BASE_URL | `https://annas-archive.gl` |
**QoderWork** — Edit `~/.qoderworkcn/mcp.json`:
```json
{
"mcpServers": {
"academic-gateway": {
"command": "/your/path/academic-archive-gateway/venv/bin/python3",
"args": ["/your/path/academic-archive-gateway/stealth_mcp.py"],
"env": {
"ARCHIVE_USER": "your email",
"ARCHIVE_TOKEN": "your password",
"ANNAS_BASE_URL": "https://annas-archive.gl"
},
"enabled": true
}
}
}
```
## Usage
Tell AI:
> "Use the Academic Archive Gateway to help me search for 'Evicted'"
AI will automatically search and download the book to the desktop `Archival_Documents` folder.
## Available Tools
- `search_academic_literature` — Search for books (returns title, author, format, size, download_path)
- `fetch_archival_document` — Download books (pass archival_id and download_path)
- `search_annas_archive` — Backup search (Anna's Archive)
- `fetch_annas_document` — Backup download
## Notes
- Z-Library free accounts have a daily limit of 10 downloads
- The download path is fixed to `~/Desktop/Archival_Documents/`
- **Proxy**: The installation script will ask if a proxy is needed. You can also manually set it through the `PROXY_URL` environment variable (e.g., `http://127.0.0.1:7890`). If not set, it will connect directly.
- **Browser Path**: Automatically detected by default. Only on macOS ARM64, if you encounter the "process killed" issue, you need to manually specify the full Chrome path through the `CHROMIUM_PATH` environment variable.
- Anna's Archive mirror URL can be switched through the `ANNAS_BASE_URL` environment variable.