Skip to main content

Apifox Service MCP Integration

Apifox MCP Server can provide Apifox's interface documentation to AI programming-supported IDEs such as Cursor, or other MCP-compatible AI tools.

Developers can accomplish the following tasks through the AI assistant: generate or modify code based on interface documentation, search interface documentation content, etc. As for what more powerful tasks AI can perform using this interface documentation data, please unleash your and your team's imagination.

Deploy MCP Server


Apifox MCP Server supports three different usage scenarios. You can select the corresponding configuration method based on actual needs:

1. Using the API Documentation within the Apifox Project

If you wish to use the API documentation within the Apifox project via MCP, please refer to our configuration method. For specific operations, please refer to the Help Documentation.

Environment Variables

  • Configure APIFOX_ACCESS_TOKEN as the API access token you created on Apifox
  • Configure PROJECTID as the project ID of your project in Apifox

2. Using Publicly Available API Documentation

If you wish to use publicly available API documentation via MCP, please consult our detailed configuration guide. For specific operations, please refer to the Help Documentation.

Environment Variables

  • Configure APIFOX_ACCESS_TOKEN as the API access token you created on Apifox
  • Configure SITEID as the site-id of the document with AI features enabled in your Apifox project

3. Using OpenAPI/Swagger Documentation

If you wish to use OpenAPI/Swagger documentation via MCP, we also provide detailed configuration instructions and can format the documentation. For specific operations, please refer to the Help Documentation

Usage Instructions

Apifox MCP Server Reference Documentation

🗺️ Feature List

Tool IdentifierFunction DescriptionCore Parameters
refresh_project_oasRedownload the latest OpenAPI Spec file content for the specified project-
read_project_oas_ref_resourcesRead the file content of $ref in the OpenAPI Spec file for the specified projectpath
read_project_oasRead the OpenAPI Spec file content for the specified project-

Repository URL

https://github.com/apifox/apifox-mcp-server


🔌 Usage


CloudBase MCP Console

Parameter Description

refresh_project_oas_RandomIdentifier

Redownload the latest OpenAPI Spec file content for the "specified project" from the server

Returns: File content

read_project_oas_ref_resources_RandomIdentifier

Read the file content of $ref in the OpenAPI Spec file for the "specified project", with the ability to retrieve multiple file contents simultaneously

Input ParameterTypeDescription
pathstring[]API documentation path, e.g. /paths/pet{petId}.json, can be obtained from the $ref field in the response of the read_project_oas interface

Returns: File content

read_project_oas_RandomIdentifier

Read the OpenAPI Spec file content for the "specified project"

Returns: File content