Labsco
younis-ali logo

Agntic AI for Research Papers

from younis-ali

Search and extract information about research papers from arXiv.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

MCP Agntic AI for Research Papers

This project implements a chatbot using the Model Context Protocol (MCP) to search and retrieve information about research papers from arXiv. The chatbot allows you to query papers by topic and extract detailed information about specific papers.

Overview

The system consists of two main components:

  • Server: A FastMCP server that provides tools for searching arXiv papers and extracting paper information.

  • Client: An MCP client that integrates with OpenAI's GPT model to process user queries and interact with the server.

The server stores paper information in JSON files organized by topic, while the client provides an interactive chat interface for users to input queries.

Features

  • Search Papers: Search for papers on arXiv by topic, with configurable maximum results.

  • Extract Paper Info: Retrieve detailed information (title, authors, summary, PDF URL, publication date) for a specific paper using its arXiv ID.

  • Persistent Storage: Paper information is saved in JSON files under a papers directory, organized by topic.

  • Interactive Chatbot: Users can interact with the chatbot via a command-line interface, with support for natural language queries powered by OpenAI's GPT model.

Project Structure

โ”œโ”€โ”€ papers/ # Directory for storing paper information (auto-created)
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ mcp_chatbot.py # MCP client with chatbot implementation
โ”‚ โ”œโ”€โ”€ research_server.py # FastMCP server with arXiv search tools
โ”‚ โ”œโ”€โ”€ keys.json # API keys (not tracked in git)
โ”‚ โ”œโ”€โ”€ server_config.json # MCP server configuration
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ main.py # Entry point

Example Queries

  • Search for papers:
Query: Find 3 papers on machine learning 

Output: List of paper IDs, with details saved in papers/machine_learning/papers_info.json.

  • Extract paper information:
Query: Get info for paper 2103.12345 

Output: JSON-formatted paper details (title, authors, summary, etc.) if found.

Notes

  • The server creates a papers directory to store JSON files containing paper information, organized by topic (e.g., papers/quantum_computing/papers_info.json).

  • The client uses gpt-4o-mini by default. Update the model in src/mcp_chatbot.py if needed.

  • The system assumes uv is installed for running scripts. Modify the command in server_config.json if using a different tool (e.g., python).

Future Improvements

  • Add support for filtering papers by date, author, or category.

  • Implement paper PDF download and storage.

  • Enhance the chatbot with more natural language understanding for complex queries.

  • Add a web-based UI for better user interaction.