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.0.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.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rapidapi_mcp_server-1.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c731b8ac6f8a8541b075c9c3e9c21b3cad7bdf4de1b29ef8869915d0b58a792f
MD5 3267c1b119ce816dc75e005eff0665ee
BLAKE2b-256 d281e9b3332977d09cb582283646ade5ca732b826677dfc419dba07a2389acf3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rapidapi_mcp_server-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1791ce62945697d0341669956c263858c8a8dd274304d3461d7b064d273dd06b
MD5 8cc65515f14c82364749d2406b140857
BLAKE2b-256 247320d028ef3ec225b75900fdbb7489932e0994fd34a679fbc3c29f2b82b5e8

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