Get the FREE Ultimate OpenClaw Setup Guide →

arxiv

MCP server for arXiv, implemented in Java with Quarkus

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio glaforge-arxiv-mcp-server java -jar /absolute/path/to/your/project/target/arxiv-mcp-server-runner.jar \
  --env JAVA_OPTS="Optional: additional JVM options, e.g., -Xmx2g"

How to use

The arxiv MCP server exposes tools to search arXiv papers, fetch detailed metadata, and retrieve PDF content from arXiv. Core tools include search_papers for querying preprints with support for filters, sorting, and pagination; get_paper_details to fetch detailed metadata for a list of paper IDs; and a PDF endpoint to obtain the paper content. You can access abstract and metadata endpoints via arxiv://papers/{id}/abstract and arxiv://papers/{id}/metadata, and retrieve PDFs at https://arxiv.org/pdf/{id} (Base64-encoded when delivered through the MCP interface). Use the prompts such as summarize_paper to generate summaries for specific IDs, and construct_search_query to build complex arXiv API queries using topic, author, category, or year constraints. In practice, you will run the server locally or in the cloud, then query it through your MCP client or inspector to explore papers and workflows.

How to install

Prerequisites:

  • Java JDK 21 or later
  • Maven Wrapper (mvnw) available in the project
  • Optional: JBang if you want to run via the recommended Quick Start path

Install steps:

  1. Clone or download the MCP server repository and cd into it.
  2. Build the Uber-Jar using Maven:
./mvnw clean package -DskipTests

This produces the runner jar at target/arxiv-mcp-server-runner.jar. 3) Run the server locally:

java -jar target/arxiv-mcp-server-runner.jar
  1. (Optional) Run in development mode with MCP Inspector:
./mvnw quarkus:dev

Then connect the MCP Inspector to http://localhost:8080/mcp.

If you prefer the Quick Start with JBang:

  1. Ensure JBang is installed on your system.
  2. Run the script via JBang (as described in the README):
jbang run arxiv-mcp@glaforge/arxiv-mcp-server
  1. Use the provided configuration snippet to point your agent to the JBang alias.

Additional notes

Notes and tips:

  • The arxiv MCP server uses a Quarkus-based implementation and exposes endpoints for each MCP tool (search_papers, get_paper_details) as part of the /mcp interface when running in development mode.
  • In production, consider deploying the JAR to your preferred environment and configuring an HTTP front-end or load balancer as appropriate.
  • The documentation includes quick-start JSON snippets for configuring an MCP client to talk to the server; replace /absolute/path/to/your/project with your actual deployment path.
  • If you encounter port conflicts, ensure the server runs on a free port and update any client configurations accordingly.
  • For API access, the arXiv endpoints follow arXiv conventions; ensure you respect arXiv rate limits and terms of use when performing automated queries.

Related MCP Servers

Sponsor this space

Reach thousands of developers