Skip to main content
Glama
ElliotPadfield

Unpaywall MCP Server

Unpaywall MCP 서버

npm version CI license node >=18

AI 클라이언트가 다음을 수행할 수 있도록 Unpaywall 도구를 노출하는 MCP(Model Context Protocol) 서버입니다:

  • DOI로 메타데이터 가져오기

  • 논문 제목 검색

  • 최적의 OA(오픈 액세스) 전문 링크 검색

  • OA PDF 다운로드 및 텍스트 추출

퀵스타트 (npx)

MCP 클라이언트 설정(Claude Desktop 예시)에 다음을 추가하세요:

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

그런 다음 도구를 사용해 보세요: unpaywall_search_titles, unpaywall_get_fulltext_links, unpaywall_fetch_pdf_text.

이 저장소를 복제하거나 npm install을 실행할 필요가 없습니다. npx가 첫 호출 시 가져오기 및 캐싱을 처리합니다.

Related MCP server: ScholarScope MCP

요구 사항

  • Node.js 18+ (npx용)

  • Unpaywall / OpenAlex 요청을 위한 이메일 주소 (Unpaywall에서 요구하며, OpenAlex의 polite pool에 사용됨)

로컬 개발 (기여자 전용)

최종 사용자는 위의 npx 설정을 사용해야 합니다. 소스에서 빌드하는 기여자는 다음을 수행하세요:

npm install
npm run build
UNPAYWALL_EMAIL=you@example.com npm start   # stdio transport, as required by MCP clients

핫런(빌드 단계 없음):

UNPAYWALL_EMAIL=you@example.com npm run dev

도구

unpaywall_get_by_doi

  • 설명: DOI에 대한 Unpaywall 메타데이터 가져오기

  • 입력 스키마:

    • doi (문자열, 필수): 예: 10.1038/nphys1170

    • email (문자열, 선택): 제공 시 UNPAYWALL_EMAIL을 재정의함

  • 출력: Unpaywall의 JSON 응답

unpaywall_search_titles

  • 설명: 논문 제목을 검색하고 각 결과에 대한 Unpaywall 스타일의 OA 메타데이터를 반환합니다 (페이지당 50개 결과)

  • 입력 스키마:

    • query (문자열, 필수): 제목 검색어

    • is_oa (불리언, 선택): true인 경우 OA 결과만, false인 경우 비공개 결과만, 생략 시 전체

    • page (정수 >= 1, 선택): 페이지 번호

    • email (문자열, 선택): UNPAYWALL_EMAIL을 재정의함

  • 출력: Unpaywall 검색 형태와 일치하는 JSON — results[].response는 DOI 스타일 레코드(doi, title, is_oa, oa_status, best_oa_location, oa_locations)이며, 결과별 score와 snippet이 포함됩니다. _source: "openalex"는 업스트림을 표시합니다.

  • 참고: Unpaywall 자체의 /v2/search가 2025년 5월 재작성 이후 HTTP 500을 반환하고 있어 OpenAlex의 /works 엔드포인트를 기반으로 합니다. Unpaywall은 현재 OpenAlex의 서브루틴으로 실행되므로 이것이 표준적인 현대적 대안입니다.

unpaywall_get_fulltext_links

  • 설명: DOI에 대한 최적의 OA PDF URL 및 Open URL과 모든 OA 위치를 반환합니다

  • 입력 스키마:

    • doi (문자열, 필수)

    • email (문자열, 선택): UNPAYWALL_EMAIL을 재정의함

  • 출력: best_pdf_url, best_open_url, best_oa_location, oa_locations 및 선택된 메타데이터 필드가 포함된 JSON

unpaywall_fetch_pdf_text

  • 설명: DOI에 대한 최적의 OA PDF에서 텍스트를 다운로드 및 추출하거나, 제공된 pdf_url에서 추출합니다

  • 입력 스키마:

    • pdf_url (문자열, 선택): 직접 PDF URL (우선순위 높음)

    • doi (문자열, 선택): pdf_url이 제공되지 않은 경우 최적의 OA PDF를 확인하는 데 사용됨

    • email (문자열, 선택): doi를 사용하고 UNPAYWALL_EMAIL 환경 변수가 없는 경우 필수

    • truncate_chars (정수 >= 1000, 선택): 반환할 추출 텍스트의 최대 문자 수 (기본값 20000)

  • 출력: text(잘릴 수 있음), length_chars, truncated, pdf_url 및 PDF 메타데이터가 포함된 JSON

LLM 프롬프트 팁 (MCP)

MCP 지원 LLM 클라이언트에서 이 서버를 사용할 때 모델에게 다음을 요청하세요:

  • 검색 후 가져오기: 간결한 제목 문구로 unpaywall_search_titles를 사용하고, 결과를 선택한 다음, 선택한 DOI에 대해 unpaywall_get_fulltext_links 또는 unpaywall_fetch_pdf_text를 호출하세요.

  • OA 선호: 오픈 액세스 결과만 원할 경우 검색 시 is_oa: true를 전달하세요.

  • 크기 제어: unpaywall_fetch_pdf_text에서 truncate_chars(기본값 20000)를 설정하고 긴 텍스트는 진행하기 전에 요약하세요.

  • 복원력 유지: 최적의 PDF URL이 누락된 경우 best_open_url로 대체하고 랜딩 페이지에서 콘텐츠를 추출하세요(이 서버 외부).

  • 속도 제한 준수: 많은 호출을 수행할 경우 요청 간격을 두고, 동일한 호출을 반복하는 대신 이전 응답을 재사용하세요.

LLM에 대한 좋은 사용자 지침:

  • "'생의학 분야의 파운데이션 모델'에 관한 OA 논문 3개를 찾은 다음, 가장 좋은 논문의 서론을 추출하고 요약해 줘."

  • "'Graph Neural Networks survey 2024'를 검색하고, 가능하면 OA로 필터링한 다음, PDF 텍스트를 가져와서 10개의 글머리 기호로 요약해 줘."

도구 호출 페이로드 예시

MCP 클라이언트에 따라 구조가 다르지만, 핵심 페이로드는 다음과 같습니다:

// 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
  }
}

MCP 클라이언트에서 설정

npm/npx를 사용하는 Claude Desktop에 권장되는(빌드 없는) 설정:

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

컴파일된 dist를 사용하는 대체(로컬 저장소) 설정:

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

추가 후 클라이언트에게 도구 목록을 나열하도록 요청하고 다음을 시도해 보세요:

  • query와 함께 unpaywall_search_titles

  • doi와 함께 unpaywall_get_fulltext_links

  • doi(또는 pdf_url)와 함께 unpaywall_fetch_pdf_text

참고

  • Unpaywall의 속도 제한 및 사용 지침을 준수하세요: https://unpaywall.org/products/api

  • 이 서버는 stdio 전송 및 @modelcontextprotocol/sdk를 사용합니다.

  • Unpaywall이 사용량에 대해 연락할 수 있도록 UNPAYWALL_EMAIL을 설정하거나 호출당 email을 전달하세요.

유지 관리자: 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)

사용자는 위와 같이 npx -y unpaywall-mcp를 사용하여 MCP 클라이언트를 설정할 수 있습니다. 복제나 빌드가 필요하지 않습니다.

Available Tools

4 tools
unpaywall_fetch_pdf_textA

Download and extract text from best OA PDF for a DOI, or from a provided PDF URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
doiNoDOI string or DOI URL. Used if pdf_url is not provided.
pdf_urlNoDirect PDF URL to download and parse (takes precedence over DOI).
emailNoEmail to identify requests to Unpaywall (required when resolving via DOI).
truncate_charsNoMax characters of extracted text to return (default 20000).

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions key behaviors like downloading, extracting text, and precedence rules, but lacks details on error handling, rate limits, authentication needs (beyond the email parameter), or what 'best OA PDF' means. This provides basic context but is incomplete for a tool with potential external dependencies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Download and extract text') and includes essential qualifiers. Every word earns its place, with no wasted text, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides basic purpose and parameter context but lacks completeness. It doesn't explain return values (e.g., text format, error responses) or behavioral details like rate limits, which are important for a tool interacting with external services. This is adequate but has clear gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional semantic meaning beyond what's in the schema (e.g., it doesn't explain format details or usage nuances). This meets the baseline for high schema coverage but doesn't enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Download and extract text') and the resource ('best OA PDF for a DOI, or from a provided PDF URL'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'unpaywall_get_fulltext_links' which might provide links rather than extracted text, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning alternatives ('DOI, or from a provided PDF URL') and precedence rules ('pdf_url takes precedence over DOI'), but it doesn't explicitly state when to use this tool vs. siblings like 'unpaywall_get_by_doi' or provide clear exclusions. This leaves some ambiguity in tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

unpaywall_get_by_doiA

Fetch Unpaywall metadata for a DOI (accepts DOI, DOI URL, or 'doi:' prefix). Requires an email address via env UNPAYWALL_EMAIL or the optional 'email' argument.

ParametersJSON Schema
NameRequiredDescriptionDefault
doiYesDOI string or DOI URL, e.g. 10.1038/nphys1170 or https://doi.org/10.1038/nphys1170
emailNoEmail to identify your requests to Unpaywall (optional override)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the tool requires an email address (via env or argument) for identification to Unpaywall, implying authentication needs. However, it lacks details on rate limits, error handling, or response format, leaving gaps in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with two sentences that efficiently convey purpose, input formats, and requirements without any wasted words. Every sentence adds essential information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers authentication needs and input formats but lacks details on output (metadata structure), error cases, or performance constraints, which would be helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema by mentioning the 'doi:' prefix as an accepted format and noting the email requirement, but does not provide additional syntax or usage details for parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Fetch Unpaywall metadata') and resource ('for a DOI'), distinguishing it from sibling tools like fetching PDF text or searching titles. It specifies the exact input formats accepted (DOI, DOI URL, or 'doi:' prefix), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool (for fetching metadata by DOI) and mentions an alternative (using the 'email' argument vs. env variable), but does not explicitly state when not to use it or differentiate from siblings like 'unpaywall_get_fulltext_links' beyond the metadata focus.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

unpaywall_search_titlesA

Search Unpaywall for article titles matching a query. Supports optional is_oa filter and pagination (50 results per page).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesTitle search query (supports phrase, boolean operators per Unpaywall docs)
is_oaNoIf true, only return OA results; if false, only closed; omit for all
pageNoPage number (50 results per page)
emailNoEmail to identify your requests to Unpaywall (optional override)

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Supports optional is_oa filter and pagination (50 results per page)', which provides useful operational context about filtering capabilities and pagination behavior. However, it doesn't address important behavioral aspects like rate limits, authentication requirements (beyond the optional email parameter), error conditions, or what the search results actually contain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first establishes what the tool does, and the second provides key operational context about filters and pagination. There's zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 4 parameters, 100% schema coverage, and no output schema, the description provides adequate but minimal context. It covers the basic purpose and mentions key operational features (filtering, pagination), but doesn't explain what the search results contain, how comprehensive the search is, or any limitations. Given the lack of annotations and output schema, more completeness would be helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already fully documents all 4 parameters. The description adds minimal value beyond what's in the schema - it mentions the optional is_oa filter and pagination (50 results per page), but these are already clearly documented in the parameter descriptions. The baseline score of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search Unpaywall for article titles matching a query') and specifies the resource ('article titles'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from its siblings (unpaywall_fetch_pdf_text, unpaywall_get_by_doi, unpaywall_get_fulltext_links), which appear to have different functions but could potentially overlap in some search contexts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'Search Unpaywall for article titles matching a query' and mentions optional filters/pagination, but doesn't explicitly state when to use this tool versus alternatives like unpaywall_get_by_doi (for DOI-based lookups) or unpaywall_get_fulltext_links (for link retrieval). No explicit when-not-to-use guidance or prerequisite information is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updates
    • First observedunpaywall_fetch_pdf_text
    • First observedunpaywall_get_by_doi
    • First observedunpaywall_get_fulltext_links
    • First observedunpaywall_search_titles

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: fetching PDF text, retrieving metadata, getting fulltext links, and searching titles. There is no overlap in functionality, making it easy for an agent to select the right tool for a specific task.

Naming Consistency5/5

All tools follow a consistent 'unpaywall_verb_noun' pattern, such as unpaywall_fetch_pdf_text and unpaywall_search_titles. This uniformity enhances readability and predictability across the toolset.

Tool Count5/5

With 4 tools, the server is well-scoped for handling Unpaywall-related operations, covering key actions like metadata retrieval, text extraction, link fetching, and title search without being overly sparse or bloated.

Completeness4/5

The toolset covers essential CRUD-like operations for accessing open-access content, including fetching, searching, and retrieving links. A minor gap might be the lack of update or delete tools, but this is reasonable given the server's read-only nature for external data.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    F
    maintenance
    Enables real-time search and retrieval of academic paper information from multiple sources, providing access to paper metadata, abstracts, and full-text content when available, with structured data responses for integration with AI models that support tool/function calling.
    3
    116
    AGPL 3.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables academic research through the OpenAlex API, allowing users to search for papers, authors, and institutions, retrieve citations, and fetch full-text content when available. Perfect for building intelligent research assistants that can explore academic literature and related works.
    8
    7
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables looking up free-to-read versions of scholarly papers by DOI and searching article titles for Open Access matches via the Unpaywall API.
    2
    1
    -