Zing Forum

Reading

Research MCP Server: Practice of MCP Architecture for Decoupling Paper Retrieval and LLM Reasoning

A research paper discovery and ingestion tool based on FastMCP, arXiv, and ChromaDB, demonstrating how to migrate from the traditional FastAPI + local LLM architecture to the MCP server architecture to achieve clear separation of retrieval and reasoning.

MCPModel Context ProtocolRAGarXivChromaDBFastMCP论文检索LLM架构FastAPIOllama
Published 2026-06-01 03:15Recent activity 2026-06-01 03:19Estimated read 7 min
Research MCP Server: Practice of MCP Architecture for Decoupling Paper Retrieval and LLM Reasoning
1

Section 01

Research MCP Server Project Guide: Practice of MCP Architecture for Decoupling Retrieval and LLM Reasoning

Research MCP Server is a research paper discovery and ingestion tool based on FastMCP, arXiv, and ChromaDB. This project demonstrates how to migrate from the traditional FastAPI + local LLM architecture to the MCP server architecture, achieving clear separation of retrieval and reasoning. The core value lies in using the MCP protocol to allow professional tools to focus on data acquisition and storage, while LLM reasoning tasks are handled by dedicated hosts (such as Claude Desktop), improving architectural flexibility and resource efficiency.

2

Section 02

Project Background and Evolution

The project initially used FastAPI as the backend service, integrating local LLM reasoning capabilities (via Ollama) to build a complete RAG pipeline: fetching papers from arXiv, downloading PDFs, vectorizing and storing them in ChromaDB, and directly generating answers using the local LLM. With the rise of the MCP protocol, the author completely stripped the LLM reasoning layer to achieve separation of retrieval and reasoning, which represents an important trend in AI application design—allowing each component to focus on its professional domain.

3

Section 03

Core Architecture and Tech Stack

The current architecture uses a layered design: FastMCP as the MCP server framework at the bottom layer, FastAPI providing the HTTP communication layer, ChromaDB responsible for vector storage, Ollama providing embedding model support (LLM reasoning has been removed), langchain-text-splitters handling document chunking, pypdf extracting PDF text, and feedparser parsing arXiv Atom feeds. The tech stack retains data acquisition/storage/retrieval capabilities while removing the resource-intensive reasoning part; the server only exposes retrieval tools for LLM hosts to call, allowing users to flexibly choose their LLM host.

4

Section 04

Features and Usage

Core API endpoints include:

  • /search: Fetch up to 20 papers from arXiv based on keywords;
  • /search/rag: Fetch papers, download PDFs, perform embedding processing, and persist to ChromaDB (supports top_k and wipe_db parameters);
  • /query: Retrieve relevant document fragments from ChromaDB;
  • /wipe and /clear-assets: Clear the vector database and delete downloaded PDFs respectively. Running modes: Development mode (FastMCP CLI + inspector debugging), MCP Inspector UI configuration run, registration to Claude Desktop, FastAPI mode (retains traditional REST experience).
5

Section 05

Storage Design and Data Flow

Storage uses the local file system: automatically creates assets/ (for storing PDFs) and chromaDB/ (for persistent vector database) directories. Data flow: Call /search/rag to populate both directories, then perform semantic retrieval via /query. When wipe_db=true is enabled, the system first releases in-memory database connections and clears data—this is especially important for Windows systems (to avoid ChromaDB file locks preventing deletion).

6

Section 06

Deployment and Dependency Requirements

Deployment dependencies: Python 3.10+, uv package manager, running Ollama instance (only for embedding models, not LLM reasoning). Installation steps: Clone the repository → create a virtual environment → install dependencies via uv. Ollama now only provides embedding capabilities (e.g., nomic-embed-text model), with reasoning transferred to the MCP client, reducing server resource requirements and facilitating deployment in resource-constrained environments.

7

Section 07

Architectural Insights and Practical Value

This project provides a reference for AI application architecture design: it proves the potential of the MCP protocol in modular AI systems—through standardized interfaces, the server (focused on data quality/retrieval efficiency) and LLM host (focused on reasoning/user experience) can evolve independently. For researchers and developers, it is both a practical tool and an excellent case for understanding the MCP architecture paradigm, showing how to modernize the architecture through protocol abstraction while retaining existing technical investments (FastAPI, ChromaDB, etc.), and the incremental evolution strategy is suitable for production environment upgrades.