Developer Installation¶
Set Up Your Development Environment
This guide covers the complete setup process for developers who want to run RivalSearchMCP locally, contribute to the codebase, or customize the server.
Prerequisites¶
System Requirements¶
- Python: 3.8 or higher
- Git: Latest version
- Memory: At least 2GB RAM
- Storage: 1GB free space
Python Version Check¶
Step 1: Clone the Repository¶
Step 2: Set Up Virtual Environment¶
Create Virtual Environment¶
Activate Virtual Environment¶
Step 3: Install Dependencies¶
Install from Requirements¶
Install Development Dependencies¶
pip install -r requirements-dev.txt # If available
pip install black isort flake8 pylint # Code quality tools
Step 4: Verify Installation¶
Check Python Path¶
Test Import¶
Step 5: Run the Development Server¶
Start Server¶
Test with MCP Client¶
Configuration¶
Environment Variables¶
export RIVAL_SEARCH_DEBUG=true
export RIVAL_SEARCH_LOG_LEVEL=DEBUG
export RIVAL_SEARCH_MAX_WORKERS=4
Configuration File¶
Create config/local.py
for local development:
Development Tools¶
Code Quality¶
Testing¶
# Run all tests
python -m pytest
# Run specific test file
python -m pytest tests/test_search.py
# Run with coverage
python -m pytest --cov=src
Type Checking¶
Troubleshooting¶
Common Issues¶
Import Errors¶
# Make sure virtual environment is activated
source .venv/bin/activate
# Check Python path
which python
Dependency Issues¶
# Upgrade pip
pip install --upgrade pip
# Clear cache and reinstall
pip cache purge
pip install -r requirements.txt
Permission Issues¶
Debug Mode¶
Next Steps¶
- API Reference - Understand the codebase
- Contributing Guide - Start contributing
Getting Help¶
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check other developer guides