Skip to main content
Glama
crossref-local

crossref-local

by scitex-ai

CrossRef Local (crossref-local)

Demo

# Search 167M papers locally — no API rate limits, ~22 ms full-text query
crossref-local search "epilepsy seizure prediction"

# Resolve a DOI to full record (title, abstract, citations, journal IF)
crossref-local search-by-doi 10.1038/nature11247

# Drive from MCP / Claude Code
crossref-local mcp serve

The image is a live capture against the local DB; the <details> block below has a 6m55s MCP-driven demo video.

Related MCP server: Crossref Academic MCP Server

Architecture

┌──────────────────────────┐    ┌──────────────────────────┐
│ CrossRef public dump     │    │ JCR / OpenAlex IF tables │
│ (~100 GB compressed)     │    │                          │
└──────────────┬───────────┘    └──────────────┬───────────┘
               │ dois2sqlite                   │
               ▼                               ▼
       ┌─────────────────┐               ┌──────────────┐
       │ crossref.db     │ ◀── joins ──▶ │ impact-factor│
       │ (SQLite + FTS5) │               │ table        │
       └────────┬────────┘               └──────────────┘
                │
                ▼
   ┌──────────────────────────────────┐
   │ crossref-local — Python / CLI / MCP │
   │   search · search-by-doi · cache    │
   │   stats · check-citations · relay   │
   └──────────────────────────────────┘

The DB lives entirely on disk; crossref-local is a thin facade over SQLite + FTS5 + a small impact-factor table. No network calls during queries; rebuild scripts under make fts-build-screen / citations-build-screen are the only producers of state.

PyPI version Documentation Tests Coverage Python License

Live demonstration of MCP server integration with Claude Code for epilepsy seizure prediction literature review:

  • Full-text search on title, abstracts, and keywords across 167M papers (22ms response)

📄 Full demo documentation | 📊 Generated diagrams

Built for the LLM era - features that matter for AI research assistants:

Feature

Benefit

📝 Abstracts

Full text for semantic understanding

📊 Impact Factor

Filter by journal quality

🔗 Citations

Prioritize influential papers

⚡ Speed

167M records in ms, no rate limits

Perfect for: RAG systems, research assistants, literature review automation.

pip install crossref-local

From source:

git clone https://github.com/ywatanabe1989/crossref-local
cd crossref-local && make install

Database setup (1.5 TB, ~2 weeks to build):

# 1. Download CrossRef data (~100GB compressed)
aria2c "https://academictorrents.com/details/..."

# 2. Build SQLite database (~days)
pip install dois2sqlite
dois2sqlite build /path/to/crossref-data ./data/crossref.db

# 3. Build FTS5 index (~60 hours) & citations table (~days)
make fts-build-screen
make citations-build-screen
from crossref_local import search, get, count

# Full-text search (22ms for 541 matches across 167M records)
results = search("hippocampal sharp wave ripples")
for work in results:
    print(f"{work.title} ({work.year})")

# Get by DOI
work = get("10.1126/science.aax0758")
print(work.citation())

# Count matches
n = count("machine learning")  # 477,922 matches

Async API:

from crossref_local import aio

async def main():
    counts = await aio.count_many(["CRISPR", "neural network", "climate"])
    results = await aio.search("machine learning")
crossref-local search "CRISPR genome editing" -n 5
crossref-local search-by-doi 10.1038/nature12373
crossref-local status  # Configuration and database stats

With abstracts (-a flag):

$ crossref-local search "RS-1 enhances CRISPR" -n 1 -a

Found 4 matches in 128.4ms

1. RS-1 enhances CRISPR/Cas9- and TALEN-mediated knock-in efficiency (2016)
   DOI: 10.1038/ncomms10548
   Journal: Nature Communications
   Abstract: Zinc-finger nuclease, transcription activator-like effector nuclease
   and CRISPR/Cas9 are becoming major tools for genome editing...

Start the FastAPI server:

crossref-local relay --host 0.0.0.0 --port 31291

Endpoints:

# Search works (FTS5)
curl "http://localhost:31291/works?q=CRISPR&limit=10"

# Get by DOI
curl "http://localhost:31291/works/10.1038/nature12373"

# Batch DOI lookup
curl -X POST "http://localhost:31291/works/batch" \
  -H "Content-Type: application/json" \
  -d '{"dois": ["10.1038/nature12373", "10.1126/science.aax0758"]}'

# Citation endpoints
curl "http://localhost:31291/citations/10.1038/nature12373/citing"
curl "http://localhost:31291/citations/10.1038/nature12373/cited"
curl "http://localhost:31291/citations/10.1038/nature12373/count"

# Collection endpoints
curl "http://localhost:31291/collections"
curl -X POST "http://localhost:31291/collections" \
  -H "Content-Type: application/json" \
  -d '{"name": "my_papers", "query": "CRISPR", "limit": 100}'
curl "http://localhost:31291/collections/my_papers/download?format=bibtex"

# Database info
curl "http://localhost:31291/info"

HTTP mode (connect to running server):

# On local machine (if server is remote)
ssh -L 31291:127.0.0.1:31291 your-server

# Python client
from crossref_local import configure_http
configure_http("http://localhost:31291")

# Or via CLI
crossref-local --http search "CRISPR"

Run as MCP (Model Context Protocol) server:

crossref-local mcp start

Local MCP client configuration:

{
  "mcpServers": {
    "crossref-local": {
      "command": "crossref-local",
      "args": ["mcp", "start"],
      "env": {
        "CROSSREF_LOCAL_DB": "/path/to/crossref.db"
      }
    }
  }
}

Remote MCP via HTTP (recommended):

# On server: start persistent MCP server
crossref-local mcp start -t http --host 0.0.0.0 --port 8082
{
  "mcpServers": {
    "crossref-remote": {
      "url": "http://your-server:8082/mcp"
    }
  }
}

Diagnose setup:

crossref-local mcp doctor        # Check dependencies and database
crossref-local mcp list-tools    # Show available MCP tools
crossref-local mcp installation  # Show client config examples

See docs/remote-deployment.md for systemd and Docker setup.

Available tools:

  • search - Full-text search across 167M+ papers

  • search_by_doi - Get paper by DOI

  • enrich_dois - Add citation counts and references to DOIs

  • status - Database statistics

  • cache_* - Paper collection management

from crossref_local.impact_factor import ImpactFactorCalculator

with ImpactFactorCalculator() as calc:
    result = calc.calculate_impact_factor("Nature", target_year=2023)
    print(f"IF: {result['impact_factor']:.3f}")  # 54.067

Journal

IF 2023

Nature

54.07

Science

46.17

Cell

54.01

PLOS ONE

3.37

from crossref_local import get_citing, get_cited, CitationNetwork

citing = get_citing("10.1038/nature12373")  # 1539 papers
cited = get_cited("10.1038/nature12373")

# Build visualization (like Connected Papers)
network = CitationNetwork("10.1038/nature12373", depth=2)
network.save_html("citation_network.html")  # requires: pip install crossref-local[viz]

Query

Matches

Time

hippocampal sharp wave ripples

541

22ms

machine learning

477,922

113ms

CRISPR genome editing

12,170

257ms

Searching 167M records in milliseconds via FTS5.

openalex-local - Sister project with OpenAlex data:

Feature

crossref-local

openalex-local

Works

167M

284M

Abstracts

~21%

~45-60%

Update frequency

Real-time

Monthly

DOI authority

✓ (source)

Uses CrossRef

Citations

Raw references

Linked works

Concepts/Topics

❌

✓

Author IDs

❌

✓

Best for

DOI lookup, raw refs

Semantic search

When to use CrossRef: Real-time DOI updates, raw reference parsing, authoritative metadata. When to use OpenAlex: Semantic search, citation analysis, topic discovery.

Installation

pip install crossref-local              # core
pip install crossref-local[mcp]         # + MCP server

From source:

git clone https://github.com/ywatanabe1989/crossref-local
cd crossref-local && make install

4 Interfaces

from crossref_local import search, get, count

# Full-text search (22ms for 541 matches across 167M records)
results = search("hippocampal sharp wave ripples")
for work in results:
    print(f"{work.title} ({work.year})")

# Get by DOI
work = get("10.1126/science.aax0758")
print(work.citation())

# Count matches
n = count("machine learning")  # 477,922 matches
crossref-local search "CRISPR genome editing" -n 5
crossref-local search-by-doi 10.1038/nature12373
crossref-local status  # Configuration and database stats

See the HTTP API section above for all endpoints.

See the MCP Server section above for configuration.

Part of SciTeX

crossref-local is part of SciTeX.

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.

  2. The freedom to study how every step works — from raw data to final manuscript.

  3. The freedom to redistribute your workflows, not just your papers.

  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.


Available Tools

17 tools
cache_citation_summaryA

Get citation statistics for cached papers.

Returns mean, median, max citations and counts of highly cited papers.

Inputs: name (required). Returns: result

cache_createA

Create a paper cache from search query.

Fetches full metadata for papers matching query and saves to disk cache. Use this to build a reusable paper collection for a research topic.

Inputs: name (required), query (required), limit. Returns: result

cache_exportC

Export cache to file.

Inputs: name (required), output_path (required), fields, format. Returns: result

cache_listA

List all available caches.

Returns: JSON array of cache info (name, path, paper_count, size)

Inputs: no named parameters. Returns: result

cache_plot_networkB

Generate citation network visualization.

Creates interactive HTML graph showing citation relationships.

Inputs: name (required), output (required), max_nodes. Returns: result

cache_plot_scatterA

Generate year vs citations scatter plot.

Saves plot to file and returns top cited papers.

Inputs: name (required), output (required), top_n. Returns: result

cache_queryA

Query cached papers with field filtering.

Returns minimal data to reduce context usage. Specify only fields needed.

Inputs: name (required), limit, fields, journal, +5 more. Returns: result

cache_statsB

Get cache statistics.

Returns year distribution, top journals, citation stats without loading full data.

Inputs: name (required). Returns: result

cache_top_citedB

Get top cited papers from cache.

Inputs: name (required), n, year_max, year_min. Returns: result

check_bibtexA

Check all citations in a BibTeX file against the local database.

Inputs: file_path (required), validate_metadata, suggest_enrichment. Returns: result

check_citationsA

Check citations against the local CrossRef database.

Validates whether DOIs exist in the database and checks metadata completeness.

Inputs: identifiers (required), validate_metadata, suggest_enrichment. Returns: result

crossref_local_skills_getA

Fetch the full Markdown content of one crossref-local skill page.

Inputs: name (required). Returns: result

crossref_local_skills_listA

List the names of every skill page shipped by crossref-local.

Returns

JSON string with `{"success": true, "package": "crossref-local",
"skills": ["01_configuration", ...]}`.

Inputs: no named parameters. Returns: result

enrich_doisA

Enrich DOIs with full metadata including citation counts and references.

Use this after search() to get detailed metadata for papers. The search() tool returns basic info (title, authors, year, journal). This tool adds: citation_count, references, volume, issue, publisher, etc.

Typical workflow:

  1. search("epilepsy seizure prediction") -> get DOIs

  2. enrich_dois([doi1, doi2, ...]) -> get full metadata

Inputs: dois (required). Returns: result

get_statusA

Report local CrossRef database status — path, work count (~167M), FTS5 index size, citation-graph edge count, and access mode (DB vs HTTP). Use when the user asks "is the CrossRef db ready?", "how many papers do I have?", "check crossref-local status", or before running a search to confirm the db is usable.

Returns: JSON string with database path, work count, FTS index count, and citation count.

Inputs: no named parameters. Returns: result

search_by_doiB

Get detailed information about a work by DOI.

Inputs: doi (required), save_path, as_citation, save_format. Returns: result

search_worksA

Search for academic works by title, abstract, or authors.

Uses FTS5 full-text search index for fast searching across 167M+ papers. Supports FTS5 query syntax: AND, OR, NOT, "exact phrases".

Inputs: query (required), limit, offset, save_path, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have distinct purposes (search, DOI lookup, cache management, visualization, status). However, cache_stats and cache_citation_summary overlap in providing citation statistics, and search_by_doi and enrich_dois both fetch metadata by DOI, which could confuse an agent.

    Naming Consistency4/5

    The naming generally follows a verb_noun pattern with clear prefixes like cache_, search_, check_, and enrich_. Minor inconsistencies exist, such as get_status vs. cache_* verbs and the crossref_local_skills_* prefix, but overall the pattern is predictable.

    Tool Count4/5

    17 tools is on the heavier side but appropriate for the scope: searching, enriching, caching, citation checking, visualization, and skill navigation. Each tool has a specific role, and the count is not excessive given the domain.

    Completeness4/5

    The tool surface covers core workflows: search, metadata enrichment, DOI validation, BibTeX checking, cache creation/querying/export/visualization, and status. Minor gaps exist, such as no cache deletion or cache update tool, but these are not critical for the primary use case.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Comprehensive MCP server for academic research workflows, enabling paper searching across multiple sources, manuscript processing with citation placeholders, search caching, and citation export.
      11
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A local-first MCP server that analyzes research papers, maps citation graphs, and surfaces insights with verbatim-verified contradictions, all while keeping data private on your machine.
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      An MCP server for academic literature research that integrates Scopus, CrossRef, OpenAlex, and Unpaywall to search documents, get abstracts, author profiles, citing papers, and open-access PDF links.
      9
      MIT