Semantic Scholar MCP Server

Semantic Scholar MCP Server

Enables searching and retrieving academic papers, authors, citations, and references from Semantic Scholar via an HTTP MCP server with caching and rate limiting.

Category
Visit Server

README

Semantic Scholar MCP Server

Remote MCP server with Streamable HTTP transport for Semantic Scholar API access.

Features

  • πŸ”Œ Streamable HTTP Transport - Remote MCP server accessible anywhere
  • πŸ’Ύ SQLite Caching - Persistent cache with TTL-based expiration
  • 🚦 Rate Limiting - Token bucket algorithm to prevent API quota exhaustion
  • πŸ“Š Metrics - Prometheus-compatible metrics endpoint
  • πŸ“ Structured Logging - JSON logs with request IDs
  • πŸ”’ Security - API key via environment variable only (no CLI exposure)

Quick Start

Installation

# Clone the repository
git clone https://github.com/your-org/semantic-scholar-mcp.git
cd semantic-scholar-mcp

# Install dependencies
npm install

# Build TypeScript
npm run build

Configuration

Set environment variables:

# Required: Semantic Scholar API key (get from https://www.semanticscholar.org/product/api)
export SEMANTIC_SCHOLAR_API_KEY="your-api-key"

# Optional: Server configuration
export PORT=3000
export HOST="0.0.0.0"
export LOG_LEVEL="info"

# Optional: Cache configuration
export CACHE_TTL_DAYS=7
export CACHE_MAX_SIZE=1073741824

# Optional: Rate limiting
export RATE_LIMIT_REQUESTS_PER_MINUTE=10
export RATE_LIMIT_BURST_SIZE=5

Running

# Production
npm start

# Development (with hot reload)
npm run dev

Authentication

Simple API Key (Default)

Uses environment variable for authentication. Good for personal use.

export SEMANTIC_SCHOLAR_API_KEY="your-api-key"

OAuth 2.1 (Enterprise)

For production multi-user deployments, use the OAuth 2.1 pattern:

Reusable OAuth Pattern: https://github.com/truaxki/mcp-oauth-pattern

The OAuth pattern provides:

  • OAuth 2.1 authentication with Supabase
  • Bearer token middleware
  • Consent page for user authorization
  • Per-user rate limiting (optional)

To add OAuth to this server:

  1. Clone https://github.com/truaxki/mcp-oauth-pattern
  2. Copy src/auth.ts, src/logger.ts from OAuth pattern
  3. Replace API key auth with Bearer token middleware
  4. Configure Supabase environment variables

Connect from Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "semantic-scholar": {
      "type": "streamable-http",
      "url": "http://your-server:3000"
    }
  }
}

Endpoints

Endpoint Description
POST /mcp MCP protocol handler
GET /health Health check
GET /metrics Prometheus metrics

Available Tools

Tool Description
search_papers Search for papers with filters
get_paper Get paper details by ID
get_authors Get authors for a paper
get_citations Get papers that cite a paper
get_references Get papers referenced by a paper
batch_fetch Fetch multiple papers efficiently
get_cache_stats View cache statistics
clear_cache Clear cached data

Deployment

Docker

# Build image
docker build -t semantic-scholar-mcp .

# Run container
docker run -d \
  --name semantic-scholar-mcp \
  -p 3000:3000 \
  -e SEMANTIC_SCHOLAR_API_KEY="your-key" \
  semantic-scholar-mcp

Railway Deployment

One-click deploy:

Deploy on Railway

Manual deployment:

  1. Connect repository

    • Go to Railway and sign in
    • Click "New Project" β†’ "Deploy from GitHub repo"
    • Select truaxki/semantic-scholar-mcp
  2. Configure environment variables

    • In Railway dashboard, go to your service's "Variables" tab
    • Add:
      SEMANTIC_SCHOLAR_API_KEY=your-api-key-here
      LOG_LEVEL=info
      PORT=3000
      
  3. Deploy

    • Railway automatically detects Node.js and builds
    • Deploys with Streamable HTTP on port 3000
    • Gets free HTTPS endpoint automatically
  4. Connect from Claude Code

    {
      "mcpServers": {
        "semantic-scholar": {
          "type": "streamable-http",
          "url": "https://your-service.up.railway.app/mcp"
        }
      }
    }
    

Railway pricing: Free tier available, $5/month for dedicated resources.

Manual Server (srv1338041)

# SSH to server
ssh user@srv1338041

# Clone and build
git clone your-repo
cd semantic-scholar-mcp
npm install
npm run build

# Create systemd service (see deploy/semantic-scholar-mcp.service)
sudo cp deploy/semantic-scholar-mcp.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable semantic-scholar-mcp
sudo systemctl start semantic-scholar-mcp

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Semantic Scholar MCP Server             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Express   │──▢│   MCP SDK   │──▢│  Tools    β”‚ β”‚
β”‚  β”‚   HTTP      β”‚  β”‚   Server    β”‚  β”‚  Registry β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚         β”‚                 β”‚                           β”‚
β”‚         β–Ό                 β–Ό                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚   Logging   β”‚  β”‚   Cache     β”‚                  β”‚
β”‚  β”‚  (Pino)     β”‚  β”‚ (SQLite)    β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚                                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                 β”‚                           β”‚
         β–Ό                 β–Ό                           β–Ό
  HTTPS Endpoint    Persistent Cache    Rate Limited API

API Key

Get your free Semantic Scholar API key from: https://www.semanticscholar.org/product/api

Free tier: 100 requests/day

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured