MCP Bootstrap Research Server
Provides tools to search arXiv papers and extract metadata, enabling AI assistants to access academic research papers via the Model Context Protocol.
README
MCP Bootstrap
A minimal, runnable project for learning the Model Context Protocol (MCP) — the open standard that lets AI apps discover and call tools from external servers.
You get both sides of the wire:
| File | Role | What it does |
|---|---|---|
research_server.py |
MCP Server | Exposes search_papers and extract_info tools |
mcp_chatbot.py |
MCP Client / Host | Starts the server, lists tools, lets Gemini call them |
main.py |
Helper | Prints a quick map of the project |
How MCP fits together
┌─────────────────┐ stdio (JSON-RPC) ┌──────────────────┐
│ Host / Client │ ◄──────────────────────────────► │ MCP Server │
│ mcp_chatbot.py │ list_tools / call_tool │ research_server │
│ + Gemini LLM │ │ • search_papers │
└─────────────────┘ │ • extract_info │
└──────────────────┘
- The host starts the server as a subprocess (
stdiotransport). - It calls
list_tools— the server returns schemas for each@mcp.tool(). - Those schemas are given to the LLM as function declarations.
- When the model wants data, the host runs
call_toolon the MCP session and feeds the result back.
Same server can also be plugged into Cursor or Claude Desktop — that’s the point of the protocol.
Prerequisites
- Python 3.11+
- uv (recommended) or pip + venv
- A free Gemini API key
Install uv (if you don’t have it)
# macOS / Linux
brew install uv
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Setup
1. Clone the repo
git clone <your-repo-url>
cd mcp_project # or whatever you named the folder
2. Configure your API key
cp .env.example .env
Open .env and set:
GEMINI_API_KEY=your_key_here
3. Install packages
Option A — uv (recommended)
uv sync
This creates a virtualenv (.venv) and installs everything from pyproject.toml:
| Package | Why it’s needed |
|---|---|
mcp |
MCP client + FastMCP server SDK |
google-genai |
Gemini API for the chatbot host |
arxiv |
Search papers in search_papers |
python-dotenv |
Load .env for the API key |
Option B — pip + venv
python -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows
# .venv\Scripts\activate
pip install -U pip
pip install mcp google-genai arxiv python-dotenv
Run the full demo (client + server)
With uv:
uv run mcp_chatbot.py
With pip / activated venv:
python mcp_chatbot.py
You’ll see lines like → MCP tool: search_papers(...) when the LLM decides to use a tool.
Try these questions
Copy-paste any of these after the chatbot starts:
Search papers (search_papers)
Find 3 papers about transformers
Search for 5 papers on reinforcement learning
Find recent papers about quantum computing
Search arXiv for graph neural networks, max 2 results
What papers exist on attention mechanisms in NLP?
Look up a paper (extract_info)
Tell me about paper 1706.03762
What is the summary of paper 1706.03762?
Who are the authors of paper 1706.03762?
Give me the title and PDF link for paper 1706.03762
Combine both tools
Search for papers on transformers, then summarize the first one
Find 3 physics papers and tell me what the first paper is about
Search for algorithms papers and list their titles
Tip: run a search first so papers are cached under
papers/, then ask about a specific paper ID from the results.
Or just print the project map:
uv run main.py
# or: python main.py
Run the server alone
Useful when connecting from Cursor / Claude Desktop:
uv run research_server.py
# or: python research_server.py
This process speaks MCP over stdin/stdout. Don’t type into it manually — a host drives it.
Cursor / Claude Desktop config example
Add something like this to your MCP settings (adjust the path):
{
"mcpServers": {
"research": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/mcp_project",
"run",
"research_server.py"
]
}
}
}
Tools exposed by the server
search_papers(topic, max_results=5)
Queries arXiv, caches metadata under papers/<topic>/papers_info.json, returns paper IDs.
extract_info(paper_id)
Looks up a cached paper by ID across all topic folders.
Project layout
.
├── research_server.py # MCP server (tools)
├── mcp_chatbot.py # MCP client + Gemini tool loop
├── main.py # Quick orientation
├── papers/ # Local cache created by search_papers
├── .env.example # Copy → .env (never commit secrets)
├── mcp_config.example.json # Sample Cursor / Claude Desktop MCP config
├── pyproject.toml
├── LICENSE
└── README.md
Learning path
- Read
research_server.py— how FastMCP registers tools. - Read
mcp_chatbot.py— connect →list_tools→ LLM →call_tool. - Run the chatbot and watch tool calls print in the terminal.
- Point Cursor at the same server and ask the same questions in the IDE.
Notes
- Generated paper caches live in
papers/(gitignored except.gitkeep). - Keep secrets in
.envonly —.envis gitignored. - Default model is
gemini-2.5-flash; override withGEMINI_MODELin.env.
License
MIT — use this as a learning starter for your own MCP servers.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。