RapidAPI marketplace discovery and assessment MCP server using undetected-chromedriver for anti-bot detection bypass
Project description
RapidAPI Discovery MCP Server
A Model Context Protocol (MCP) server that provides comprehensive RapidAPI marketplace discovery and analysis capabilities using undetected-chromedriver for reliable web scraping that bypasses anti-bot detection.
🌟 Features
- API Search: Search for APIs by keyword and category across RapidAPI marketplace
- API Assessment: Detailed analysis of specific APIs including ratings, pricing, and endpoints
- API Documentation: Extract comprehensive documentation and endpoint details
- API Comparison: Side-by-side comparison of multiple APIs with key metrics
- Pricing Analysis: Detailed pricing plans and tier limits extraction
- Enhanced Documentation: GraphQL-enhanced endpoint details and comprehensive API docs
- Anti-Detection: Uses undetected-chromedriver to reliably bypass bot detection systems
🚀 Quick Start
Prerequisites
- Python 3.8+
- Chrome/Chromium browser
- Git
Installation
Option 1: Install from PyPI (Recommended)
pip install rapidapi-mcp-server
Option 2: Development Installation
# Clone the repository
git clone https://github.com/andrewlwn77/rapidapi-mcp-server.git
cd rapidapi-mcp-server
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
Configuration
Add to your Claude Desktop .mcp.json:
Option 1: Using PyPI Installation
{
"mcpServers": {
"rapidapi-discovery": {
"command": "rapidapi-mcp-server",
"env": {
"CHROME_EXECUTABLE_PATH": "/opt/google/chrome/google-chrome"
}
}
}
}
Option 2: Using Python Module
{
"mcpServers": {
"rapidapi-discovery": {
"command": "python",
"args": ["-m", "rapidapi_mcp_server.server"],
"env": {
"CHROME_EXECUTABLE_PATH": "/opt/google/chrome/google-chrome"
}
}
}
}
Option 3: Development Installation
{
"mcpServers": {
"rapidapi-discovery": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "rapidapi_mcp_server.server"],
"cwd": "/path/to/rapidapi-mcp-server",
"env": {
"CHROME_EXECUTABLE_PATH": "/opt/google/chrome/google-chrome"
}
}
}
}
🛠️ Available Tools
1. Search APIs (search_apis)
Search for APIs in the RapidAPI marketplace by keyword and optional category.
Parameters:
query(required): Search query for APIs (e.g., 'weather', 'crypto', 'news')maxResults(optional): Maximum number of results to return (1-50, default: 20)category(optional): Category filter
Example:
mcp__rapidapi-discovery__search_apis(query="weather", maxResults=10)
2. Assess API (assess_api)
Get comprehensive assessment of a specific API including ratings, pricing, endpoints, and documentation.
Parameters:
apiUrl(required): The RapidAPI URL for the specific API
Example:
mcp__rapidapi-discovery__assess_api(apiUrl="https://rapidapi.com/weatherapi/api/weatherapi-com")
3. Get API Documentation (get_api_documentation)
Extract documentation URLs and endpoint information for a specific API.
Parameters:
apiUrl(required): The RapidAPI URL for the specific API
4. Compare APIs (compare_apis)
Compare multiple APIs side by side with key metrics.
Parameters:
apiUrls(required): Array of RapidAPI URLs to compare (2-5 APIs)
5. Get Pricing Plans (get_pricing_plans)
Extract detailed pricing plans and tier limits for a specific API.
Parameters:
apiUrl(required): The RapidAPI URL for the specific API
6. Get Enhanced API Documentation (get_enhanced_api_documentation)
Extract comprehensive API documentation with GraphQL-enhanced endpoint details.
Parameters:
apiUrl(required): The RapidAPI URL for the specific API
🏗️ Architecture
Core Components
- server.py: Main MCP server implementation with JSON-RPC over stdio
- chrome_client.py: Chrome automation using undetected-chromedriver
- pyproject.toml: Project configuration and dependencies
Key Features
- Undetected Chrome: Uses undetected-chromedriver for reliable bot detection bypass
- Session Management: Efficient Chrome session handling with automatic cleanup
- Error Handling: Comprehensive error handling with detailed error messages
- Async Support: Full async/await support for concurrent operations
- MCP Protocol: Compatible with MCP v1.0.0+ protocol
🧪 Testing
Run the server in development mode:
# Activate virtual environment
source venv/bin/activate
# Run server directly
python -m rapidapi_mcp_server.server
# Test with simple MCP client
python -c "
import asyncio
import json
from rapidapi_mcp_server.server import serve
async def test():
# Server will run on stdio
pass
asyncio.run(test())
"
📊 Sample Output
Search Results
{
"query": "weather",
"resultsCount": 5,
"apis": [
{
"name": "WeatherAPI",
"description": "Real-time weather data and forecasts",
"provider": "WeatherAPI.com",
"url": "https://rapidapi.com/weatherapi/api/weatherapi-com",
"rating": 4.8,
"popularity": "High"
}
]
}
API Assessment
{
"name": "WeatherAPI.com",
"rating": 4.8,
"reviewCount": 15420,
"popularity": "Very High",
"pricing": {
"free": {
"requests": 1000000,
"rateLimit": "1 req/sec"
}
},
"endpoints": [
{
"name": "Current Weather",
"method": "GET",
"description": "Get real-time weather data"
}
]
}
🔧 Environment Variables
CHROME_EXECUTABLE_PATH: Path to Chrome executable (default: auto-detect)CHROME_HEADLESS: Run Chrome in headless mode (default: true)CHROME_TIMEOUT: Chrome operation timeout in seconds (default: 30)
🚨 Troubleshooting
Common Issues
-
Chrome not found
export CHROME_EXECUTABLE_PATH="/path/to/chrome"
-
Session errors
- Ensure Chrome is properly installed
- Check if Chrome process is already running
- Restart the MCP server
-
Import errors
# Ensure virtual environment is activated source venv/bin/activate pip install -e .
📁 Project Structure
rapidapi-mcp-server-py/
├── src/
│ └── rapidapi_mcp_server/
│ ├── __init__.py
│ ├── server.py # Main MCP server
│ └── chrome_client.py # Chrome automation
├── pyproject.toml # Project configuration
├── README.md # This file
└── .gitignore # Git ignore rules
🤝 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.
🙏 Acknowledgments
- undetected-chromedriver: For reliable anti-detection capabilities
- MCP Protocol: For standardized AI tool integration
- Selenium WebDriver: For browser automation foundations
- RapidAPI: For providing the comprehensive API marketplace
📞 Support
- GitHub Issues: Report bugs or request features
- Documentation: This README and inline code documentation
- Examples: See the tool examples above for usage patterns
Note: This server requires a valid internet connection and Chrome browser installation. The server uses web scraping techniques that comply with RapidAPI's terms of service for automated access.
Project details
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 rapidapi_mcp_server-1.2.0.tar.gz.
File metadata
- Download URL: rapidapi_mcp_server-1.2.0.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eea7de85feed3b4990ad429ee4b3e81f0c84a421c989f9eaf60f477e5367bccc
|
|
| MD5 |
73af8218912c1b73f5f1c826a696e6f0
|
|
| BLAKE2b-256 |
e516de4c3e289691ba9d33b3504f355b4008a667a81e4fb8ea614eeb4ef7b124
|
File details
Details for the file rapidapi_mcp_server-1.2.0-py3-none-any.whl.
File metadata
- Download URL: rapidapi_mcp_server-1.2.0-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb3b274f755700f34c255f0da3d5505e58750538866961317e1651d68be17e1
|
|
| MD5 |
572ae6553573cc0a75b34f960ea10467
|
|
| BLAKE2b-256 |
f2db9c3f0d982eab78b920a699779fa4230515895ceb9f8f23d2e511100fd1bd
|