Skip to main content
Glama

SuperiorAPIs MCP Server Tool

by CTeaminfo

SuperiorAPIs MCP 服务器工具

📖 描述

该项目是一个基于 Python 的MCP 服务器,它从SuperiorAPIs动态获取插件定义并根据 OpenAPI 模式自动生成 MCP 工具功能。

服务器将:

  • 获取插件元数据
  • 解析架构
  • 动态生成工具函数
  • 运行 MCP 服务器

🚀 功能

  • SuperiorAPIs动态加载插件
  • 自动生成pydantic模型和异步函数
  • 使用aiohttp执行异步 API
  • Runtime MCP 工具注册
  • 支持基于环境的配置
  • 准备部署UVX平台

📂 项目结构

. ├── 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

⚙️ 安装

克隆项目并安装依赖项:

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

🌍 环境变量

运行前,设置以下环境变量:

Linux/macOS

export TOKEN=your_token_here export APPLICATION_ID=your_application_id_here

Windows 命令

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

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.

基于 Python 的 MCP 服务器,可从 SuperiorAPIs 动态获取插件定义并根据 OpenAPI 模式自动生成工具功能,从而实现与 API 服务的无缝集成。

  1. 📖 描述
    1. 🚀 功能
      1. 📂 项目结构
        1. ⚙️ 安装
          1. 🌍 环境变量
            1. 🖥️ 使用方法
              1. 🔗 API 端点
                1. 🧠 示例生成的工具函数
                  1. 📜 要求
                    1. ❗ 错误处理
                      1. 📦包装(可选)
                        1. 📄 许可证
                          1. 👨‍💻作者

                            Related MCP Servers

                            • -
                              security
                              A
                              license
                              -
                              quality
                              A Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.
                              Last updated -
                              2
                              39
                              Python
                              MIT License
                              • Linux
                              • Apple
                            • -
                              security
                              A
                              license
                              -
                              quality
                              An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
                              Last updated -
                              2
                              Python
                              MIT License
                            • A
                              security
                              A
                              license
                              A
                              quality
                              A TypeScript-based MCP server that generates API clients from OpenAPI specifications, allowing automated code generation through natural language.
                              Last updated -
                              1
                              64
                              JavaScript
                              MIT License
                              • Apple
                            • -
                              security
                              A
                              license
                              -
                              quality
                              An MCP server that enables dynamic tool registration and execution based on API definitions, providing seamless integration with services like Claude.ai and Cursor.ai.
                              Last updated -
                              7
                              Python
                              MIT License
                              • Apple

                            View all related MCP servers

                            MCP directory API

                            We provide all the information about MCP servers via our MCP API.

                            curl -X GET 'https://glama.ai/api/mcp/v1/servers/CTeaminfo/mcp-superiorapis'

                            If you have feedback or need assistance with the MCP directory API, please join our Discord server