Apifox

v1.0.0Developer Toolsstable

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

apifox-mcp-servermcpai-integration
Share:
90
Stars
0
Downloads
0
Weekly
0/5

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

Integration with Apifox API management platform.
apifox

Maintainer

LicenseISC License
Languagedockerfile
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx apifox-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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.

3

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"
      }
    }
  }
}
4

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.

5

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"
      }
    }
  }
}
6

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.

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.

Quick Config Preview

{ "mcpServers": { "apifox-mcp-server": { "command": "npx", "args": ["-y", "apifox-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides