# Books & Papers MCP Server

Federates searches across scholarly databases and catalogs, generates formatted citations, and reads chapters. Useful for literature reviews directly inside your AI client.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 22
- Author: jmrplens
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jmrplens/libgen-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/books-papers-mcp-server

## What it does

The server is written in Go. It connects AI assistants to Library Genesis while querying external providers like arXiv or OpenAlex when needed. Mirror selection and failover happen automatically in the background.

Four tools handle document workflows. The `search` tool accepts publication year ranges, `get_details` outputs formatted citations in BibTeX or APA, and `download` fetches files. With `read`, an assistant navigates tables of contents and inspects chapters without pulling the whole file.

Local execution via `npx -y @jmrp.io/libgen-mcp` requires Node 18. Tool definitions take roughly 6,800 tokens of context. The public endpoint at `https://mcp.jmrp.io/libgen` works immediately, but local hosting is required to save retrieved files directly to disk.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcp.jmrp.io/libgen`
- Environment variables: `LIBGEN_MIRROR`, `LIBGEN_MCP_DOWNLOAD_DIR`, `LIBGEN_MCP_TIMEOUT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http libgen-mcp https://mcp.jmrp.io/libgen
```

2. **Platform CLI**
```bash
claude mcp add --env LIBGEN_MIRROR=<LIBGEN_MIRROR> --env LIBGEN_MCP_DOWNLOAD_DIR=<LIBGEN_MCP_DOWNLOAD_DIR> --env LIBGEN_MCP_TIMEOUT=<LIBGEN_MCP_TIMEOUT> --transport stdio books-papers-mcp-server -- npx -y @jmrp.io/libgen-mcp
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add books-papers-mcp-server --url https://mcp.jmrp.io/libgen
```

2. **Platform CLI**
```bash
codex mcp add books-papers-mcp-server --env LIBGEN_MIRROR=<LIBGEN_MIRROR> --env LIBGEN_MCP_DOWNLOAD_DIR=<LIBGEN_MCP_DOWNLOAD_DIR> --env LIBGEN_MCP_TIMEOUT=<LIBGEN_MCP_TIMEOUT> -- npx -y @jmrp.io/libgen-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "books-papers-mcp-server": {
            "url": "https://mcp.jmrp.io/libgen"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "books-papers-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@jmrp.io/libgen-mcp"
            ],
            "env": {
                "LIBGEN_MIRROR": "<LIBGEN_MIRROR>",
                "LIBGEN_MCP_DOWNLOAD_DIR": "<LIBGEN_MCP_DOWNLOAD_DIR>",
                "LIBGEN_MCP_TIMEOUT": "<LIBGEN_MCP_TIMEOUT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "books-papers-mcp-server": {
            "type": "http",
            "url": "https://mcp.jmrp.io/libgen"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "books-papers-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@jmrp.io/libgen-mcp"
            ],
            "env": {
                "LIBGEN_MIRROR": "<LIBGEN_MIRROR>",
                "LIBGEN_MCP_DOWNLOAD_DIR": "<LIBGEN_MCP_DOWNLOAD_DIR>",
                "LIBGEN_MCP_TIMEOUT": "<LIBGEN_MCP_TIMEOUT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http books-papers-mcp-server https://mcp.jmrp.io/libgen
```

2. **Platform CLI**
```bash
gemini mcp add -e LIBGEN_MIRROR=<LIBGEN_MIRROR> -e LIBGEN_MCP_DOWNLOAD_DIR=<LIBGEN_MCP_DOWNLOAD_DIR> -e LIBGEN_MCP_TIMEOUT=<LIBGEN_MCP_TIMEOUT> books-papers-mcp-server npx -y @jmrp.io/libgen-mcp
```
Replace <…> with your own values

## When to use it
- Search papers and preprints across arXiv, PubMed, and OpenAlex
- Generate formatted citations in BibTeX, APA, or IEEE styles
- Inspect book chapters and tables of contents without downloading files
- Retrieve papers and research literature directly by DOI

## Example prompts
- Find recent papers on quantum computing from 2022 to 2024 and format their citations in BibTeX.
- Read the introductory chapter of this document and summarize its thesis.
- Fetch the paper associated with DOI 10.1038/nature12373 and inspect its citations.

## Similar
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5548
- [arxiv-mcp-server](https://affpapa.org/en/nevibecode/mcp/arxiv-mcp-server.md) — MCP server · ★ 3231
- [PaperBanana](https://affpapa.org/en/nevibecode/mcp/paperbanana.md) — MCP server · ★ 2417
- [MATLAB MCP Server](https://affpapa.org/en/nevibecode/mcp/matlab-mcp-server.md) — MCP server · ★ 1716
- [Hex Research](https://affpapa.org/en/nevibecode/mcp/hex-research.md) — MCP server · ★ 583
- [DocsAgent — Zotero, Obsidian & Apple Notes MCP Server](https://affpapa.org/en/nevibecode/mcp/docsagent-zotero-obsidian-apple-notes-mcp-server.md) — MCP server · ★ 578

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
