Unpaywall MCP Server
Unpaywall MCP サーバー
Unpaywallツールを公開するMCP (Model Context Protocol) サーバーであり、AIクライアントは以下のことが可能です:
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: Unpaywall MCP Server
要件
Node.js 18+ (
npx用)Unpaywall / OpenAlexリクエスト用のメールアドレス(Unpaywallで必須、OpenAlexのポライトプールで使用されます)
ローカル開発(コントリビューターのみ)
エンドユーザーは上記の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/nphys1170email(文字列, オプション): 指定された場合、UNPAYWALL_EMAILを上書きします
出力: UnpaywallからのJSONレスポンス
unpaywall_search_titles
説明: 論文タイトルを検索し、各ヒットに対するUnpaywall形式のOAメタデータを返します(1ページあたり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への良いユーザー指示の例:
「'foundation models in biomedicine' に関する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_titlesdoiを指定したunpaywall_get_fulltext_linksdoi(またはpdf_url)を指定したunpaywall_fetch_pdf_text
注意事項
Unpaywallのレート制限と利用ガイドラインを尊重してください: https://unpaywall.org/products/api
サーバーはstdioトランスポートと
@modelcontextprotocol/sdkを使用します。UNPAYWALL_EMAILを設定するか、呼び出しごとにemailを渡して、Unpaywallが利用状況について連絡できるようにしてください。
メンテナー向け: 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 toolsunpaywall_fetch_pdf_textA
Download and extract text from best OA PDF for a DOI, or from a provided PDF URL.
Inputs: doi, pdf_url, email, truncate_chars.
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.
Inputs: doi (required), email.
unpaywall_get_fulltext_linksA
Given a DOI, return best open-access links (best PDF URL and open URL) plus Unpaywall locations metadata.
Inputs: doi (required), email.
unpaywall_search_titlesA
Search Unpaywall for article titles matching a query. Supports optional is_oa filter and pagination (50 results per page).
Inputs: query (required), is_oa, page, email.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Legitimate full-text access to scholarly articles for your AI, by DOI, with provenance.
Unpaywall MCP — open-access lookup for scholarly papers (free, no key)
Search research papers and verify DOIs across OpenAlex, Crossref, arXiv and Europe PMC.
1Search 250M scholarly works (OpenAlex, Crossref, arXiv, PubMed) and resolve any DOI
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.87MIT
- AlicenseAqualityDmaintenanceEnables querying open-access availability of scholarly articles via Unpaywall API, including DOI lookup, title search, and citation export.426 PyPIMIT
- FlicenseAqualityDmaintenanceEnables looking up free-to-read versions of scholarly papers by DOI and searching article titles for Open Access matches via the Unpaywall API.21-
- AlicenseNot gradedqualityCmaintenanceProvides free, no-key open-access lookup for scholarly papers via Unpaywall. Enables querying article metadata and open-access status through natural language.83 npm1MIT