Apifox MCP Server

Apifox MCP Server

apifox-mcp-server•byapifox

An MCP server that supplies AI coding IDEs with Apifox project API documentation, or with Swagger/OAS file data, as a data source.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Reads all interface documentation data from an Apifox project and caches it locally so AI can access it via MCP.
  • •Can read Swagger/OAS files directly instead of an Apifox project.
  • •Supports multiple Apifox projects by adding multiple MCP server configurations with different project IDs.
  • •Supports privately deployed Apifox servers through an API base URL parameter.

BEST FOR

  • •Generating or modifying code from API documentation with an AI assistant.
  • •Adding new documentation fields to existing DTOs and generating MVC code for endpoints.
  • •Adding comments to class fields based on API documentation.

ABOUT APIFOX-MCP-SERVER

Apifox MCP Server is cataloged as an MCP server attributed to apifox. An MCP server that supplies AI coding IDEs with Apifox project API documentation, or with Swagger/OAS file data, as a data source. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Apifox MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does Apifox MCP Server keep documentation data up to date automatically?

Documentation data is cached locally by default; if the data in Apifox is updated, the AI must be told to refresh the documentation data, otherwise it may read stale data.

Can it read Swagger/OAS files instead of an Apifox project?

Yes, besides Apifox projects it also supports reading Swagger/OAS files directly.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 7fa0e3fa7ec0 · 采集于 2026-11-13 09:29:08 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Apifox MCP Server

使用 Apifox MCP Server,可以将 Apifox 项目内的接口文档作为数据源提供给 Cursor 等支持 AI 编程的 IDE 工具以便让 AI 能够直接访问项目对应的接口文档数据。

开发者可以通过 AI 助手完成以下工作:根据接口文档生成或修改代码、搜索接口文档内容等等,至于通过这个接口文档数据能让 AI 干什么更多更强大的活,请发挥你和你们团队的想象力😜

🎯 如何使用

安装配置好 MCP 后,Apifox MCP Server 会自动读取 Apifox 整个项目里的所有接口文档的数据并缓存在本地电脑,AI 可以通过 MCP 读取项目内所有的接口的接口文档数据。

你只要告诉 AI 你想要通过 API 文档做什么即可,示例:

  1. “通过 MCP 获取 API 文档,然后生成 Product 及其相关模型的定义代码”
  2. “根据 API 文档,在 Product DTO 里添加 API 文档新增的几个字段”
  3. “根据 API 文档给 Product 类的每个字段都加上注释”
  4. “根据 API 文档,生成接口 /users 相关的所有 MVC 代码”

注意:接口文档数据默认是会缓存在本地的,如果 Apifox 内的数据有更新,请告诉 AI 刷新接口文档数据,否则 AI 读到的数据可能不是最新的。

🚀 安装方法

前置条件

  • 已安装 Node.js 环境(版本号 >= 18,推荐最新的 LTS 版本)
  • 任意一个支持 MCP 的 IDE:
    • Cursor
    • VSCode + Cline 插件

安装

  1. 在 Apifox 生成 Access Token a. 打开 Apifox,将鼠标悬停在页面右上角的头像上,点击 “账号设置 -> API 访问令牌” b. 创建新的 API 访问令牌,详见帮助文档 c. 拿到 API 访问令牌,替换下面配置文件中的 <access-token>
  2. 获取 Apifox 项目 ID a. 打开 Apifox 里对应的项目 b. 在左侧边栏点击“项目设置”,在“基本设置”页面即可复制项目 ID c. 拿到项目 ID,替换下面配置文件中的 <project-id>
  3. 配置 IDE

将下面 JSON 配置添加到 IDE 对应的 MCP 配置文件里:

{
  "mcpServers": {
    "API 文档": {
      "command": "npx",
      "args": [
        "-y",
        "apifox-mcp-server@latest",
        "--project-id=<project-id>"
      ],
      "env": {
        "APIFOX_ACCESS_TOKEN": "<access-token>"
      }
    }
  }
}

如果使用 Windows 操作系统,而上文的配置文件无法正常工作,请使用如下配置文件:

{
  "mcpServers": {
    "API 文档": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "apifox-mcp-server@latest",
        "--project-id=<project-id>"
      ],
      "env": {
        "APIFOX_ACCESS_TOKEN": "<access-token>"
      }
    }
  }
}
  • Cursor:添加到全局的 ~/.cursor/mcp.json 或项目内的 .cursor/mcp.json
  • Cline:打开 Cline 面板 > MCP Server > Configure MCP Server

注意:

  1. 请将上面的 <access-token> 和 <project-id> 替换为你个人的 Apifox API 访问令牌和 Apifox 项目 ID。
  2. 配置文件里 MCP Server 名字建议填写类似“API 文档”或“xxx API 文档”这样的包含“API文档”字眼的名称,这样 AI 更容易正确的识别这个 MCP Server 的用途。不建议填写“Apifox”或“Apifox MCP”,这种写法 AI 不容易识别用途。
  3. 如果需要使用到多个项目的 API 文档,在配置文件里添加配置多个 MCP Server 即可(不同项目有不同的<project-id>), MCP Server 的名字填写“xxx API 文档”。
  4. 如果团队习惯将 MCP 配置文件同步到代码仓库里,建议删除配置里的"APIFOX_ACCESS_TOKEN": "<access-token>",改成每个成员在自己电脑里配置名为 APIFOX_ACCESS_TOKEN 的环境变量,以避免 APIFOX_ACCESS_TOKEN 泄漏问题。
  5. 使用私有化部署版本的用户,请在 IDE 的 MCP 的配置文件添加参数:"--apifox-api-base-url=<私有化部署服务器的 API 地址,以 http:// 或 https:// 开头>"。另外,请确保网络可以正常访问 www.npm.com。
  6. 除了 Apifox 项目之外,也支持直接读取 Swagger/OAS 文件,请删除 "--project-id=<project-id>" 参数,添加 "--oas=<oas-url-or-path>" 参数。如:npx apifox-mcp-server --oas https://petstore.swagger.io/v2/swagger.json 或 npx apifox-mcp-server --oas ~/data/petstore/swagger.json

❓帮助与支持

Apifox MCP Server 还在内测阶段,欢迎各位给我们提建议和想法,请加内测群:

QR Code

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Apifox MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/apifox-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools