Add OpenAlex API key configuration - #92
Open
pikaqiu2333 wants to merge 1 commit into
Open
Conversation
pikaqiu2333
marked this pull request as ready for review
July 5, 2026 13:16
HagiaHaya
added a commit
to HagiaHaya/paper-search-mcp
that referenced
this pull request
Jul 27, 2026
George930502
added a commit
to George930502/paper-search-mcp
that referenced
this pull request
Aug 3, 2026
New MCP tools, all key-less via OpenAlex: get_citing_papers forward snowballing (papers citing a paper) get_referenced_papers backward snowballing (papers a paper cites) find_open_access_pdf OA copy resolution without an Unpaywall email search_papers gains enrich_citations (default on): citation counts are backfilled from OpenAlex for sources that report none (arXiv, dblp, PubMed), one request per 100 papers, reported as citations_enriched. In the OpenAlex connector, the parsing inside search() is extracted into _parse_work() so the graph lookups share it; it now tolerates JSON null fields, falls back to best_oa_location for a PDF link, and records references plus is_oa / pdf_is_direct. All requests go through a _get() helper that retries 429/5xx with backoff and honours Retry-After, but does not retry an exhausted OpenAlex request budget. OpenAlex contact/key configuration is deliberately left alone here, so this does not collide with openags#92. Closes the "Citation graph & Paper relation context feature" TODO.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PAPER_SEARCH_MCP_OPENALEX_API_KEY/OPENALEX_API_KEYsupport toOpenAlexSearcherand pass it as the OpenAlexapi_keyquery parameter.PAPER_SEARCH_MCP_OPENALEX_EMAIL/OPENALEX_EMAILsupport for the OpenAlexUser-Agentcontact string while preserving the existing default..env.example.Context
OpenAlex now documents API keys as the replacement for the old polite-pool approach and notes that free keys improve daily request limits. This complements #81 without changing arXiv pacing or venue handling.
Docs: https://docs.openalex.org/how-to-use-the-api/api-keys
Validation
python -m pytest tests\\test_openalex.pypython -m py_compile paper_search_mcp\\academic_platforms\\openalex.py tests\\test_openalex.py