Apifox
Enables AI assistants to fetch and understand API endpoint definitions from Apifox projects in real-time. Supports retrieving complete API specifications including request methods, parameters, headers, and response schemas to improve development effi
What is Apifox?
Apifox is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to fetch and understand api endpoint definitions from apifox projects in real-time. supports retrieving complete api specifications including request methods, parameters, headers...
Enables AI assistants to fetch and understand API endpoint definitions from Apifox projects in real-time. Supports retrieving complete API specifications including request methods, parameters, headers, and response schemas to improve development effi
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables AI assistants to fetch and understand API endpoint d
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx apifox-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Apifox
Apifox MCP Server connects AI coding assistants to Apifox API management projects, giving them real-time access to complete API specifications including request methods, parameters, headers, body schemas, and response definitions. Developers use it to let their AI assistant read live API documentation when generating code, adding type annotations, creating model definitions, or building integrations — eliminating the need to manually copy-paste API specs into prompts. It also supports Swagger/OpenAPI Specification URLs as an alternative to Apifox project IDs, making it compatible with any team using OAS-based API documentation.
Prerequisites
- Node.js and npx installed (for running the server via npx)
- An Apifox account with at least one project, or a Swagger/OpenAPI Specification URL
- An Apifox access token generated from Apifox account settings → API Access
- Your Apifox project ID from the project settings page
- An MCP client such as Claude Desktop, Cursor, or Cline
Generate your Apifox access token
Log in to Apifox, go to your account settings, find the API Access section, and generate a personal access token. Copy this token — you will use it as APIFOX_ACCESS_TOKEN.
Find your Apifox project ID
Open the Apifox project you want the AI to access. The project ID is visible in the project settings page or in the URL of the project dashboard.
Add the server to your MCP client configuration
Edit your MCP client config (e.g. ~/.cursor/mcp.json or claude_desktop_config.json) to add the Apifox server with your access token and project ID.
{
"mcpServers": {
"apifox": {
"command": "npx",
"args": ["-y", "apifox-mcp-server@latest", "--project-id=YOUR_PROJECT_ID"],
"env": {
"APIFOX_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Restart your MCP client
Restart Claude Desktop, Cursor, or your chosen client so it registers the Apifox server and starts caching the API documentation locally.
Optional: use a Swagger/OAS URL instead of a project ID
If your team uses Swagger or OpenAPI Specification files instead of Apifox projects, you can point the server at an OAS URL or local file path using the --oas flag.
{
"mcpServers": {
"apifox": {
"command": "npx",
"args": ["-y", "apifox-mcp-server@latest", "--oas=https://your-api-host/openapi.json"],
"env": {
"APIFOX_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Optional: add multiple projects
To expose multiple Apifox projects to your AI assistant, add a separate mcpServers entry for each project with a unique name and the corresponding project ID.
Apifox Examples
Client configuration
claude_desktop_config.json entry for Apifox MCP server using npx. Replace YOUR_PROJECT_ID and YOUR_ACCESS_TOKEN with your actual Apifox credentials.
{
"mcpServers": {
"apifox": {
"command": "npx",
"args": ["-y", "apifox-mcp-server@latest", "--project-id=YOUR_PROJECT_ID"],
"env": {
"APIFOX_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN"
}
}
}
}Prompts to try
Example prompts for using Apifox API documentation to generate and annotate code with an AI assistant.
- "Generate a Product model definition class from the Apifox API documentation"
- "Add comments to all Product DTO class fields based on the API documentation descriptions"
- "Generate MVC controller and service code for the /users endpoint from the API docs"
- "Create a TypeScript interface for the response schema of the POST /orders endpoint"
- "Add the new fields from the latest API documentation changes to the existing OrderDTO class"Troubleshooting Apifox
Authentication error: APIFOX_ACCESS_TOKEN is invalid or missing
Regenerate your access token in Apifox account settings under API Access, and update the APIFOX_ACCESS_TOKEN value in your MCP config. Make sure there are no extra spaces or newline characters in the token string.
Project ID not found or server returns empty API definitions
Verify the project ID matches the Apifox project you want to access. You can find the project ID in Apifox's project settings URL. Also confirm your access token has read permission for that specific project.
On Windows, npx command fails or the server does not start
Windows users should set 'command' to 'cmd' and 'args' to ['/c', 'npx', '-y', 'apifox-mcp-server@latest', '--project-id=YOUR_PROJECT_ID'] in their MCP config. This ensures the command runs through the Windows Command Processor correctly.
Frequently Asked Questions about Apifox
What is Apifox?
Apifox is a Model Context Protocol (MCP) server that enables ai assistants to fetch and understand api endpoint definitions from apifox projects in real-time. supports retrieving complete api specifications including request methods, parameters, headers, and response schemas to improve development effi It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Apifox?
Follow the installation instructions on the Apifox GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Apifox?
Apifox works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Apifox free to use?
Yes, Apifox is open source and available under the ISC License license. You can use it freely in both personal and commercial projects.
Apifox Alternatives — Similar Developer Tools Servers
Looking for alternatives to Apifox? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Apifox in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Apifox?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.