semantic-scholar-rs
Unofficial Rust SDK and MCP server for the Semantic Scholar API.
Note: This is a community-maintained project and is not affiliated with or endorsed by the Semantic Scholar team at the Allen Institute for AI.
Features
- Paper search, lookup by ID / DOI / ArXiv ID
- Citations and references
- Author search and lookup
- Paper recommendations
- Automatic retry with exponential backoff (429 / 5xx)
- Optional MCP server for LLM tool-use integration
Quick Start
[]
= "0.1"
= { = "1", = ["full"] }
use SemanticScholar;
async
API Key
Unauthenticated requests share a global rate-limit pool (100 req/min across all unauthenticated users). For dedicated limits, obtain a key from Semantic Scholar API and pass it to the client:
let client = with_api_key?;
Endpoints
| Method | Description |
|---|---|
search_papers(query) |
Keyword search with filters (year, field of study, etc.) |
get_paper(id) |
Lookup by S2 ID, DOI:..., ARXIV:..., CorpusId:... |
get_paper_by_doi(doi) |
Convenience wrapper for DOI lookup |
get_paper_by_arxiv(id) |
Convenience wrapper for ArXiv lookup |
get_citations(paper_id) |
Papers that cite the given paper |
get_references(paper_id) |
Papers referenced by the given paper |
search_authors(query) |
Author name search |
get_author(author_id) |
Author details by S2 author ID |
get_recommendations(paper_id) |
Recommended papers based on a paper |
All request builders support .limit(), .offset(), and .fields() for pagination and field selection.
MCP Server
An MCP server is included as an optional binary, exposing all endpoints as LLM-callable tools over stdio.
Installation
# Homebrew (macOS/Linux)
# Shell script (macOS/Linux)
|
# cargo install (requires Rust toolchain)
Build from Source
Claude Desktop Configuration
Available Tools
| Tool | Description |
|---|---|
search_papers |
Search academic papers by keyword |
get_paper |
Get paper details by identifier |
search_authors |
Search authors by name |
get_author |
Get author details by ID |
get_citations |
Get citing papers |
get_references |
Get referenced papers |
get_recommendations |
Get paper recommendations |
Testing
# Unit tests (offline, CI-safe)
# MCP protocol E2E (no API calls)
# Full integration tests (hits real API)
License
MIT