Skip to main content
Glama
Research Server

Research Server

by akhileshvj

MCPChatbotForPapers

An MCP-based paper search chatbot that connects a Gemini client to local MCP tools for arXiv search and paper metadata lookup.

What's Included

  • mcp_chatbot.py: interactive chatbot that connects to configured MCP servers and routes tool calls through Gemini

  • research_server.py: MCP server that searches arXiv and stores paper metadata locally

  • papers/: generated cache of paper search results, grouped by topic

  • server_config.json: MCP server launch configuration used by the chatbot

Related MCP server: arxiv-mcp

Requirements

  • Python 3.14 or newer

  • uv installed locally

  • A Google Gemini API key

Quick Start

  1. Clone the repo and enter the project directory.

  2. Create a local .env file in the project root and add your Google API key.

  3. Install dependencies with uv sync.

  4. Start the research server.

  5. Start the chatbot in a second terminal and ask a question.

git clone git@github.com:akhileshvj/MCPChatbotForPapers.git
cd MCPChatbotForPapers
uv sync
uv run python research_server.py
uv run python mcp_chatbot.py

Initialize the Project

Clone the repository and move into it:

git clone git@github.com:akhileshvj/MCPChatbotForPapers.git
cd MCPChatbotForPapers

Create and use the virtual environment managed by uv:

uv sync

If you prefer to install from the pinned requirements file instead of pyproject.toml, use:

uv pip install -r requirements.txt

Configure Environment Variables

Create a .env file in the project root and add your Gemini API key:

GOOGLE_API_KEY=your_google_genai_api_key

Keep this file local. It is not meant to be pushed to GitHub.

The chatbot loads environment variables with python-dotenv.

Install Dependencies

If you are starting from a clean environment, install the project dependencies with:

uv sync

That will install the packages listed in pyproject.toml, including:

  • google-genai

  • mcp[cli]

  • python-dotenv

  • arxiv

  • fastapi

  • uvicorn

Run the MCP Research Server

The research server exposes the paper search tools over MCP stdio:

uv run python research_server.py

Run the Chatbot

Start the interactive chatbot in a second terminal:

uv run python mcp_chatbot.py

The chatbot reads server_config.json, launches the configured MCP servers, and then waits for queries at the prompt.

Example Usage

Inside the chatbot, try prompts like:

Search papers about diffusion models
Find recent papers on quantum computing
Look up paper details for a saved paper ID

How It Works

  1. mcp_chatbot.py connects to the MCP servers listed in server_config.json.

  2. Gemini receives the available tool schemas.

  3. When Gemini requests a tool call, the chatbot routes it to the correct MCP server.

  4. research_server.py searches arXiv and stores results under papers/<topic>/papers_info.json.

Notes

  • papers/ is populated automatically when you run searches.

  • If you change server commands in server_config.json, restart the chatbot so it reloads the config.

  • The project currently uses local stdio-based MCP servers, so each server process must be runnable from the repository root.

Troubleshooting

  • If the chatbot cannot connect to Gemini, check that GOOGLE_API_KEY is set in .env.

  • If research_server.py fails to start, make sure arxiv and mcp are installed in the active environment.

  • If you see stale results, delete the relevant folder under papers/ and run the search again.

Available Tools

2 tools
extract_infoA

Search for stored local information about a specific paper by its ID.

Args: paper_id: The unique short ID of the paper.

Inputs: paper_id (required). Returns: result

search_papersC

Search for papers on arXiv based on a topic and store their information.

Inputs: topic (required), max_results. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 2 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: one retrieves stored local information by paper ID, the other searches arXiv for papers by topic. No overlap or ambiguity.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern: 'extract_info' and 'search_papers'. No mixed conventions.

    Tool Count3/5

    With only 2 tools, the server feels under-scoped for a 'Research Server'. More tools like list, delete, or update would be expected, but the count is not extreme.

    Completeness3/5

    The surface covers search and retrieval by ID, but lacks essential operations like listing all stored papers, deleting, or updating entries, leaving notable gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Enables AI assistants to search and retrieve academic papers from arXiv through MCP tools, supporting search by various criteria, detailed paper information, category browsing, and PDF content extraction.
      4
      81 npm
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching arXiv, fetching metadata, reading papers as section-aware Markdown, listing recent papers, and downloading PDFs via five MCP tools.
      5 npm
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to search and access arXiv papers through MCP. Supports paper filtering, downloading, and local storage for efficient access.
      10
      Apache 2.0