Skip to main content
Glama

Apifox MCP Server

npm version

一个基于 Stdio 实现的模型上下文协议 (Model Context Protocol) 服务器,旨在无缝桥接 AI 助手与 Apifox 平台的 API 数据。

允许 AI 助手通过标准化的协议直接、实时地获取和理解您在 Apifox 项目中定义的 API 接口详情,从而显著提升开发效率和代码生成质量。

✨ 功能特性

工具

  • get_api_endpoint_info - 获取 Apifox 的接口定义信息

    • 请求参数

      • projectId: Apifox 项目的唯一标识符。

      • endpointId: 目标 API 端点的唯一标识符。

    • 返回数据

      • 一个结构化的 JSON 对象,包含完整的 API 规约 (Specification),例如:

        • HTTP 请求方法 (Method)

        • 求头 (Request Headers)

        • 路径、查询及请求体参数 (Parameters: Path, Query, Body)

        • 响应体结构 (Response Body Schema)

        • 响应头 (Response Headers)

Related MCP server: Apidog MCP Server

🚀 安装配置

要在 Cursor 中使用此服务器,请添加以下服务器配置:

{
  "mcpServers": {
    "Apifox-MCP": {
      "command": "npx",
      "args": ["@juzi965/apifox-mcp-server"],
      "env": {
        "APIFOX_AUTH": "..."
      }
    }
  }
}

环境变量

该服务器需要以下环境变量:

  • APIFOX_AUTH: Apifox 的认证令牌

💡 使用方法

复制协作链接到 Cursor 中,让它帮你完成

  • 入参的 TS 类型定义

  • 出参的 TS 类型定义

  • 接口调用方法的定义

🛠️ 调试

由于 MCP 服务器通过标准输入输出(stdio)通信,调试可能比较困难。我们推荐使用MCP Inspector,可通过以下命令启动:

npm run inspector

Inspector 将提供一个 URL,可在浏览器中访问调试工具。

Available Tools

1 tool
get_api_endpoint_infoA

Inputs: projectId (required), endpointId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no risk of confusion with other tools. The tool's purpose is clearly defined and distinct by default.

    Naming Consistency5/5

    With a single tool, naming consistency is inherently perfect. The name 'get_api_endpoint_info' follows a clear verb_noun pattern and accurately describes its function.

    Tool Count3/5

    The server has only one tool, which is on the thin side for a typical API integration. While the tool is not trivial, a more comprehensive set (e.g., listing projects or endpoints) would be expected for this domain.

    Completeness2/5

    The tool provides a single operation without supporting tools for discovery or listing of projects/endpoints. Agents must already know the projectId and endpointId, which creates a significant gap for autonomous workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to automatically manage Apifox API documentation by importing OpenAPI/Swagger specifications and exporting existing API structures. Supports batch operations, intelligent deprecation marking, and smart scope detection for partial module imports.
      2
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI tools to search and explore API documentation from Apidog projects or OpenAPI/Swagger specifications, providing endpoint details, schemas, and project statistics through natural language queries.
      1
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to query API documentation from Eolink Apikit instances via the Eolink Open API, supporting listing projects, groups, searching APIs by keyword/path, and retrieving detailed API definitions.
      6
      14 npm
      MIT