Skip to main content

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

  1. Chrome not found

    export CHROME_EXECUTABLE_PATH="/path/to/chrome"
    
  2. Session errors

    • Ensure Chrome is properly installed
    • Check if Chrome process is already running
    • Restart the MCP server
  3. 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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

rapidapi_mcp_server-1.3.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rapidapi_mcp_server-1.3.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file rapidapi_mcp_server-1.3.1.tar.gz.

File metadata

  • Download URL: rapidapi_mcp_server-1.3.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for rapidapi_mcp_server-1.3.1.tar.gz
Algorithm Hash digest
SHA256 171280be02fb23d96cef1c66a9a19db2fb4f5405300b961c6efcf5a6ee599eed
MD5 d0ef86fcd33856e0c925da00d9de1bfd
BLAKE2b-256 f9959ad9446d486638c49bfe562864b8958659bcc472e872f56361402c4d4523

See more details on using hashes here.

File details

Details for the file rapidapi_mcp_server-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rapidapi_mcp_server-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06edf05a8528f00c31796f6aa44d3a96d28df0efb21e8a76b89137ede535036c
MD5 01eaf32568f31ef4dce755c7f0163e66
BLAKE2b-256 f7285a0e45b8a1bdc78d48e3c4a850352b0425e0193f601e2b36ed4784d3cb60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page