Provides tools for fetching recent arXiv papers by topic and retrieving paper abstracts by arXiv ID.
Enables Google Gemini LLM to call MCP tools through an interactive agent interface.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@arXiv MCP Serverfetch recent papers on quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
fastmcplibrary 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
Clone and install dependencies:
git clone https://github.com/kmkarakaya/mcp_tutorial.git; cd mcp_tutorial pip install -r requirements.txtStart the MCP server (local):
python 4_mcp_server.pyThe 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/inspectorNote:
npxcomes with npm (or use Corepack on newer Node versions). Install Node.js from https://nodejs.org/ if you don't havenode/npmon your system.Run the example client to call a tool programmatically:
python 5_mcp_client.pyStart an interactive Gemini-based agent that can call MCP tools (requires Google GenAI credentials):
python 6_mcp_gemini_agent.pyWhen using the Gemini agent, set your environment variables per
google-genaidocs (e.g.,GOOGLE_API_KEYor equivalent) before running.
Docker
Dockerfiles/examples are included. Example build/run:
docker build -t mcp_server .
docker run -p 8000:8000 mcp_serverTools 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 amcp.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.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.