MCP server for automated product search and price comparison across multiple marketplaces with integrated license management
Project description
Offers Check Marketplaces MCP Server
A powerful MCP (Model Context Protocol) server for automated product search and price comparison across multiple marketplaces with integrated license management.
Features
- 🔍 Multi-marketplace Search: Search products across multiple e-commerce platforms
- 💰 Price Comparison: Automated price comparison and analysis
- 📊 Statistics & Analytics: Comprehensive reporting and data analysis
- 🗄️ Database Management: SQLite-based data storage with async operations
- 🔐 License Management: Integrated license verification system
- 🌐 Web Scraping: Playwright-based web scraping capabilities
- 📈 Excel Integration: Import/export data from Excel files
- 🚀 High Performance: Async/await architecture for optimal performance
Supported Marketplaces
- Komus (komus.ru) - Office supplies and stationery
- VseInstrumenti (vseinstrumenti.ru) - Tools and equipment
- Ozon (ozon.ru) - Universal marketplace
- Wildberries (wildberries.ru) - Consumer goods
- OfficeMag (officemag.ru) - Office supplies
Installation
From PyPI
pip install offers-check-marketplaces
From Source
git clone https://github.com/yourusername/offers-check-marketplaces-mcp.git
cd offers-check-marketplaces-mcp
pip install -e .
Quick Start
1. Basic Usage
# Run in STDIO mode (for MCP clients)
offers-check-marketplaces
# Run in SSE mode (web server)
offers-check-marketplaces --sse --host 0.0.0.0 --port 8000
2. MCP Configuration
Add to your MCP client configuration (e.g., .cursor/mcp.json or .kiro/settings/mcp.json):
{
"mcpServers": {
"offers_check_marketplaces": {
"command": "offers-check-marketplaces",
"env": {
"LICENSE_KEY": "your-license-key-here"
}
}
}
}
3. Environment Variables
# Set license key
export LICENSE_KEY="your-license-key-here"
# Optional: Set custom API endpoint
export API_BASE_URL="https://your-api-endpoint.com"
MCP Tools
The server provides the following MCP tools:
Core Tools
search_products- Search for products across marketplacesget_product_details- Get detailed product information and pricesget_product_list- List all products from databaseget_statistics- Generate comprehensive statistics
Data Management Tools
save_product_prices- Save found prices to databaseupdate_all_prices- Batch update prices for multiple products
License Management Tools
check_license_status- Check current license statusset_license_key- Set new license key
Usage Examples
Search Products
# Using MCP client
result = await mcp_client.call_tool("search_products", {
"model_name": "Полотно техническое БЯЗЬ ОТБЕЛЕННАЯ ГОСТ"
})
Get Product Details
# Get detailed information about a product
result = await mcp_client.call_tool("get_product_details", {
"product_code": 195385.0
})
Generate Statistics
# Get comprehensive statistics
result = await mcp_client.call_tool("get_statistics", {})
Configuration
License Configuration
The system requires a valid license key. You can provide it through:
- Environment variable:
LICENSE_KEY=your-key - MCP configuration: Set in the
envsection of your MCP config - Configuration file:
data/.license_config.json
Data Directory
The system creates a data/ directory for:
- SQLite database (
products.db) - License cache (
.license_cache.json) - Excel files for import/export
Development
Setup Development Environment
git clone https://github.com/yourusername/offers-check-marketplaces-mcp.git
cd offers-check-marketplaces-mcp
# Install with development dependencies
pip install -e ".[dev]"
Running Tests
# Run all tests
pytest
# Run specific test files
python test_license_integration.py
python test_mcp_license_tools.py
python test_final_integration.py
Building Package
# Install build tools
pip install build twine
# Build package
python -m build
# Upload to PyPI (requires credentials)
twine upload dist/*
Architecture
Components
- Server (
server.py) - Main MCP server with tool implementations - License Manager (
license_manager.py) - License verification and management - Database Manager (
database_manager.py) - SQLite database operations - Search Engine (
search_engine.py) - Multi-marketplace search coordination - Data Processor (
data_processor.py) - Excel file processing - Statistics Generator (
statistics.py) - Analytics and reporting - Error Handling (
error_handling.py) - Comprehensive error management
Data Flow
- Input: Excel files with product specifications
- Processing: Search products across marketplaces
- Storage: Save results to SQLite database
- Analysis: Generate statistics and comparisons
- Output: Updated Excel files with prices and analysis
API Reference
Search Products
search_products(model_name: str) -> dict
Search for products across multiple marketplaces.
Parameters:
model_name(str): Product model name to search for
Returns:
- Dictionary with search results from different marketplaces
Get Product Details
get_product_details(product_code: float) -> dict
Get detailed information about a specific product.
Parameters:
product_code(float): Unique product code from database
Returns:
- Dictionary with product details and price analysis
Error Handling
The system includes comprehensive error handling:
- License Errors: Invalid or missing license keys
- Network Errors: Marketplace connectivity issues
- Database Errors: SQLite operation failures
- Validation Errors: Invalid input parameters
All errors are logged and return user-friendly messages.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Documentation: GitHub Repository
- Issues: Bug Tracker
- License: Contact support for license-related questions
Changelog
v0.1.0
- Initial release
- Multi-marketplace product search
- Price comparison and analysis
- Integrated license management
- MCP server implementation
- Excel data processing
- SQLite database storage
- Comprehensive error handling
Made with ❤️ for automated marketplace analysis
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file offers_check_marketplaces_mcp_2025-0.1.0.tar.gz.
File metadata
- Download URL: offers_check_marketplaces_mcp_2025-0.1.0.tar.gz
- Upload date:
- Size: 681.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b93d233b4079eb954bb44c67bddf74929b05d0101cac9a1ebd603227c13e3dd8
|
|
| MD5 |
20b139e4288ec0b17d81171e743c54fa
|
|
| BLAKE2b-256 |
a6a6adecc08f8d89bbb348b0daeb4052e2c7403fb420f65d22737898b2dff54d
|
File details
Details for the file offers_check_marketplaces_mcp_2025-0.1.0-py3-none-any.whl.
File metadata
- Download URL: offers_check_marketplaces_mcp_2025-0.1.0-py3-none-any.whl
- Upload date:
- Size: 66.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3967a396dbe36420a9bf08d125e077e9cc9f90ed093c771561f178fa844fb16
|
|
| MD5 |
a8db88a4aa525c72a88c9268807de237
|
|
| BLAKE2b-256 |
d5a05550fa6b500b46dc401249aa1de4343d54cc2af63b82ab869bbb86468958
|