Skip to main content

Apifox MCP Server v3 — 基于 MCP 协议的 Apifox API 管理工具,支持动态工具注册

Project description

Apifox MCP v3

  • 基于 MCP 协议的 Apifox API 管理工具 v3。
  • 支持多维工具激活(按域 / 按权限 / 按工具名),80+ 个 MCP 工具覆盖 13 个功能域。
  • 项目处于测试阶段,请不要在重要生产环境使用,或确保项目以安全模式启动。

配置文件

{
  "mcpServers": {
    "apifox": {
      "command": "{下载位置}/ApiFox_MCP/.venv/Scripts/python.exe",
      "args": ["-m", "apifox_mcp.main"],
      "cwd": "{下载位置}/ApiFox_MCP/apifox-mcp-3.0",
      "env": {
        "APIFOX_TOKEN": "你的token",
        "APIFOX_PROJECT_ID": "你的项目id",
        "APIFOX_API_VERSION": "2025-09-01",
        "APIFOX_MCP_MODE": "full",
        "APIFOX_MCP_CLUSTER": "design", //该字段仅在MODE为cluster时有效
        "APIFOX_MCP_CUSTOM_TOOLS": "list_http_apis,get_http_api_detail",
        "APIFOX_PUBLIC_API_BASE": "https://api.apifox.com",
        "APIFOX_MCP_TOOL_TIMEOUT": "3.0",
        "APIFOX_HTTP_TIMEOUT": "30.0",
        "APIFOX_MAX_RETRIES": "2",
        "APIFOX_BRANCH_ID":"",
        "APIFOX_AI_BRANCH":"test_branch"
      }
    }
  }
}

启动模式

项目的启动模式分为以下几种:

full(默认)

全量模式:全量加载项目 80+ 工具。 注意:全量加载后预计本 mcp 上下文长度会达到 20k token,使用之前需考虑 token 消耗。

dynamic

动态模式:启动时仅加载 9 个 Layer 1 核心工具,AI 按需调用 activate_domain 激活 Layer 2 功能域。 支持 readonly 参数:activate_domain("http_api", readonly=True) 仅激活查询工具。

注意:因 MCP 工具通常组装在请求上下文前端,工具列表改变后会导致下次请求大范围缓存失效,建议 AI 在会话开始时一次性加载完成所有所需工具。

cluster

集群模式:通过 APIFOX_MCP_CLUSTER 参数,让 MCP 以预设工作流环境启动。 启动后工具集在整个 session 生命周期内不变,支持零缓存失效。

预设环境

集群 包含域 用途
design http_api(读写), schema(读写), response(读写), doc(读写), environment(只读) 搭建完整 API 文档体系
testing test_case(读写), test_scenario(读写), test_report(读写), http_api(只读), schema(只读), environment(只读), response(只读) 编写测试用例并审查结果,可查询 API 定义但不能修改
review 全部 13 个域(只读) 审查项目当前信息,零写入风险
platform custom_endpoint(读写), websocket(读写), environment(读写), global_param(读写) 管理项目环境与平台参数

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apifox_mcp_community-3.0.0.tar.gz (122.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apifox_mcp_community-3.0.0-py3-none-any.whl (134.3 kB view details)

Uploaded Python 3

File details

Details for the file apifox_mcp_community-3.0.0.tar.gz.

File metadata

  • Download URL: apifox_mcp_community-3.0.0.tar.gz
  • Upload date:
  • Size: 122.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for apifox_mcp_community-3.0.0.tar.gz
Algorithm Hash digest
SHA256 82c6c78e80c28ba44bf5fcea0a161d4c38d7b1e0b2ae49607b3d2db6e17b99b5
MD5 41219ab1b7e47ce81ba250aae414f1f0
BLAKE2b-256 19845bacb2c62100780ddc62451d1d60b3da9dc44c0115969223edf762bc2009

See more details on using hashes here.

File details

Details for the file apifox_mcp_community-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for apifox_mcp_community-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d90ec4fd6c4c2eb907e399951cfd87c7f4d5607342aa4e77cfc98c260ba9137
MD5 c47d8d33e8e8af18a25a0c0ed3db48f5
BLAKE2b-256 46f15a9dc53825d7f1e77552baa8789b4e1a35499a16887f133505b1fd5be141

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page