Get the FREE Ultimate OpenClaw Setup Guide →

apifox

Apifox MCP 服务器 - 让 Claude 等 AI 助手通过自然语言管理你的 Apifox 项目,轻松创建、更新和审计 API 接口

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio iwen-conf-apifox-mcp docker run -i --rm -e APIFOX_TOKEN -e APIFOX_PROJECT_ID apifox-mcp \
  --env APIFOX_TOKEN="your_token_here" \
  --env APIFOX_PROJECT_ID="your_project_id_here"

How to use

This MCP server (Apifox MCP) exposes a natural language interface to manage an Apifox project. You can use it to view, create, update, and delete API endpoints, schemas, folders, and tags, as well as verify the integrity of API definitions. Typical capabilities include listing endpoints and schemas, retrieving details for an endpoint or a schema, creating or updating resources with proper validation, deleting items, and performing configuration checks. The server is designed to be driven by commands like list_api_endpoints, get_api_endpoint_detail, create_api_endpoint, update_api_endpoint, delete_api_endpoint, list_schemas, create_schema, list_folders, and check_apifox_config, enabling you to manage your Apifox project through natural language prompts.

How to install

Prerequisites:

  • Docker installed and available in your PATH (or Python with uv if you prefer local development).
  • Access tokens and project ID for Apifox (APIFOX_TOKEN and APIFOX_PROJECT_ID).

Installation steps (Docker-based):

  1. Build or obtain the Apifox MCP Docker image (if building locally, ensure you have a Dockerfile that packages the MCP server as exexplained in the README): docker build -t apifox-mcp .

  2. Run the MCP server with required environment variables: docker run -i --rm
    -e APIFOX_TOKEN=your_token_here
    -e APIFOX_PROJECT_ID=your_project_id_here
    apifox-mcp

  3. Verify the server is reachable via MCP protocol endpoints (the server will listen for MCP requests and respond accordingly).

Alternative: Local development (uv) setup (if you prefer developing locally):

  1. Ensure Python 3.10+ is installed.
  2. Install dependencies: pip install mcp[cli] requests
  3. Run the server: uv run python -m apifox_mcp.main
  4. Set environment variables as needed (APIFOX_TOKEN, APIFOX_PROJECT_ID) when running the process.

Additional notes

Tips and notes:

  • If you use the Docker method, you can add --env-file to load credentials from a file instead of inline -e flags.
  • Ensure APIFOX_TOKEN has API access permissions for the target project. APIFOX_PROJECT_ID should be the numeric project ID from Apifox.
  • When running locally (uv), consider mounting your project directory to /path/to/apifox-mcp if the code expects local paths.
  • The MCP server relies on Apifox API access; ensure network access to Apifox services is available from your runtime environment.
  • The documentation emphasizes Chinese prompts and fully described schemas; when issuing create/update commands, provide both title and description in Chinese, and ensure each schema field includes a description.

Related MCP Servers

Sponsor this space

Reach thousands of developers