Integrations
Enables searching for academic papers using keywords, retrieving detailed information about specific papers by ID, extracting full text content from paper PDFs, and generating comprehensive summaries and analyses of papers from the arXiv repository.
Provides integration support for n8n workflows, with specific configuration guidance for connecting the MCP server from within n8n's containerized environment.
A Model Context Protocol (MCP) server implementation that enables AI agents to search, retrieve, and analyze academic papers from arXiv, the popular open-access repository of electronic preprints.
Overview
This project provides an MCP server that allows AI agents to interact with the arXiv repository, search for papers based on keywords, retrieve detailed information about specific papers, and even extract and analyze the content of papers. It serves as both a practical tool for research assistance and a reference implementation for building MCP servers.
The implementation follows the best practices laid out for building MCP servers, allowing seamless integration with any MCP-compatible client.
Features
The server provides several powerful tools for academic research:
search_papers
: Search for papers on arXiv using keywords and get comprehensive summariesget_paper_details
: Retrieve detailed information about a specific paper by its arXiv IDextract_paper_content
: Download and extract the full text content from a paper's PDFanalyze_paper
: Analyze a paper's content and generate a comprehensive summary
Prerequisites
- Python 3.11+
- Docker if running the MCP server as a container (recommended)
Installation
Using uv
- Install uv if you don't have it:Copy
- Clone this repository:Copy
- Install dependencies:Copy
- Create a
.env
file based on.env.example
:Copy - Configure your environment variables in the
.env
file (see Configuration section)
Using Docker (Recommended)
- Build the Docker image:Copy
- Create a
.env
file based on.env.example
and configure your environment variables
Configuration
The following environment variables can be configured in your .env
file:
Variable | Description | Example |
---|---|---|
TRANSPORT | Transport protocol (sse or stdio) | sse |
HOST | Host to bind to when using SSE transport | 0.0.0.0 |
PORT | Port to listen on when using SSE transport | 8050 |
Running the Server
Using uv
SSE Transport
The MCP server will run as an API endpoint that you can connect to with the configuration shown below.
Stdio Transport
With stdio, the MCP client itself can spin up the MCP server, so nothing to run at this point.
Using Docker
SSE Transport
The MCP server will run as an API endpoint within the container that you can connect to with the configuration shown below.
Stdio Transport
With stdio, the MCP client itself can spin up the MCP server container, so nothing to run at this point.
Integration with MCP Clients
SSE Configuration
Once you have the server running with SSE transport, you can connect to it using this configuration:
Note for Windsurf users: Use
serverUrl
instead ofurl
in your configuration:Copy
Note for n8n users: Use host.docker.internal instead of localhost since n8n has to reach outside of its own container to the host machine:
So the full URL in the MCP node would be: http://host.docker.internal:8050/sse
Make sure to update the port if you are using a value other than the default 8050.
Python with Stdio Configuration
Add this server to your MCP configuration for Claude Desktop, Windsurf, or any other MCP client:
Docker with Stdio Configuration
Usage Examples
Here are some examples of how to use the arXiv MCP server with an AI agent:
Searching for Papers
Getting Paper Details
Extracting Paper Content
Analyzing a Paper
Building Your Own MCP Server
This implementation provides a foundation for building more complex MCP servers. To build your own:
- Add your own tools by creating methods with the
@mcp.tool()
decorator - Create your own lifespan function to add your own dependencies (clients, database connections, etc.)
- Modify the existing tools or add new ones to enhance functionality
- Add prompts and resources with
@mcp.resource()
and@mcp.prompt()
License
Acknowledgements
- arXiv for providing open access to research papers
- The Model Context Protocol team for creating the MCP standard
This server cannot be installed
A Model Context Protocol server that enables AI agents to search, retrieve, and analyze academic papers from arXiv, supporting features like keyword search, paper details retrieval, content extraction, and paper analysis.