Apifox MCP Server

by apifox

92 stars
473 downloads
Not rated
GitHub

Description

# Apifox MCP Server 使用 Apifox MCP Server,可以将 Apifox 项目内的接口文档作为数据源提供给 Cursor 等支持 AI 编程的 IDE 工具以便让 AI 能够直接访问项目对应的接口文档数据。 开发者可以通过 AI 助手完成以下工作:根据接口文档生成或修改代码、搜索接口文档内容等等,至于通过这个接口文档数据能让 AI 干什么更多更强大的活,请发挥你和你们团队的想象力😜 ## 🎯 如何使用 安装配置好 MCP 后,Apifox MCP Server 会自动读取 Apifox…

About

# Apifox MCP Server 使用 Apifox MCP Server,可以将 Apifox 项目内的接口文档作为数据源提供给 Cursor 等支持 AI 编程的 IDE 工具以便让 AI 能够直接访问项目对应的接口文档数据。 开发者可以通过 AI 助手完成以下工作:根据接口文档生成或修改代码、搜索接口文档内容等等,至于通过这个接口文档数据能让 AI 干什么更多更强大的活,请发挥你和你们团队的想象力😜 ## 🎯 如何使用 安装配置好 MCP 后,Apifox MCP Server 会自动读取 Apifox 整个项目里的所有接口文档的数据并缓存在本地电脑,AI 可以通过 MCP 读取项目内所有的接口的接口文档数据。…

Details

Author
apifox
GitHub stars
92
Downloads
473
Categories
Developer Tools, API, Knowledge Base, Other

- Automatically reads all API docs from an entire Apifox project
- Caches API documentation data locally on your computer
- Provides API documentation data to AI via the Model Context Protocol
- Supports direct reading of Swagger/OAS files
- Supports multiple project API documentation configurations

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Apifox MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js 18+, generate an Apifox access token, obtain a project ID, then add the MCP configuration JSON to your IDE's MCP configuration file (e.g., ~/.cursor/mcp.json or Cline's MCP Server settings).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

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

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

安装配置好 MCP 后,Apifox MCP Server 会自动读取 Apifox 整个项目里的所有接口文档的数据并缓存在本地电脑,AI 可以通过 MCP 读取项目内所有的接口的接口文档数据。
- “通过 MCP 获取 API 文档,然后生成 Product 及其相关模型的定义代码”
- “根据 API 文档,在 Product DTO 里添加 API 文档新增的几个字段”
- “根据 API 文档给 Product 类的每个字段都加上注释”
- “根据 API 文档,生成接口 /users 相关的所有 MVC 代码”

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

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

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

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

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

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

A TypeScript MCP server to access Apifox API data via Stdio.

A tool to retrieve API interface information from YApi, with authentication configurable via environment variables.

Clix MCP Server for assisting Clix SDK/API integrations with semantic search across Clix docs and SDK source (iOS, Android, Flutter, React Native).

Check software end-of-life (EOL) dates and support status using the endoflife.date API to provide accurate lifecycle and security information.

Fetches API information from Feishu OpenAPI for seamless integration and management within an IDE.

Unified MCP server for Ignite UI — documentation, API, and CLI scaffolding

Provides educational content, model information, and read-only API interactions for Lerian developers.

Interact with an MCP registry to check health, list entries, and get server details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.