teddytesfa/research-mcp-server
If you are the rightful owner of research-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Research Server is a demonstration project that showcases how to create a custom Model Control Protocol (MCP) server using the FastMCP framework. It integrates with arXiv to search, retrieve, and manage academic papers, providing a structured interface for AI-assisted research.
MCP Research Server
A demonstration project showcasing how to create a custom MCP (Model Control Protocol) server using the FastMCP framework. This implementation serves as a practical example of building an MCP server that integrates with arXiv to search, retrieve, and manage academic papers, providing a structured interface for AI-assisted research. The project leverages FastMCP's capabilities to create custom tools, resources, and prompts, making it an excellent reference for developing your own MCP servers.
š Features
- Paper Search: Search for academic papers on arXiv by topic
- Persistent Storage: Automatically saves paper metadata for future reference
- Topic Organization: Organizes papers by research topics
- RESTful API: Exposes endpoints through FastMCP for easy integration
- AI Integration: Includes prompts for Claude AI to analyze research papers
š ļø Prerequisites
- Python 3.11.11 (recommended)
- pip (Python package manager)
- Virtual environment (recommended)
Note: This project is developed and tested with Python 3.11.11. While it may work with other Python 3.7+ versions, using 3.11.11 is recommended for compatibility.
š Installation
-
Clone the repository:
git clone https://github.com/teddytesfa/research-mcp-server.git cd mcp_project
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
šāāļø Getting Started
-
Start the MCP server:
python research_server.py
-
The server will start on
http://localhost:8001
by default.
š ļø API Endpoints
Tools
-
search_papers(topic: str, max_results: int = 5)
- Search for papers on arXiv
- Returns: List of paper IDs
-
extract_info(paper_id: str)
- Get detailed information about a specific paper
- Returns: Paper metadata as JSON
Resources
-
papers://folders
- List all available topic folders
-
papers://{topic}
- Get papers for a specific topic
š¤ AI Integration
The server includes a prompt template for Claude AI to analyze research papers. Use the generate_search_prompt
function to get started with AI-assisted research.
š Project Structure
mcp_project/
āāā papers/ # Directory for storing paper metadata
ā āāā {topic}/ # Topic-specific directories
ā āāā papers_info.json # Paper metadata
āāā research_server.py # Main server implementation
āāā README.md # This file
š Example Usage
-
Search for papers on a topic:
# Example search for papers about "machine learning" paper_ids = search_papers("machine learning", max_results=3)
-
Get information about a specific paper:
paper_info = extract_info("2103.00001") print(paper_info)
š Learning Resources
This project is an implementation to demonstrate how to create your own MCP (Model Control Protocol) server. It showcases:
- Creating custom tools with
@mcp.tool()
- Defining resources with
@mcp.resource()
- Generating AI prompts with
@mcp.prompt()
- Managing server state and persistence
- Integrating with external APIs (arXiv)
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.