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.
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
- Configure APIFOX_ACCESS_TOKEN as the API access token you created on Apifox
- Configure OAS as the remote URL of the Swagger/OpenAPI file (e.g., https://petstore.swagger.io/v2/swagger.json)
Usage Instructions
Apifox MCP Server Reference Documentation
🗺️ Feature List
Tool Identifier | Function Description | Core Parameters |
---|---|---|
refresh_project_oas | Redownload the latest OpenAPI Spec file content for the specified project | - |
read_project_oas_ref_resources | Read the file content of $ref in the OpenAPI Spec file for the specified project | path |
read_project_oas | Read the OpenAPI Spec file content for the specified project | - |
Repository URL
https://github.com/apifox/apifox-mcp-server
🔌 Usage
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 Parameter | Type | Description |
---|---|---|
path | string[] | 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