Semantic Scholar
STDIOFastMCP server for Semantic Scholar API providing academic paper data and citation networks.
FastMCP server for Semantic Scholar API providing academic paper data and citation networks.
A FastMCP server implementation for the Semantic Scholar API, providing comprehensive access to academic paper data, author information, and citation networks.
The project has been refactored into a modular structure for better maintainability:
semantic-scholar-server/
├── semantic_scholar/ # Main package
│ ├── __init__.py # Package initialization
│ ├── server.py # Server setup and main functionality
│ ├── mcp.py # Centralized FastMCP instance definition
│ ├── config.py # Configuration classes
│ ├── utils/ # Utility modules
│ │ ├── __init__.py
│ │ ├── errors.py # Error handling
│ │ └── http.py # HTTP client and rate limiting
│ ├── api/ # API endpoints
│ ├── __init__.py
│ ├── papers.py # Paper-related endpoints
│ ├── authors.py # Author-related endpoints
│ └── recommendations.py # Recommendation endpoints
├── run.py # Entry point script
This structure:
Paper Search & Discovery
Citation Analysis
Author Information
Advanced Features
To install Semantic Scholar MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install semantic-scholar-fastmcp-mcp-server --client claude
git clone https://github.com/YUZongmin/semantic-scholar-fastmcp-mcp-server.git cd semantic-scholar-server
Install FastMCP and other dependencies following: https://github.com/jlowin/fastmcp
Configure FastMCP:
For Claude Desktop users, you'll need to configure the server in your FastMCP configuration file. Add the following to your configuration (typically in ~/.config/claude-desktop/config.json
):
{ "mcps": { "Semantic Scholar Server": { "command": "/path/to/your/venv/bin/fastmcp", "args": [ "run", "/path/to/your/semantic-scholar-server/run.py" ], "env": { "SEMANTIC_SCHOLAR_API_KEY": "your-api-key-here" # Optional } } } }
Make sure to:
/path/to/your/venv/bin/fastmcp
with the actual path to your FastMCP installation/path/to/your/semantic-scholar-server/run.py
with the actual path to run.py on your machineenv
section. If not, you can remove the env
section entirelyThe server will now be available to your Claude Desktop instance. No need to manually run any commands - Claude will automatically start and manage the server process when needed.
To get higher rate limits and better performance:
env
sectionIf no API key is provided, the server will use unauthenticated access with lower rate limits.
SEMANTIC_SCHOLAR_API_KEY
: Your Semantic Scholar API key (optional)
The server automatically adjusts to the appropriate rate limits:
With API Key:
Without API Key:
Note: All tools are aligned with the official Semantic Scholar API documentation. Please refer to the official documentation for detailed field specifications and the latest updates.
paper_relevance_search
: Search for papers using relevance ranking
paper_bulk_search
: Bulk paper search with sorting options
paper_title_search
: Find papers by exact title match
paper_details
: Get comprehensive details about a specific paper
paper_batch_details
: Efficiently retrieve details for multiple papers
paper_citations
: Get papers that cite a specific paper
paper_references
: Get papers referenced by a specific paper
author_search
: Search for authors by name
author_details
: Get detailed information about an author
author_papers
: Get papers written by an author
author_batch_details
: Get details for multiple authors
paper_recommendations_single
: Get recommendations based on a single paper
paper_recommendations_multi
: Get recommendations based on multiple papers
results = await paper_relevance_search( context, query="machine learning", year="2020-2024", min_citation_count=50, fields=["title", "abstract", "authors"] )
# Single paper recommendation recommendations = await paper_recommendations_single( context, paper_id="649def34f8be52c8b66281af98ae884c09aef38b", fields="title,authors,year" ) # Multi-paper recommendation recommendations = await paper_recommendations_multi( context, positive_paper_ids=["649def34f8be52c8b66281af98ae884c09aef38b", "ARXIV:2106.15928"], negative_paper_ids=["ArXiv:1805.02262"], fields="title,abstract,authors" )
# Get details for multiple papers papers = await paper_batch_details( context, paper_ids=["649def34f8be52c8b66281af98ae884c09aef38b", "ARXIV:2106.15928"], fields="title,authors,year,citations" ) # Get details for multiple authors authors = await author_batch_details( context, author_ids=["1741101", "1780531"], fields="name,hIndex,citationCount,paperCount" )
The server provides standardized error responses:
{ "error": { "type": "error_type", # rate_limit, api_error, validation, timeout "message": "Error description", "details": { # Additional context "authenticated": true/false # Indicates if request was authenticated } } }