Research MCP Server
A local, rule-based MCP server for searching and analyzing academic papers from arXiv. Enables paper search, ranking, smart summarization, keyword extraction, and citation generation without API keys or LLM calls.
README
Research MCP Server
A local, rule-based research assistant for searching and analyzing academic papers from arXiv. No API keys, no LLM calls — just Python standard libraries, the arxiv package, FastMCP for the MCP server, and keyword-frequency heuristics.
Available as both a CLI tool and a Model Context Protocol (MCP) server for Cursor, Claude Desktop, and other MCP clients.
Features
| Module | Description |
|---|---|
| Search | Fetch top N papers from arXiv by query |
| Ranking | Score papers by query-word frequency in title + abstract |
| Smart Summary | Pick the 2 most query-relevant sentences (no AI) |
| Keyword Extraction | Top 5 unique keywords (length > 6, stopwords removed) |
| Citation Generator | Author1, Author2 (Year). Title. format |
| Logging | INFO-level logging via Python logging module |
| Validation | Query length and empty-input checks |
| Empty Results | Graceful handling when no papers match |
Project Structure
mcp_server_paper/
├── research.py # Core engine (search, rank, summarize, keywords, citations)
├── main.py # CLI entry point
├── mcp_server.py # MCP server (stdio transport)
├── requirements.txt # Python dependencies
├── tests/
│ ├── test_research.py # Unit tests (mocked, no network)
│ └── test_integration.py # CLI + MCP tool integration tests
└── README.md
Requirements
- Python 3.10+
- Internet connection (for arXiv fetch only)
- Dependencies:
arxiv,fastmcp,pytest(seerequirements.txt)
Installation
git clone <your-repo-url>
cd mcp_server_paper
pip install -r requirements.txt
CLI Usage
Search arXiv and print formatted results:
python main.py --query "AI agents"
Options:
| Flag | Description | Default |
|---|---|---|
--query, -q |
Search query (required) | — |
--max-results, -n |
Number of papers to fetch | 5 |
Example:
python main.py --query "transformer attention" --max-results 3
Example Output
🔍 Query: AI agents
📊 Total papers found: 5
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📄 Paper 1: A cybersecurity AI agent selection and decision support framework
🧠 Summary:
This paper presents a novel, structured decision support framework...
🔑 Keywords:
framework, cybersecurity, learning, standards, industry
📚 Citation:
Masike Malatji (2025). A cybersecurity AI agent selection and decision support framework.
🔗 Link:
http://arxiv.org/abs/2510.01751v1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MCP Server Usage
The MCP server exposes paper search and analysis as tools over stdio transport, compatible with Cursor and Claude Desktop.
Start the server manually
python mcp_server.py
The server reads JSON-RPC from stdin and writes responses to stdout. Do not print debug output to stdout when running in MCP mode — logs go to stderr.
Configure in Cursor
Add to your Cursor MCP settings (Settings → MCP → Add new global MCP server or edit ~/.cursor/mcp.json):
{
"mcpServers": {
"research-papers": {
"command": "python",
"args": ["C:/mcp_server_paper/mcp_server.py"]
}
}
}
Use the absolute path to mcp_server.py on your machine.
Configure in Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"research-papers": {
"command": "python",
"args": ["/absolute/path/to/mcp_server_paper/mcp_server.py"]
}
}
}
Available MCP Tools
| Tool | Description |
|---|---|
search_papers |
Full pipeline: search arXiv, rank, summarize, extract keywords, generate citations |
summarize_text |
Extract top 2 query-relevant sentences from arbitrary text |
get_keywords |
Extract top N keywords from text using rule-based filtering |
create_citation |
Generate a bibliographic citation from authors, year, and title |
Tool: search_papers
query: str — Search terms (e.g. "AI agents")
max_results: int — Papers to fetch (default 5, max 20)
Returns formatted text with all paper details.
Tool: summarize_text
text: str — Source text (e.g. abstract)
query: str — Query terms for relevance scoring
Tool: get_keywords
text: str — Source text
top_n: int — Number of keywords (default 5)
Tool: create_citation
authors: list[str] — Author names
year: str — Publication year
title: str — Paper title
How It Works
1. Search (search_arxiv)
Queries the arXiv API via the arxiv Python library, fetching title, authors, published year, abstract, and link for each result.
2. Ranking (rank_papers)
Tokenizes the query into words and counts how often each word appears in title + summary. Papers are sorted descending by total score.
3. Smart Summary (smart_summary)
Splits the abstract into sentences, scores each sentence by query-word presence, and returns the top 2.
4. Keyword Extraction (extract_keywords)
- Removes punctuation
- Keeps words with length > 6
- Filters a manually defined stopword set
- Returns the top 5 by frequency
5. Citation Generator (generate_citation)
Formats: Author1, Author2, and Author3 (2025). Paper Title.
Testing
Install dependencies, then run the full test suite:
pip install -r requirements.txt
pytest tests/ -v
Test coverage
| File | What it tests |
|---|---|
tests/test_research.py |
Unit tests for ranking, summarization, keywords, citations, validation (mocked arXiv — no network) |
tests/test_integration.py |
CLI subprocess tests (live arXiv) + MCP tool function tests |
Run only fast unit tests (no network):
pytest tests/test_research.py -v
Run live integration tests (requires network):
pytest tests/test_integration.py -v
Architecture
flowchart TD
CLI[main.py CLI] --> RE[research.py]
MCP[mcp_server.py MCP] --> RE
RE --> ARXIV[arXiv API]
RE --> RANK[rank_papers]
RE --> SUM[smart_summary]
RE --> KW[extract_keywords]
RE --> CITE[generate_citation]
Both entry points share the same research.py engine. The CLI prints formatted output to stdout; the MCP server returns the same formatted strings as tool results over stdio JSON-RPC.
Constraints
- No OpenAI or external AI APIs
- No transformers or ML models
- No API keys required
- Everything runs locally except the arXiv network fetch
License
MIT (or your preferred license)
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。