arXiv MCP Server

arXiv MCP Server

Enables searching and retrieving arXiv papers by topic, fetching abstracts by paper ID, and saving markdown content to files. Includes examples of integrating MCP tools with Google Gemini for AI-powered paper research.

Category
Visit Server

README

MCP Tutorial

Overview

This repository demonstrates a small MCP (Model Context Protocol) ecosystem built around FastMCP. It contains a sample MCP server exposing tools (arXiv fetch, abstract retrieval, save-markdown) and example clients: a simple FastMCP client and a Google Gemini-integrated agent. The code is intended as a practical tutorial and reference for running and testing an MCP server locally, integrating it with LLMs (Gemini), and using the MCP Inspector for interactive exploration.

Key points:

  • Server uses the fastmcp library to define and expose tools.
  • Client examples show how to call tools programmatically and how to attach an LLM (Gemini) to MCP tools.
  • Includes Docker-ready server and agent examples for containerized testing.

Quick start

  1. Clone and install dependencies:

    git clone https://github.com/kmkarakaya/mcp_tutorial.git; cd mcp_tutorial
    pip install -r requirements.txt
    
  2. Start the MCP server (local):

    python 4_mcp_server.py
    

    The server exposes tools and listens for client connections (default behavior provided by FastMCP).

Usage and examples

  • Inspect available tools with the official MCP Inspector (requires Node.js and npm or Corepack installed):

    npx @modelcontextprotocol/inspector
    

    Note: npx comes with npm (or use Corepack on newer Node versions). Install Node.js from https://nodejs.org/ if you don't have node/npm on your system.

  • Run the example client to call a tool programmatically:

    python 5_mcp_client.py
    
  • Start an interactive Gemini-based agent that can call MCP tools (requires Google GenAI credentials):

    python 6_mcp_gemini_agent.py
    

    When using the Gemini agent, set your environment variables per google-genai docs (e.g., GOOGLE_API_KEY or equivalent) before running.

Docker

Dockerfiles/examples are included. Example build/run:

docker build -t mcp_server .
docker run -p 8000:8000 mcp_server

Tools implemented in the server

  • fetch_arxiv_papers(topic: str, number_of_papers: int = 3) — fetches recent arXiv papers for a topic.
  • get_arxiv_abstract(arxiv_id: str) — retrieves an arXiv paper abstract.
  • save_md_to_file(text: str, filename: str) — saves given markdown to ./reports.

Dependencies

See requirements.txt. Important packages:

  • fastmcp
  • google-genai (for Gemini integration)
  • uvicorn (if you run the server via ASGI)

Notes

  • The server file (4_mcp_server.py) prints helpful messages when functions are called and includes a mcp.run() entry point.
  • Use the MCP Inspector to verify tool metadata and try calls interactively.

A full video tutorial and repository walkthrough is available on the Murat Karakaya Akademi YouTube channel (live recording): https://youtube.com/live/c7yl0GS2mJQ?feature=share

Author

Murat Karakaya
Website
LinkedIn
YouTube

Acknowledgments

Based on MCP work and examples; thanks to Anthropic, OpenAI, and contributors to the MCP ecosystem.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured