Unpaywall MCP Server

Unpaywall MCP Server

Enables AI clients to search for academic papers, fetch metadata by DOI, retrieve open access PDF links, and extract full text from research papers using the Unpaywall API. Provides seamless access to scholarly literature for research and analysis tasks.

Category
访问服务器

README

Unpaywall MCP Server

npm version CI license node >=18

An MCP (Model Context Protocol) server exposing Unpaywall tools so AI clients can:

  • Fetch metadata by DOI
  • Search article titles
  • Retrieve best OA fulltext links
  • Download and extract text from OA PDFs

Quickstart (npx)

Add this to your MCP client config (Claude Desktop example):

{
  "mcpServers": {
    "unpaywall": {
      "command": "npx",
      "args": ["-y", "unpaywall-mcp"],
      "env": { "UNPAYWALL_EMAIL": "you@example.com" }
    }
  }
}

Then try the tools: unpaywall_search_titles, unpaywall_get_fulltext_links, unpaywall_fetch_pdf_text.

Requirements

  • Node.js 18+
  • An email address for Unpaywall requests (they require it for polite usage).

Setup

# Install deps
npm install

# Build
npm run build

# Run (stdio transport, as required by MCP clients)
UNPAYWALL_EMAIL=you@example.com npm start

For development with hot-run (no build step):

UNPAYWALL_EMAIL=you@example.com npm run dev

Tools

unpaywall_get_by_doi

  • Description: Fetch Unpaywall metadata for a DOI
  • Input schema:
    • doi (string, required): e.g. 10.1038/nphys1170
    • email (string, optional): overrides UNPAYWALL_EMAIL if provided
  • Output: JSON response from Unpaywall

unpaywall_search_titles

  • Description: Search Unpaywall for article titles matching a query (50 results/page)
  • Input schema:
    • query (string, required): title query
    • is_oa (boolean, optional): if true, only OA results; if false, only closed; omit for all
    • page (integer >= 1, optional): page number
    • email (string, optional): overrides UNPAYWALL_EMAIL
  • Output: JSON search results from GET https://api.unpaywall.org/v2/search

unpaywall_get_fulltext_links

  • Description: Return the best OA PDF URL and Open URL for a DOI, plus all OA locations
  • Input schema:
    • doi (string, required)
    • email (string, optional): overrides UNPAYWALL_EMAIL
  • Output: JSON with fields: best_pdf_url, best_open_url, best_oa_location, oa_locations, and select metadata

unpaywall_fetch_pdf_text

  • Description: Download and extract text from the best OA PDF for a DOI, or from a provided pdf_url
  • Input schema:
    • pdf_url (string, optional): direct PDF URL (takes precedence)
    • doi (string, optional): used to resolve best OA PDF if pdf_url not provided
    • email (string, optional): required if using doi and no UNPAYWALL_EMAIL env var
    • truncate_chars (integer >= 1000, optional): max characters of extracted text to return (default 20000)
  • Output: JSON with text (possibly truncated), length_chars, truncated, pdf_url, and PDF metadata

LLM prompting tips (MCP)

When using this server from an MCP-enabled LLM client, ask the model to:

  • Search then fetch: Use unpaywall_search_titles with a concise title phrase; select a result; then call unpaywall_get_fulltext_links or unpaywall_fetch_pdf_text on the chosen DOI.
  • Prefer OA: Pass is_oa: true in searches when you only want open-access.
  • Control size: Set truncate_chars in unpaywall_fetch_pdf_text (default 20000) and summarize long texts before proceeding.
  • Be resilient: If the best PDF URL is missing, fall back to best_open_url and extract content from the landing page (outside this server).
  • Respect rate limits: Space requests if making many calls; reuse earlier responses instead of repeating the same call.

Good user instructions to the LLM:

  • "Find 3 OA papers about 'foundation models in biomedicine', then extract and summarize the introduction of the best one."
  • "Search for 'Graph Neural Networks survey 2024', filter to OA if possible, then fetch the PDF text and produce a 10-bullet summary."

Example tool call payloads

Depending on your MCP client, the structure differs; the core payloads are:

// Search titles
{
  "name": "unpaywall_search_titles",
  "arguments": {
    "query": "graph neural networks survey",
    "is_oa": true,
    "page": 1
  }
}
// Get best OA links for a DOI
{
  "name": "unpaywall_get_fulltext_links",
  "arguments": {
    "doi": "10.48550/arXiv.1812.08434"
  }
}
// Fetch and extract PDF text (by DOI)
{
  "name": "unpaywall_fetch_pdf_text",
  "arguments": {
    "doi": "10.48550/arXiv.1812.08434",
    "truncate_chars": 20000
  }
}

Configure in an MCP client

Recommended (no-build) config for Claude Desktop using npm/npx:

{
  "mcpServers": {
    "unpaywall": {
      "command": "npx",
      "args": ["-y", "unpaywall-mcp"],
      "env": {
        "UNPAYWALL_EMAIL": "you@example.com"
      }
    }
  }
}

Alternative (local repo) config using the compiled dist:

{
  "mcpServers": {
    "unpaywall": {
      "command": "node",
      "args": ["/absolute/path/to/dist/index.js"],
      "env": {
        "UNPAYWALL_EMAIL": "you@example.com"
      }
    }
  }
}

After adding, ask your client to list tools and try:

  • unpaywall_search_titles with a query
  • unpaywall_get_fulltext_links with a doi
  • unpaywall_fetch_pdf_text with a doi (or pdf_url)

Notes

  • Respect Unpaywall's rate limits and usage guidelines: https://unpaywall.org/products/api
  • The server uses stdio transport and @modelcontextprotocol/sdk.
  • Set UNPAYWALL_EMAIL or pass email per call so Unpaywall can contact you about usage.

Maintainers: publish to npm

# 1) Build the project (also runs automatically on publish)
npm run build

# 2) Bump version (choose patch/minor/major)
npm version patch

# 3) Publish (ensure you are logged in: npm login)
npm publish --access public

# 4) Tag a release on GitHub (optional, recommended)

Users can then configure their MCP client with npx -y unpaywall-mcp as shown above. No clone or build required.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选