Apifox MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Apifox MCP ServerImport OpenAPI spec from https://example.com/openapi.json"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apifox MCP Server
A Model Context Protocol (MCP) server for Apifox API management with read/write/import capabilities, based on Apifox Open API.
Features
Read Operations
apifox_get_project- Get project detailsapifox_get_folders- Get folder list (directory structure)apifox_get_endpoints- Get API endpoint listapifox_get_endpoint- Get endpoint detailsapifox_get_schemas- Get data model listapifox_export_openapi- Export as OpenAPI format
Write Operations
apifox_create_folder- Create folderapifox_create_endpoint- Create API endpointapifox_update_endpoint- Update API endpointapifox_delete_endpoint- Delete API endpointapifox_create_schema- Create data model
Import Operations
apifox_import_openapi- Import OpenAPI/Swagger dataapifox_import_openapi_from_url- Import OpenAPI data from URL
Related MCP server: Apifox MCP
Installation
From npm
npm install -g apifox-mcp-serverFrom source
git clone https://github.com/lishuji/apifox-mcp-server.git
cd apifox-mcp-server
npm install
npm run buildConfiguration
1. Get API Access Token
Login to Apifox
Click avatar in top right → Account Settings
Click "API Access Token" → Create new token
Save the generated token
2. Get Project ID
Open your Apifox project
The number in the project URL is the project ID, e.g.,
4051641inhttps://apifox.com/project/4051641
3. Configure MCP Client
Add to your MCP client configuration (e.g., ~/.codebuddy/mcp.json for CodeBuddy):
{
"mcpServers": {
"Apifox": {
"command": "npx",
"args": [
"apifox-mcp-server",
"--project=YOUR_PROJECT_ID"
],
"env": {
"APIFOX_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Or if installed globally:
{
"mcpServers": {
"Apifox": {
"command": "apifox-mcp-server",
"args": [
"--project=YOUR_PROJECT_ID"
],
"env": {
"APIFOX_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Usage Examples
Import OpenAPI Data
// Read local OpenAPI file content
const spec = fs.readFileSync('openapi.yaml', 'utf-8');
// Call import tool
apifox_import_openapi({
spec: spec,
targetFolderId: 12345, // Target folder ID
coverExistApi: true, // Overwrite existing APIs
syncFolder: true // Sync folder structure
});Create Endpoint
apifox_create_endpoint({
name: "Get User List",
method: "GET",
path: "/api/v1/users",
folderId: 12345,
description: "Paginated user list",
tags: ["User Management"]
});Create Folder
apifox_create_folder({
name: "User APIs",
parentId: 0 // 0 means root directory
});API Reference
apifox_import_openapi
Import OpenAPI/Swagger specification data.
Parameters:
Parameter | Type | Required | Description |
spec | string | Yes | OpenAPI spec content (JSON/YAML) |
targetFolderId | number | No | Target folder ID, default 0 (root) |
coverExistApi | boolean | No | Overwrite existing APIs, default true |
coverExistSchema | boolean | No | Overwrite existing schemas, default true |
syncFolder | boolean | No | Sync folder structure, default true |
apifox_create_endpoint
Create a new API endpoint.
Parameters:
Parameter | Type | Required | Description |
name | string | Yes | Endpoint name |
method | string | Yes | HTTP method (GET, POST, PUT, DELETE, PATCH) |
path | string | Yes | Endpoint path |
folderId | number | No | Parent folder ID |
description | string | No | Endpoint description |
tags | string[] | No | Tag list |
Notes
API Version: Uses
X-Apifox-Api-Version: 2024-03-28headerAuthentication: Bearer Token authentication
Rate Limiting: Be aware of Apifox API rate limits
Permissions: Ensure token has sufficient project operation permissions
Related Links
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be deployed
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for AI access to Swagger by SmartBear.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol (MCP) server for Selise Blocks Cloud integration
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that enables accessing and managing ApiFox API information through the Model Context Protocol, supporting both HTTP services and CLI commands.36 npm3ISC
- AlicenseCqualityCmaintenanceAn MCP server that integrates Apifox API documentation with AI assistants, allowing AI to extract and understand API information from Apifox projects.225 npmISC
- AlicenseAqualityBmaintenanceA server that enables management of ApiPost API documentation and team collaboration through the Model Context Protocol, supporting complete interface management directly from compatible editors.842MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for YApi that enables developers to search, view, create, and update API definitions directly from MCP-compatible IDEs.2MIT