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 서버 도구

📖 설명

이 프로젝트는 SuperiorAPI 에서 플러그인 정의를 동적으로 가져오고 OpenAPI 스키마를 기반으로 MCP 도구 기능을 자동 생성하는 Python 기반 MCP 서버 입니다.

서버는 다음을 수행합니다.

  • 플러그인 메타데이터 가져오기
  • 스키마를 구문 분석합니다
  • 도구 기능을 동적으로 생성합니다
  • MCP 서버 실행

🚀 특징

  • SuperiorAPIs 에서 동적 플러그인 로딩
  • pydantic 모델 및 비동기 함수의 자동 생성
  • aiohttp 사용한 비동기 API 실행
  • 런타임 MCP 도구 등록
  • 환경 기반 구성을 지원합니다
  • UVX 플랫폼 배포 준비 완료

📂 프로젝트 구조

지엑스피1

⚙️ 설치

프로젝트를 복제하고 종속성을 설치합니다.

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

🌍 환경 변수

실행하기 전에 다음 환경 변수를 설정하세요.

리눅스/맥OS

export TOKEN=your_token_here export APPLICATION_ID=your_application_id_here

윈도우 CMD

set TOKEN=your_token_here set APPLICATION_ID=your_application_id_here

🖥️ 사용법

MCP 서버를 실행합니다.

python main.py

서버는 다음을 수행합니다.

  1. SuperiorAPIs에서 플러그인 데이터 가져오기
  2. MCP 도구 기능을 동적으로 생성합니다.
  3. 도구 등록
  4. MCP 서버를 시작합니다

🔗 API 엔드포인트

플러그인 정의는 다음에서 가져옵니다.

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

token 헤더를 통한 승인이 필요합니다.

🧠 생성된 도구 함수 예시

@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. """

📜 요구 사항

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

❗ 오류 처리

API 호출이 실패하거나 status: 0 반환하는 경우 프로그램은 다음과 같이 종료됩니다.

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

📦 포장 (선택 사항)

패키지를 빌드하세요:

python setup.py sdist bdist_wheel

패키지를 설치하세요:

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

Docker를 사용하여 실행(필요한 경우):

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

📄 라이센스

MIT 라이선스(또는 사용자 정의 라이선스)

👨‍💻 저자

귀하의 이름 / 회사
연락처: your_email@example.com

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

SuperiorAPI에서 플러그인 정의를 동적으로 가져오고 OpenAPI 스키마를 기반으로 도구 기능을 자동 생성하는 Python 기반 MCP 서버로, API 서비스와의 원활한 통합을 지원합니다.

  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
                            ID: cmuf6cb6tx