Skip to main content
Glama
brandontomlin2

Multi-Service MCP Server

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

Related MCP server: arXiv MCP Server

๐Ÿณ 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 build and 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

  1. search_arxiv - Search papers by query with sorting options

  2. get_paper_details - Get detailed information about specific papers

  3. get_recent_papers - Get recent papers from specific categories

  4. get_papers_by_author - Get papers by specific authors

  5. get_trending_categories - Get trending categories with paper counts

  6. advanced_search - Multi-field search with Boolean operators and date ranges

  7. get_paper_by_version - Get specific versions of papers

  8. search_by_phrase - Search for exact phrases in titles, abstracts, or authors

Sequential Thinking Tools

  1. sequential_thinking - Dynamic problem-solving through structured thoughts

  2. get_thought_summary - Get summary of current thinking session

  3. clear_thought_history - Clear thought history and branches

๐Ÿ› ๏ธ Installation

Prerequisites

  • Git (to clone the repository)

  • Docker (for containerized installation)

๐Ÿณ Docker Installation

Quick Setup

  1. Clone the repository:

    git clone https://github.com/brandont/arxiv-mcp-server.git
    cd arxiv-mcp-server
  2. Run the Docker setup script:

    chmod +x setup-docker.sh
    ./setup-docker.sh
  3. Test the Docker container:

    docker run --rm multi-service-mcp-server python test_server.py --test

Manual Setup

  1. Clone the repository:

    git clone https://github.com/brandont/arxiv-mcp-server.git
    cd arxiv-mcp-server
  2. Build the Docker image:

    docker build -t multi-service-mcp-server .
  3. Test the installation:

    docker run --rm multi-service-mcp-server python test_server.py --test

๐Ÿ”ง Claude Desktop Integration

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. 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-server with the actual path where you cloned this repository

  3. 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
  4. 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 terms

  • OR - Find papers matching any term

  • ANDNOT - 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

  1. 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

  2. ArXiv API errors:

    • Check your internet connection and ArXiv accessibility

    • Some queries may fail due to ArXiv API limits

  3. 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 .

  4. Permission errors on setup script:

    • Run chmod +x setup-docker.sh to make the script executable

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 arxiv Python 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.

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables searching and retrieving academic papers from arXiv by various criteria including title, author, and category, with support for extracting full text content from PDFs.
    4
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables searching and retrieving academic papers from arXiv with support for advanced filtering by author, category, and date, plus full paper content extraction.
    6
    14
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to search arXiv's research repository, download papers, and access their content programmatically. Includes specialized prompts for comprehensive academic paper analysis covering methodology, results, and implications.
    4
    3
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables agents to search, analyze, and explore arXiv academic papers with advanced multi-field search, author lookup, category browsing, citation extraction, and bibliography export.
    45
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.

  • Search arXiv and ACL Anthology, retrieve citations and references, and browse web sources to accelโ€ฆ

  • Search arXiv, fetch paper metadata, and read full-text content.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brandontomlin2/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server