Metadata-Version: 2.5
Name: priorwork-mcp
Version: 0.5.0
Summary: MCP server for priorwork.fyi — academic ML paper search for Claude Code and Cursor
Project-URL: Homepage, https://priorwork.fyi
Project-URL: Repository, https://github.com/stefanmagureanu/Steference-review
License: MIT
Keywords: academic-search,machine-learning,mcp,model-context-protocol,papers,semantic-search
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24.0
Requires-Dist: mcp>=2.1.0
Description-Content-Type: text/markdown

# priorwork-mcp

MCP server for [priorwork.fyi](https://priorwork.fyi) — semantic search over 114,000+ papers
from major ML, NLP, and Computer Vision conferences (NeurIPS, CVPR, ICML, ICLR, ACL, EMNLP,
ICCV, AISTATS, and more), directly from Claude Code, Cursor, or any MCP client.

## Tools

| Tool | Description |
|---|---|
| `search_papers` | Semantic search from a text query (a short descriptive sentence or two works slightly better than a few keywords) — returns ranked papers with authors, venue, year, similarity score, download URL, and full abstract. Pass `summarize=true` to add a structured per-paper LLM summary (problem, core insight, method, key results, positioning) |
| `search_by_pdf_url` | Give it a public PDF link (e.g. an arXiv PDF) and get semantically similar papers from the index |
| `search_research_topics` | A different corpus: open research problems mined from the limitations authors state in their own papers. Describe what you want to work on as prose — keywords match nothing, since each problem is stored as a synthetic abstract |
| `list_indexes` | List the available paper indexes and their sizes |

## Setup

### Claude Code

```bash
claude mcp add priorwork -- uvx priorwork-mcp
```

### Cursor / other MCP clients

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "priorwork": {
      "command": "uvx",
      "args": ["priorwork-mcp"]
    }
  }
}
```

## Caching

The topics artifact is ~4.6 MB and changes only when the pipeline runs, so it is
cached at `~/.cache/priorwork-mcp/topics.json` rather than fetched per search.
Set `PRIORWORK_CACHE_DIR` to move it.

Every search response names the published set it came from, so knowing when to
refetch is one string comparison. That covers the change a client cannot infer
for itself: a run that rewrites every title leaves every key intact, since a key
derives from a topic's supporting papers rather than its text.

A refetch that fails leaves the cached copy in place — stale topics beat no
topics, and the id will still not match on the next search, so it retries then.
An unwritable cache directory or a corrupt cache file costs a fetch, not an
error.

## Configuration

Configuration is via environment variables (pass with `-e KEY=value` in `claude mcp add`,
or an `"env"` block in JSON configs):

| Variable | Required | Description |
|---|---|---|
| `PRIORWORK_API_KEY` | No | Your own API key from priorwork.fyi. Defaults to the shared public free-tier key (rate-limited across all default installs) |
| `PRIORWORK_API_URL` | No | Override the API base URL (default `https://priorwork.fyi`) |

## Example

> "Find prior work on spatiotemporal forecasting with graph neural networks"

```
1. Taming Local Effects in Graph-based Spatiotemporal Forecasting — Andrea Cini, et al. (2023 · NeurIPS)  [score: 0.802]
2. FourierGNN: Rethinking Multivariate Time Series Forecasting from a Pure Graph Perspective — ...
```

Or, for open problems rather than published work:

> "We want to apply interpretability methods to models served only behind closed
> APIs, where activations and full logits are unavailable."

```
1. A Framework for Deploying Activation- and Logit-Based Methods Against Closed-Source LLM APIs
   Relevance: 0.554   Area: Model Safety, Alignment & Jailbreaks   Evidence: 177 papers
   Why it matters: A very large body of techniques — safety defenses, interpretability
   probes, evaluation metrics — requires hidden states, attention maps, or token-level
   probabilities, and is therefore silently restricted to open-weight models. ...
```

Describe the problem in a sentence or two. Keywords return nothing: each topic is
stored as a synthetic abstract, so `efficient transformers edge devices` matches
nothing while a prose description of the same intent matches well.

## License

MIT
