myownipgit_RapidAPI-MCP

MCP.Pizza Chef: MCP-Mirror

myownipgit_RapidAPI-MCP is an MCP server that interfaces with the RapidAPI Global Patent API to fetch and manage patent data. It features a robust SQLite database integration for efficient patent data storage and retrieval. The server implements advanced patent scoring metrics including pscore, cscore, lscore, and tscore to evaluate patents comprehensively. It also includes rate limiting and error handling to ensure reliable and scalable operation. This server is ideal for developers building AI workflows that require real-time access to structured patent information and scoring within the MCP ecosystem.

Use This MCP server To

Fetch patent data from RapidAPI Global Patent API Store and query patent information in SQLite database Score patents using advanced metrics (pscore, cscore, lscore, tscore) Integrate patent data into AI workflows via MCP Handle rate limiting and errors for API requests

README

RapidAPI MCP Server

This repository contains an implementation of an MCP Server for interfacing with the RapidAPI Global Patent API and storing patent data in a SQLite database.

Features

  • RapidAPI Global Patent API integration
  • MCP Server implementation for handling patent requests
  • SQLite database integration for patent data storage
  • Advanced patent scoring system (pscore, cscore, lscore, tscore)
  • Rate limiting and error handling

Installation

Using Conda (Recommended)

  1. Clone the repository:
git clone https://github.com/myownipgit/RapidAPI-MCP.git
cd RapidAPI-MCP
  1. Create and activate conda environment:
# Create environment from yml file
conda env create -f environment.yml

# Activate environment
conda activate rapidapi-mcp

Alternatively, you can create the environment manually:

# Create new environment with Python 3.11
conda create -n rapidapi-mcp python=3.11

# Activate environment
conda activate rapidapi-mcp

# Install required packages
conda install -c conda-forge requests aiohttp python-dotenv pytest
pip install rapidapi-connect
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your settings

Usage

  1. Initialize the MCP Server:
from patent_mcp.server import MCPPatentServer

mcp_server = MCPPatentServer()
  1. Handle patent search requests:
search_request = {
    'command': 'search',
    'params': {
        'query': 'quantum computing',
        'date_range': '2004-2024',
        'page': 1,
        'per_page': 100
    }
}

results = await mcp_server.handle_patent_request(search_request)

Testing

To run the tests, activate your conda environment and run:

# Run the connection test
python tests/test_connection.py

# Run all tests with pytest
python -m pytest tests/

Project Structure

  • patent_mcp/ - Main package directory
    • client.py - RapidAPI client implementation
    • server.py - MCP Server implementation
    • database.py - SQLite database operations
    • scoring.py - Patent scoring system
    • __init__.py - Package initialization
  • docs/ - Documentation
    • SCORING.md - Detailed scoring methodology
  • examples/ - Example scripts
  • tests/ - Unit tests

Requirements

  • Python 3.11 or higher
  • Required packages are listed in environment.yml

Scoring System

The system implements a comprehensive patent scoring methodology:

  • Patent Score (pscore): Overall patent strength
  • Citation Score (cscore): Citation impact analysis
  • Legal Score (lscore): Legal status evaluation
  • Technology Score (tscore): Technical complexity assessment

See SCORING.md for detailed information.

Configuration

The server uses the following environment variables:

  • RAPIDAPI_KEY: Your RapidAPI API key
  • DB_PATH: Path to SQLite database (optional, defaults to ./patents.db)
  • Additional configuration options in .env

Rate Limits

The RapidAPI service has the following limits:

  • 1000 requests per day
  • 500000 hard limit

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

myownipgit_RapidAPI-MCP FAQ

How do I install the myownipgit_RapidAPI-MCP server?
Clone the GitHub repo, then create and activate the conda environment using the provided environment.yml file or manually with Python 3.11.
What database does this MCP server use for patent data?
It uses SQLite for efficient local storage and querying of patent data.
How does the server handle API rate limits?
It includes built-in rate limiting and error handling to manage RapidAPI request quotas and ensure stable operation.
Can I use this MCP server with different LLM providers?
Yes, it is provider-agnostic and can be integrated with models like OpenAI GPT-4, Anthropic Claude, and Google Gemini.
What patent scoring metrics are supported?
The server supports pscore, cscore, lscore, and tscore for comprehensive patent evaluation.
Is there documentation on how to use the patent scoring system?
The GitHub repository includes details on the scoring system and how to interpret the scores.
Does the server support concurrent patent requests?
Yes, it is designed to handle multiple requests with proper rate limiting and error management.
What programming language is used for this MCP server?
The server is implemented in Python, compatible with Python 3.11 environments.