SuperiorAPIs MCP Server Tool

by CTeaminfo
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Used for making asynchronous HTTP requests to external APIs, enabling the MCP server to fetch data from SuperiorAPIs endpoints.

  • Provides containerization support for the MCP server, allowing for consistent deployment across different environments with proper environment variable configuration.

  • Supported as a runtime environment for the MCP server, with specific environment variable setup instructions provided.

SuperiorAPIs MCP Server Tool

šŸ“– Description

This project is a Python-based MCP Server that dynamically fetches plugin definitions from SuperiorAPIs and auto-generates MCP tool functions based on OpenAPI schemas.

The server will:

  • Fetch plugin metadata
  • Parse the schema
  • Generate tool functions dynamically
  • Run the MCP server

šŸš€ Features

  • Dynamic plugin loading from SuperiorAPIs
  • Auto-generation of pydantic models and async functions
  • Asynchronous API execution using aiohttp
  • Runtime MCP tool registration
  • Supports environment-based configuration
  • Ready for UVX platform deployment

šŸ“‚ Project Structure

. ā”œā”€ā”€ main.py # MCP server core logic ā”œā”€ā”€ requirements.txt # Python dependency list ā”œā”€ā”€ setup.py # Packaging setup ā”œā”€ā”€ Dockerfile # (Optional) Docker container build file ā””ā”€ā”€ README.md # Project documentation

āš™ļø Installation

Clone the project and install the dependencies:

git clone https://your-repo-url.git cd your-repo pip install -r requirements.txt

šŸŒ Environment Variables

Before running, set the following environment variables:

Linux/macOS

export TOKEN=your_token_here export APPLICATION_ID=your_application_id_here

Windows CMD

set TOKEN=your_token_here set APPLICATION_ID=your_application_id_here

šŸ–„ļø Usage

Run the MCP server:

python main.py

The server will:

  1. Fetch plugin data from SuperiorAPIs
  2. Dynamically generate MCP tool functions
  3. Register the tools
  4. Start the MCP server

šŸ”— API Endpoint

Plugin definitions are fetched from:

https://superiorapis-creator.cteam.com.tw/manager/module/plugins/list_v2

Authorization is required via the token header.

šŸ§  Example Generated Tool Function

@mcp.tool() async def post_example_tool(param1: Optional[str] = None, param2: Optional[int] = None) -> str: """ Tool description | API summary. # Args: param1 (string, optional): Description of param1. param2 (integer, optional): Description of param2. # Returns: 200 (object): API response. """

šŸ“œ Requirements

aiohttp>=3.8.6 pydantic>=2.5.3 mcp-sdk>=0.1.0

ā— Error Handling

If the API call fails or returns status: 0, the program will exit with:

āŒ Error: API returned no data or status is 0. Please check if the API is working properly.

šŸ“¦ Packaging (Optional)

Build the package:

python setup.py sdist bdist_wheel

Install the package:

pip install dist/mcp-superiorapis-1.0.0-py3-none-any.whl

Run using Docker (if needed):

docker build -t superiorapis-mcp . docker run -e TOKEN=your_token -e APPLICATION_ID=your_app_id superiorapis-mcp

šŸ“„ License

MIT License (or your custom license)

šŸ‘Øā€šŸ’» Author

Your Name / Your Company
Contact: your_email@example.com

-
security - not tested
F
license - not found
-
quality - not tested

A Python-based MCP server that dynamically fetches plugin definitions from SuperiorAPIs and auto-generates tool functions based on OpenAPI schemas, enabling seamless integration with API services.

  1. šŸ“– Description
    1. šŸš€ Features
      1. šŸ“‚ Project Structure
        1. āš™ļø Installation
          1. šŸŒ Environment Variables
            1. šŸ–„ļø Usage
              1. šŸ”— API Endpoint
                1. šŸ§  Example Generated Tool Function
                  1. šŸ“œ Requirements
                    1. ā— Error Handling
                      1. šŸ“¦ Packaging (Optional)
                        1. šŸ“„ License
                          1. šŸ‘Øā€šŸ’» Author