Skip to main content

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

Project description

Apifox MCP Community

基于 MCP 协议的 Apifox API 管理工具。

  • 🧩 80+ MCP 工具,覆盖 13 个功能域
  • 多维工具激活 — 按域 / 按权限 / 按工具名灵活加载
  • 📦 pip install 即用,无需手动配置路径

⚠️ 本项目非 Apifox 官方 MCP。 项目 API 信息来源于官方 MCP 工具与个人实践总结。官方工具请访问 Apifox 官方 MCP


📦 安装

要求:Python 3.11+

pip install apifox-mcp-community

安装后在 MCP 客户端中填入 下方配置


⚙️ 配置文件

  • 实际使用时请删除 JSON 中的注释。
  • 实测可在Claude code以及Trae中正常使用,若其他Code Agent中启动失败请让Ai改为兼容的格式。
{
  "mcpServers": {
    "apifox_mcp_community": {
      "command": "python",
      "args": ["-m", "apifox_mcp.main"],
      "env": {
        "APIFOX_TOKEN": "你的token",
        "APIFOX_PROJECT_ID": "你的项目id",
        "APIFOX_API_VERSION": "2026-05-28",
        "APIFOX_MCP_MODE": "full", // mcp启动模式,决定了模型会加载哪些工具
        "APIFOX_MCP_CLUSTER": "design", // 仅在MODE为cluster时有效
        "APIFOX_PUBLIC_API_BASE": "https://api.apifox.com",
        "APIFOX_MCP_TOOL_TIMEOUT": "10.0", // 工具超时时间,防止mcp内部问题无法返回阻塞对话
        "APIFOX_HTTP_TIMEOUT": "30.0",
        "APIFOX_MAX_RETRIES": "2",
        "APIFOX_AI_BRANCH": "" // Ai-branch名称,为空则默认不开启,编辑直接在main分支进行
        // 实际使用时请删除以上注释
      }
    }
  }
}

获取认证信息

Token

进入 Apifox → 右上角头像 → 账号设置 → API 访问令牌 → 新建

项目 ID

项目设置 → 通用设置 → 点击项目 ID 即可复制


启动模式

详细工具清单见 GitHub 仓库 docs/modes/

Full(默认)

全量加载 80+ 工具。约 20k token 上下文。

Dynamic

启动时加载 9 个核心工具,AI 按需激活后续功能域:

activate_domain("http_api", readonly=True)

Cluster

预设工作流环境,工具集 session 内不变,零缓存失效。

集群 包含域 用途
design http_api / schema / response / doc / environment 搭建 API 文档体系
testing test_case / test_scenario / test_report + 只读域 编写测试用例并审查
review 全部 13 个域(只读) 审查项目,零写入风险
platform custom_endpoint / websocket / environment / global_param 管理环境与平台参数


License

MIT © ChenShi

详见 GitHub 仓库

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.1.tar.gz (122.5 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.1-py3-none-any.whl (134.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apifox_mcp_community-3.0.1.tar.gz
  • Upload date:
  • Size: 122.5 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.1.tar.gz
Algorithm Hash digest
SHA256 68cfcb6716e286ac52a4a2f11de0f97c1771290d6a9eb68f9cba89f77bce8977
MD5 cce5cab175b74153cd2c0e0c6e88698c
BLAKE2b-256 0c8321d72510524dcbc62fb0a8ad82bb133d67fb56e62c90d4c2bae118d53f5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apifox_mcp_community-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e3208c04187fd03b5857410d4035e53bd7cbcda81b1d599d00fb77631c55d3
MD5 970a2563183ac331ac3d0a53da6179b1
BLAKE2b-256 b41d43f023c6064ba13ebc529ad1fd026f28c715823b7218b3cd1abd1e2e7ff9

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