Multi-Service MCP Server
Enables searching and accessing ArXiv research papers with advanced query capabilities, and provides sequential thinking tools for structured problem-solving. Supports Boolean operators, field-specific searches, author lookups, and dynamic thought processes through a modular Docker-based architecture.
README
Multi-Service MCP Server
A modular Model Context Protocol (MCP) server that provides scaled access to ArXiv research papers and Sequential Thinking tools for Claude Desktop applications.
🏗️ Architecture
This server uses a clean, modular architecture with tools organized in separate folders:
/Users/brandont/git/mpc/
├── server.py # Main server file
├── services/ # Business logic
│ ├── arxiv_service.py # ArXiv API operations
│ └── sequential_thinking_service.py # Sequential thinking operations
├── tools/ # MCP tools
│ ├── arxiv_tools.py # ArXiv MCP tools
│ └── sequential_thinking_tools.py # Sequential thinking MCP tools
├── utils/ # Shared components
│ └── __init__.py # Base classes & models
├── README.md # Documentation
├── QUICKSTART.md # Quick start guide
├── test_server.py # Test suite
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose setup
├── setup-docker.sh # Docker setup script
├── run_mcp_docker.sh # Docker wrapper for Claude Desktop
├── claude_desktop_config_docker.json # Docker config template
├── requirements.txt # Dependencies
└── .gitignore # Git ignore rules
🐳 Why Docker?
Docker provides several advantages for MCP servers:
✅ Benefits
- No Python Environment Setup: Eliminates virtual environment complexity
- Consistent Environment: Same behavior across all systems
- Easy Installation: Just
docker buildand you're ready - Isolation: No conflicts with system Python packages
- Portability: Works on any system with Docker
- Easy Updates: Rebuild image to update dependencies
🚀 Features
- 8 ArXiv Tools: Search, details, recent papers, author papers, trending categories, advanced search, version support, phrase search
- 3 Sequential Thinking Tools: Dynamic problem-solving, thought revision, branching analysis
- Advanced Query Support: Boolean operators (AND, OR, ANDNOT), field-specific searches, phrase matching
- Enhanced Metadata: Journal references, DOI links, author comments, affiliations, primary categories
- Always Includes URLs: Every paper response includes both ArXiv abstract URL and PDF URL
- Version Support: Access specific versions of papers
- Docker-Based: Containerized deployment for easy setup
- Modular Design: Easy to add new services and tools
- Scalable Architecture: Clean separation of concerns
- Local Operation: Runs entirely on your local machine
- Claude Desktop Integration: Seamlessly integrates with Claude Desktop
📋 Available Tools
ArXiv Tools
search_arxiv- Search papers by query with sorting optionsget_paper_details- Get detailed information about specific papersget_recent_papers- Get recent papers from specific categoriesget_papers_by_author- Get papers by specific authorsget_trending_categories- Get trending categories with paper countsadvanced_search- Multi-field search with Boolean operators and date rangesget_paper_by_version- Get specific versions of paperssearch_by_phrase- Search for exact phrases in titles, abstracts, or authors
Sequential Thinking Tools
sequential_thinking- Dynamic problem-solving through structured thoughtsget_thought_summary- Get summary of current thinking sessionclear_thought_history- Clear thought history and branches
🛠️ Installation
Prerequisites
- Git (to clone the repository)
- Docker (for containerized installation)
🐳 Docker Installation
Quick Setup
-
Clone the repository:
git clone https://github.com/brandont/arxiv-mcp-server.git cd arxiv-mcp-server -
Run the Docker setup script:
chmod +x setup-docker.sh ./setup-docker.sh -
Test the Docker container:
docker run --rm multi-service-mcp-server python test_server.py --test
Manual Setup
-
Clone the repository:
git clone https://github.com/brandont/arxiv-mcp-server.git cd arxiv-mcp-server -
Build the Docker image:
docker build -t multi-service-mcp-server . -
Test the installation:
docker run --rm multi-service-mcp-server python test_server.py --test
🔧 Claude Desktop Integration
-
Locate your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the Docker MCP server configuration:
{ "mcpServers": { "multi-service": { "command": "/path/to/your/multi-service-mcp-server/run_mcp_docker.sh", "args": [] } } }Important: Replace
/path/to/your/multi-service-mcp-serverwith the actual path where you cloned this repository -
Alternative: Use the Docker config file:
# Copy the Docker config and update the path cp claude_desktop_config_docker.json ~/Library/Application\ Support/Claude/claude_desktop_config.json # Then edit the file to add the correct path to run_mcp_docker.sh -
Restart Claude Desktop to load the new MCP server.
Verification
Once configured, you can test the tools in Claude Desktop:
- "Search ArXiv for papers on machine learning"
- "Get details for paper 2301.00001"
- "Show me recent papers in cs.AI"
- "Get papers by author Geoffrey Hinton"
- "What are the trending categories this month?"
- "Advanced search: papers by Yann LeCun in cs.AI category from 2023"
- "Get version 2 of paper 2301.00001"
- "Search for exact phrase 'neural networks' in titles"
🔍 Advanced Search Features
Based on the ArXiv API documentation, this server supports:
Boolean Operators
AND- Combine search termsOR- Find papers matching any termANDNOT- Exclude certain terms
Field-Specific Searches
au:- Author name (e.g.,au:LeCun)ti:- Title keywords (e.g.,ti:neural networks)abs:- Abstract keywords (e.g.,abs:machine learning)cat:- ArXiv category (e.g.,cat:cs.AI)
Phrase Matching
- Use double quotes for exact phrases:
"deep learning"
Date Ranges
- Format:
YYYYMMDD(e.g.,20230101) - Range:
submittedDate:[20230101 TO 20231231]
Example Advanced Queries
# Papers by LeCun about neural networks in AI category
au:LeCun AND ti:neural AND cat:cs.AI
# Recent papers excluding certain categories
submittedDate:[20240101 TO *] ANDNOT cat:cs.CV
# Exact phrase in abstract
abs:"transformer architecture"
🔧 Adding New Tools
The modular architecture makes adding new tools incredibly easy:
Step 1: Add Service Method
# services/arxiv_service.py
def get_papers_by_keyword(self, keyword: str) -> List[PaperInfo]:
"""Get papers containing a specific keyword."""
# Implementation here
pass
Step 2: Add Tool
# tools/arxiv_tools.py
@self.mcp.tool()
async def get_papers_by_keyword(keyword: str) -> str:
"""
Get papers containing a specific keyword.
Args:
keyword: Keyword to search for
Returns:
JSON string containing matching papers
"""
try:
results = self.service.get_papers_by_keyword(keyword)
return json.dumps([paper.model_dump() for paper in results], indent=2)
except Exception as e:
return json.dumps({"error": str(e)})
Step 3: Restart Server
That's it! The tool is automatically registered and available in Claude Desktop.
🏗️ Adding New Services
To add a completely new service (e.g., Weather, News):
Step 1: Create Service
# services/weather_service.py
from utils import BaseService
class WeatherService(BaseService):
def get_name(self) -> str:
return "Weather"
def get_weather(self, city: str) -> dict:
# Weather API logic
pass
Step 2: Create Tool Provider
# tools/weather_tools.py
from utils import BaseToolProvider
class WeatherToolProvider(BaseToolProvider):
def _register_tools(self):
@self.mcp.tool()
async def get_weather(city: str) -> str:
"""Get weather for a city."""
result = self.service.get_weather(city)
return json.dumps(result, indent=2)
Step 3: Register in Main Server
# server.py
from mcp.server.fastmcp import FastMCP
from services.arxiv_service import ArXivService
from services.weather_service import WeatherService
from tools.arxiv_tools import ArXivToolProvider
from tools.weather_tools import WeatherToolProvider
# Create the MCP server
mcp = FastMCP("Multi-Service MCP Server")
# Initialize services and tools
arxiv_service = ArXivService()
arxiv_tools = ArXivToolProvider(mcp, arxiv_service)
weather_service = WeatherService()
weather_tools = WeatherToolProvider(mcp, weather_service)
🧪 Testing
Run the test suite to verify everything works:
docker run --rm multi-service-mcp-server python test_server.py --test
🚨 Troubleshooting
Common Issues
- Claude Desktop not recognizing the server:
- Check that the path in the configuration file points to
run_mcp_docker.sh - Ensure Claude Desktop is restarted after configuration changes
- Verify the wrapper script is executable:
chmod +x run_mcp_docker.sh
- Check that the path in the configuration file points to
- ArXiv API errors:
- Check your internet connection and ArXiv accessibility
- Some queries may fail due to ArXiv API limits
- Docker issues:
- Make sure Docker is installed and running:
docker --version - For Docker daemon issues, restart Docker Desktop
- Ensure the Docker image is built:
docker build -t multi-service-mcp-server .
- Make sure Docker is installed and running:
- Permission errors on setup script:
- Run
chmod +x setup-docker.shto make the script executable
- Run
Getting Help
- Check logs for detailed error information
- Run the test suite to verify functionality:
docker run --rm multi-service-mcp-server python test_server.py --test - Ensure Docker is properly installed and running
- Verify the Docker image is built correctly
📊 Technical Details
- Framework: Built using the official MCP Python SDK
- Architecture: Modular service-based design
- Deployment: Docker containerized
- ArXiv Access: Uses the
arxivPython library - Transport: STDIO transport for Claude Desktop integration
- Tool Definition: Auto-generated from Python type hints and docstrings
📄 License
This project is open source and available under the MIT 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 模型以安全和受控的方式获取实时的网络信息。