Metadata-Version: 2.4
Name: retrieval-mcp
Version: 0.1.2
Summary: Installable MCP server for the Retrieval academic-paper search + ACE journal + index inventory API
Project-URL: Homepage, https://retrieval.rnarket.com
License: MIT
Keywords: llm,mcp,model-context-protocol,papers,retrieval,search
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2.0
Description-Content-Type: text/markdown

# retrieval-mcp

An **MCP server** for the Retrieval academic-paper API — semantic paper search,
document matching, ACE journal memory, and index inventory. Self-contained: it talks
to the backend over HTTP only (just `mcp` + `httpx`), so it installs anywhere with
`uvx` / `pip` — no repo checkout, no GPU, no models.

By default it targets the compute box on the lab LAN (`http://10.100.100.111:8000`),
which trusts LAN callers so **no key is needed**. Off-LAN, point `RETRIEVAL_API_URL` at
the public gateway (`https://retrieval.rnarket.com`) and set `RETRIEVAL_API_KEY` (`sk-...`).

## Tools

| Tool | What it does |
|------|--------------|
| `search_papers` | Semantic hybrid search over 95k+ top-venue CS papers |
| `search_within_paper` | Every matching passage inside one paper |
| `match_document` / `match_paper` | Content-nearest papers to a passage / a paper |
| `list_conferences` / `corpus_stats` | Venue registry / corpus size |
| `journal_record` / `journal_search` / `journal_recent` | ACE journal work-memory (cwd-scoped) |
| `index_inventory` | Your indexed-file tree: user → host → project → dir → file |

## Install

### Claude Code

```bash
# LAN (no key):
claude mcp add retrieval -- uvx retrieval-mcp
# Off-LAN (public gateway + key):
claude mcp add retrieval \
  --env RETRIEVAL_API_URL=https://retrieval.rnarket.com \
  --env RETRIEVAL_API_KEY=sk-... \
  -- uvx retrieval-mcp
```

### Claude Desktop / any MCP client

`claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`,
Windows: `%APPDATA%\Claude\`):

```json
{
  "mcpServers": {
    "retrieval": {
      "command": "uvx",
      "args": ["retrieval-mcp"],
      "env": {
        "RETRIEVAL_API_URL": "https://retrieval.rnarket.com",
        "RETRIEVAL_API_KEY": "sk-...",
        "JOURNAL_PROJECT_SLUG": "my-project"
      }
    }
  }
}
```

No `uv`? `pip install retrieval-mcp` then use `"command": "retrieval-mcp"`.

## Config (env)

| Var | Default | Notes |
|-----|---------|-------|
| `RETRIEVAL_API_URL` | `http://10.100.100.111:8000` | LAN compute box (no key). Off-LAN, set to `https://retrieval.rnarket.com`. |
| `RETRIEVAL_API_KEY` | — | `sk-...` key for the gateway (create under `/auth/keys`). Required off-LAN. |
| `JOURNAL_PROJECT_SLUG` | current dir name | Journal namespace; scopes journal reads/writes so projects don't leak into each other. |

## License

MIT
