# Crossref MCP — Academic DOI & Literature Metadata (`red.cars/crossref-mcp`) Actor

AI agent access to 120M+ academic papers, books, and conference proceedings via Crossref API. Search works, get detailed metadata, fetch references, and export BibTeX.

- **URL**: https://apify.com/red.cars/crossref-mcp.md
- **Developed by:** [AutomateLab](https://apify.com/red.cars) (community)
- **Categories:** MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Crossref MCP — Academic DOI & Literature Metadata

**Type:** Apify MCP Actor (JavaScript)\
**Purpose:** AI agent access to 120M+ academic papers, books, and conference proceedings via Crossref API\
**Stack:** Apify SDK, Node.js 20+, MCP protocol, standby mode

### Quick Start

```bash
cd ~/Projects/apify-actors/crossref-mcp
apify run          # Local development
apify push         # Deploy to Apify
```

### Key Files

- `src/main.js` — MCP handler entry point with `handleTool` export
- `.actor/actor.json` — Standby mode enabled (`usesStandbyMode: true`)
- `Dockerfile` — Node.js 24 runtime
- `package.json` — Dependencies (apify ^3.6.0)

### Architecture

- **Standby MCP** via `handleRequest` export
- **Readiness probe** at GET / (checks `x-apify-container-server-readiness-probe` header)
- **PPE (Pay-Per-Event) charging** for each tool invocation
- **ERROR\_RETRY** with exponential backoff (3 retries, 2s base delay)
- **Crossref API** at `https://api.crossref.org/works`

### Tools

| Tool | Description | PPE |
|------|-------------|-----|
| `searchWorks` | Search academic works by query, author, DOI, ISSN, date range | $0.03 |
| `getWorkDetails` | Get full metadata for a work by DOI (authors, abstract, funding) | $0.02 |
| `getReferences` | Get bibliography/reference list for a work by DOI | $0.04 |
| `exportBibTeX` | Export works as BibTeX, RIS, or JSON citation format | $0.01 |

### API Operations

#### searchWorks

Search for academic works by keyword, author, or filters.

```json
{
  "operation": "searchWorks",
  "parameters": {
    "query": "machine learning",
    "author": "Hinton",
    "type": "journal-article",
    "from_date": "2020-01-01",
    "max_results": 20
  }
}
```

**Returns:** Array of works with title, authors, DOI, publication date, journal, abstract, and citation counts.

#### getWorkDetails

Get full metadata for a specific work by DOI.

```json
{
  "operation": "getWorkDetails",
  "parameters": {
    "doi": "10.1038/nature12373",
    "include_references": true
  }
}
```

**Returns:** Complete metadata including authors with ORCIDs, abstract, funding info, license, references, and more.

#### getReferences

Get the reference list (bibliography) for a work.

```json
{
  "operation": "getReferences",
  "parameters": {
    "doi": "10.1038/nature12373",
    "max_references": 50
  }
}
```

**Returns:** Array of references with DOI, title, author, year, journal, pages.

#### exportBibTeX

Export one or more works as citation strings.

```json
{
  "operation": "exportBibTeX",
  "parameters": {
    "dois": ["10.1038/nature12373", "10.1126/science.1259856"],
    "format": "bibtex"
  }
}
```

**Returns:** Formatted citation string(s) in BibTeX, RIS, or JSON format.

### Input Schema

The actor accepts an `INPUT` JSON with `operation` and `parameters`:

```json
{
  "operation": "searchWorks",
  "parameters": {
    "query": "deep learning",
    "max_results": 10
  }
}
```

### PPE Pricing

This actor uses Apify's Pay-Per-Event pricing model. Each tool invocation incurs a small charge to cover Crossref API costs:

| Event | Charge |
|-------|--------|
| `searchWorks` | $0.03 |
| `getWorkDetails` | $0.02 |
| `getReferences` | $0.04 |
| `exportBibTeX` | $0.01 |

### Error Handling & Retry

The actor implements automatic retry with exponential backoff:

- **3 retries** on API failure
- **Base delay:** 2 seconds, doubling each retry (2s → 4s → 8s)
- **Rate limit handling:** Detects 429 responses, waits for Retry-After header

### Data Sources

- **Crossref API:** The official REST API for Crossref metadata
- **Coverage:** 120M+ works from 90,000+ publishers
- **Types:** Journal articles, books, conference proceedings, datasets, preprints, etc.

### MCP Protocol

This actor implements the Model Context Protocol (MCP) for AI agent integration:

- `initialize` — Returns server capabilities
- `tools/list` — Returns available tools and schemas
- `tools/call` — Executes a tool by name with parameters
- `handleRequest` — Legacy operation handler (operation + parameters)

### Deployed Actor

The actor runs at: `crossref-mcp.apify.actor`

### Rate Limits

The Crossref API has rate limits:

- **Polite pool:** 50 requests/second (with email)
- **Default:** 25 requests/second
- **Unauthenticated:** Heavily rate limited

The actor uses the polite pool (`mailto=apify@example.com`) and implements retry on 429 responses.

### Notes

- All dates are in ISO format (YYYY-MM-DD)
- DOIs are cleaned automatically (handles `https://doi.org/` prefixes)
- Abstracts are stripped of HTML tags
- BibTeX output escapes LaTeX special characters
- References are capped at 100 per request to avoid timeouts

# Actor input Schema

## `tool` (type: `string`):

MCP tool to call

## `params` (type: `object`):

Tool parameters as JSON object

## Actor input object example

```json
{
  "tool": "searchWorks",
  "params": {
    "query": "machine learning",
    "max_results": 10
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tool": "searchWorks",
    "params": {
        "query": "machine learning",
        "max_results": 10
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("red.cars/crossref-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "tool": "searchWorks",
    "params": {
        "query": "machine learning",
        "max_results": 10,
    },
}

# Run the Actor and wait for it to finish
run = client.actor("red.cars/crossref-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tool": "searchWorks",
  "params": {
    "query": "machine learning",
    "max_results": 10
  }
}' |
apify call red.cars/crossref-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=red.cars/crossref-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lzyBAEyVQahPgepmU/builds/96qyAxuIqxCdV6NhA/openapi.json
