paper-mcp
# š paper-mcp
An MCP server built with **FastMCP** for paper, citation, author, and bibliography search.
Run it in one command with **uvx** ā no manual install needed.
---
## ⨠Features
### Paper tools
| Tool | Returns |
|------|---------|
| `paper_get_metadata` | Title, authors, abstract, DOI, arXiv ID, citation count, TL;DR, OA status, fields of study |
| `paper_get_pdf` | Best open-access PDF URL |
| `paper_get_fulltext` | Full text plus structured pages, sections, and extracted tables |
| `paper_get_citations` | Up to 100 papers that cite this one |
| `paper_get_references` | Up to 100 papers this one cites |
| `paper_search` | Filtered, deduplicated search across S2, OpenAlex, PubMed, and DBLP |
| `paper_get_publication_status` | Venue, publisher, version of record, and preprint status |
| `paper_get_bibtex` | BibTeX citation from Semantic Scholar or Crossref |
| `paper_get_similar` | Related-paper recommendations |
| `paper_batch_lookup` | Up to 500 paper IDs in one Semantic Scholar request |
| `doi_get_metadata` | DOI metadata merged from Crossref, Semantic Scholar, and Unpaywall |
### Author and source tools
| Tool | Returns |
|------|---------|
| `author_search` | Disambiguated Semantic Scholar author matches |
| `author_get_profile` | h-index, affiliations, paper and citation counts |
| `author_get_papers` | A researcher's bibliography |
| `openalex_search` | Broad OpenAlex work search with institutions and topics |
| `pubmed_search` | PubMed biomedical article summaries |
| `dblp_search` | Curated DBLP computer-science bibliography results |
`paper_search` accepts `sources`, year range, venue, author, publication type,
minimum citations, open-access-only, and relevance/year/citation sorting.
Full text uses **arXiv HTML ā structured open-access PDF extraction ā Lightpanda ā abstract**.
Responses from repeated Semantic Scholar searches and batch lookups are cached in memory.
---
## š Quick Start
### Run without installing (uvx)
```bash
# stdio mode ā for Claude Desktop / most MCP clients
uvx paper-mcp
# SSE mode ā for remote or multi-client setups
uvx paper-mcp --transport sse --port 8000
```
> `uvx` downloads, installs (in an isolated env), and runs the package ā zero setup.
### Install permanently
```bash
uv tool install paper-mcp
paper-mcp # now available globally
paper-mcp --transport sse
```
### Local development
```bash
git clone https://github.com/imnotdev25/paper-search
cd paper-search
uv sync # install all deps from pyproject.toml
uv run paper-mcp # run directly
uv run paper-mcp --transport sse
```
---
## š„ Claude Desktop Config
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"papers": {
"command": "uvx",
"args": ["paper-mcp"]
}
}
}
```
No Python paths, no venv activation ā `uvx` handles everything.
---
## š Browser Fallback (gomcp / Lightpanda)
For JS-rendered publisher pages, the server automatically starts a
[Lightpanda](https://lightpanda.io) headless browser via
[gomcp](https://github.com/lightpanda-io/gomcp).
**One-time setup:**
```bash
# Download gomcp binary from GitHub releases:
# https://github.com/lightpanda-io/gomcp/releases
# Then download the Lightpanda browser binary:
gomcp download
```
If `gomcp` is not installed, the server still works ā browser-dependent
paths fall back to abstract/metadata gracefully.
---
## š Architecture
```
Claude (LLM)
ā MCP (stdio or SSE)
ā¼
paper-mcp [FastMCP, Python]
ā
āāā Semantic Scholar API āā metadata, citations, references
āāā arXiv API + HTML āā preprint info + full text
āāā Crossref + Unpaywall āā DOI metadata, BibTeX, OA PDFs
āāā OpenAlex / PubMed / DBLP āā corpus-specific search
āāā gomcp SSE āāāāāāāāāāāāā Lightpanda browser (JS fallback)
ā CDP
āāā Lightpanda Browser (headless)
```
---
## š¦ Publishing to PyPI
```bash
# Build
uv build
# Publish (needs PyPI token)
uv publish --token $PYPI_TOKEN
```
Once on PyPI, anyone can run it with `uvx paper-mcp`.
---
## āļø CLI Options
```
usage: paper-mcp [-h] [--transport {stdio,sse}] [--port PORT] [--host HOST]
options:
--transport stdio (default) or sse
--port SSE port (default: 8000)
--host SSE host (default: 127.0.0.1)
```
---
## š Notes
- Set `S2_API_KEY` for authenticated Semantic Scholar requests.
- Set `UNPAYWALL_EMAIL` to a real contact address to enable Unpaywall. Requests are
skipped when it is unset; no placeholder identity is sent.
- Optionally set `OPENALEX_EMAIL` for the OpenAlex polite pool.
- `PAPER_CACHE_TTL` controls the in-memory cache in seconds (default `3600`; `0` disables it).
- PDF extraction is limited to open PDFs up to 25 MB and 50,000 extracted characters.
Paywalled PDFs still require institutional access.
---
## š Project Structure
```
paper-mcp/
āāā pyproject.toml ā packaging, entry point, deps
āāā README.md
āāā src/
āāā paper_mcp/
āāā __init__.py
āāā server.py ā FastMCP tools + main()
āāā tests/
āāā test_server.py ā focused HTTP, PDF, cache, and config tests
```
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: metadata by DOI, metadata by title, forward citations, full text, PDF URL, and backward citations. The slight overlap between doi_get_metadata and paper_get_metadata is clarified by their different inputs (DOI vs title).
Tool names are somewhat inconsistent: most use 'paper_get_' prefix, but one uses 'doi_get_' instead. While all are readable, the mix of prefixes and the inversion in 'doi_get_metadata' compared to 'paper_get_metadata' breaks the otherwise verb_noun pattern.
With 6 tools, the server is well-scoped for its purpose. Each tool provides a distinct function without unnecessary bloat, and the count is within the ideal 3-15 range.
The tool set covers key operations for a paper metadata server: metadata retrieval (by title and DOI), full text, PDF URL, citations, and references. Minor gaps like search by author or keyword are absent, but the core workflow is supported.