Cover image
Try Now
2025-04-03

基于 MCP 协议的获取 Apifox 接口信息的服务

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

ApiFox MCP Server

这是一个基于 Model Context Protocol (MCP) 的 ApiFox 接口服务器,用于获取和管理 ApiFox 的接口信息。通过在 Cursor 中配置 MCP 服务,获取对应接口模块信息返回给大模型,让 Cursor 通过接口信息帮助你实现业务逻辑。

功能特点

  • 支持通过 MCP 协议获取 ApiFox 接口信息
  • 提供 HTTP 服务和 CLI 命令行两种使用方式
  • 使用 TypeScript 开发,提供类型安全
  • 支持环境变量配置

快速安装使用


npx @wangmhaha/apifox-mcp-server@latest --apifox-api-key=<your-apifox-api-key> --project=<your-project-id>

配置 cursor 通过 sse 连接到 MCP 服务器

服务器将在配置的端口上启动(默认 3000)。

"apifox-mcp-server": {
    "url": "http://localhost:3000/sse",
  }

推荐通过使用配置文件 JSON 配置

可以通过在 cursor mcp 配置文件中添加以下内容来配置 apifox-mcp-server 服务器:

 "apifox-mcp-server": {
    "command": "npx",
    "args": ["-y", "@wangmhaha/apifox-mcp-server@latest", "--local"],
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  }

或者从本地源运行

拉取代码安装依赖

pnpm install

打包

pnpm build

运行

pnpm start:http

配置:

"apifox-mcp-server": {
    "url": "http://localhost:3000/sse",
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  }

也可通过 command 模式运行

"apifox-mcp-server": {
    "command": "node",
    "args": [
      "<you-local-path>/build/index.js",
      "--local",
    ],
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  },

如在不在 MCP 配置文件中配置 env 环境变量,请在本地环境变量配置

在项目根目录下修改.evn.example 文件为.env 文件,配置以下环境变量:

APIFOX_API_KEY=your_api_key_here
PROJECT_ID=your_project-ID
PORT=3000  # 可选,默认为 3000

技术栈

  • Node.js
  • TypeScript
  • Express.js
  • Model Context Protocol SDK
  • Zod(数据验证)

许可证

ISC License

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

  • deemkeen
  • Contrôlez votre MBOT2 avec un combo d'alimentation: MQTT + MCP + LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocole de connecteur de message) 服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

    Reviews

    3 (1)
    Avatar
    user_cSZ9LNOm
    2025-04-16

    My MCP Server Ratio by business24ai is a game-changer for efficient server management. The user-friendly interface combined with powerful features makes it a top choice for businesses. Highly recommend checking it out at https://mcp.so/server/my-mcp-server-ratio/business24ai!