Skip to content

feat: add Semantic Scholar citation traversal and author tools#2

Open
RaggedR wants to merge 1 commit into
rishimule:mainfrom
RaggedR:feat/semantic-scholar-tools
Open

feat: add Semantic Scholar citation traversal and author tools#2
RaggedR wants to merge 1 commit into
rishimule:mainfrom
RaggedR:feat/semantic-scholar-tools

Conversation

@RaggedR

@RaggedR RaggedR commented Apr 10, 2026

Copy link
Copy Markdown

Summary

  • Adds 6 new MCP tools for Semantic Scholar integration: get_paper_details, get_citations, get_references, find_related, search_author, get_author_papers
  • Enables forward and reverse citation traversal — essential for literature reviews
  • No changes to existing ArXiv tools or dependencies (httpx is already in pyproject.toml)

New Tools

Tool S2 Endpoint Purpose
get_paper_details /paper/{id} Full metadata: title, authors, citations, TL;DR, abstract
get_citations /paper/{id}/citations Forward traversal — who cites this paper
get_references /paper/{id}/references Reverse traversal — what this paper cites
find_related /recommendations/v1/papers/forpaper/{id} Embedding-based similar paper discovery
search_author /author/search Find authors by name with h-index, affiliations
get_author_papers /author/{id}/papers List an author's publications

All tools accept flexible paper identifiers: S2 hash, ArXiv:XXXX.XXXXX, DOI:..., or CorpusID:....

Configuration

Optional SEMANTIC_SCHOLAR_API_KEY environment variable for higher rate limits (5,000 vs 100 req/5min). Works without it.

Implementation

  • New file: src/arxiv_mcp/tools/semantic_scholar.py (self-contained, ~300 lines)
  • Modified: src/arxiv_mcp/main.py (import + register 6 tools)
  • Uses httpx.AsyncClient (already a dependency) for async S2 API calls
  • Follows the project's existing pattern: async functions returning formatted strings
  • Error handling via try/except with logger, matching existing tool patterns

Test plan

  • All imports resolve correctly
  • No changes to existing tools or dependencies
  • Follows existing code patterns (async functions, logger, markdown output)

🤖 Generated with Claude Code

Adds 6 new MCP tools powered by the Semantic Scholar API:

- get_paper_details: full paper metadata (title, authors, citations, abstract, TL;DR)
- get_citations: forward citation traversal (who cites this paper)
- get_references: reverse citation traversal (what this paper cites)
- find_related: embedding-based paper recommendations
- search_author: find authors by name with h-index and affiliation
- get_author_papers: list an author's publications

All tools accept flexible paper IDs (S2 hash, ArXiv:..., DOI:..., CorpusID:...).
Optional SEMANTIC_SCHOLAR_API_KEY env var for higher rate limits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant