Apifox MCP Setup & Guide
io.mcp-cn.wangmhaha/apifox-mcp-server
Apifox的MCP服务器,支持Apifox的读取和写入
Copy the install config on this page first, then verify docs and permissions upstream.
Popularity
Overview
Apifox的MCP服务器,支持Apifox的读取和写入 Apifox is a MCP Server listed from MCP Hub China. Transports: stdio. This page includes an overview, setup tutorial, install commands, and use cases for Trae, Tongyi Lingma, Cursor, Claude Code, and VS Code.
Use cases
AgentHub Verified AvailabilityTested & Ready
Automated pipeline validated install commands, protocol & client compatibility
Copy by platform
Choose your platform
- Open or create .cursor/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets (see Environment variables below)
- Save, then Cmd+Shift+P → Reload Window
Pre-fill Environment Variables (Optional)
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Setup tutorial
- Open the Apifox page and confirm this MCP Server (source: MCP Hub China).
- Copy the Cursor, Claude Code, or VS Code snippet.
- Merge it into mcpServers and replace env placeholders with real secrets.
- Reload the window, then call the MCP tools from your agent chat.
Install commands
Install commands and setup steps are in the HTML so search engines and no-JS browsers can read them without running client JavaScript.
Claude Code (local)
- Install Claude Code CLI
- Copy the command below, replace <placeholders> with real env values, then run in terminal
- See Environment variables below if listed
claude mcp add apifox-mcp-server --env APIFOX_API_KEY=<APIFOX_API_KEY> --env PROJECT_ID=<PROJECT_ID> -- npx -y @wangmhaha/apifox-mcp-serverCursor — .cursor/mcp.json (local)
- Open or create .cursor/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets (see Environment variables below)
- Save, then Cmd+Shift+P → Reload Window
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}VS Code — .vscode/mcp.json (local)
- Install GitHub Copilot in VS Code with MCP support
- Open or create .vscode/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets
- Save and Developer: Reload Window
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Claude Desktop — claude_desktop_config.json (local)
- Open Claude Desktop claude_desktop_config.json (see remote guide for paths)
- Click Copy config and merge under mcpServers
- Replace <placeholders> in env with real secrets
- Fully quit and restart Claude Desktop
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Trae — .trae/mcp.json (local)
- Trae → Settings → MCP, or edit .trae/mcp.json / global mcp.json
- Click Copy config and merge mcpServers
- Replace <placeholders> in env with real secrets
- Save and reload Trae
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Cherry Studio — MCP settings (local)
- Cherry Studio → Settings → MCP Servers → Add (STDIO)
- Or import JSON: click Copy config and merge mcpServers
- Replace <placeholders> in env; ensure Node.js / uv (npx, uvx) are installed
- Enable the server and check tools load
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Tongyi Lingma — MCP config (local)
- Lingma Settings → MCP → + → STDIO or config file
- Click Copy config and merge mcpServers
- Replace <placeholders> in env; need Node.js 18+ (npx) or uv (uvx)
- Confirm connected before using tools in agent chat
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Windsurf — mcp_config.json (local)
- Edit ~/.codeium/windsurf/mcp_config.json
- Click Copy config and merge mcpServers (stdio same as Cursor)
- Replace <placeholders> in env, save, refresh Cascade
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Cline — MCP Servers (local)
- Cline panel → Settings → MCP Servers
- Click Copy config and merge
- Replace <placeholders> in env, then save
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}WorkBuddy — .workbuddy/mcp.json (local)
- Edit ~/.workbuddy/mcp.json (user) or project .workbuddy/mcp.json
- Or Plugins → MCP Servers → Configure MCP and paste the JSON below
- Replace <placeholders> in env; on Windows prefer absolute paths for command/scripts
- Save, restart WorkBuddy, confirm connector status is green
{
"mcpServers": {
"apifox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wangmhaha/apifox-mcp-server"
],
"env": {
"APIFOX_API_KEY": "<APIFOX_API_KEY>",
"PROJECT_ID": "<PROJECT_ID>"
}
}
}
}Troubleshooting & Common ErrorsFAQ
Common connection errors and verified fixes for Apifox
Getting 'connection closed' or exit code 1 in Cursor / Claude Code for Apifox?
Usually caused by missing runtime paths or IDE environment inheritance. Fix steps: 1. Verify Node.js 18+ (npx) or Python 3.10+ (uvx) is installed; 2. Run 'which npx' or 'which uvx' in terminal, and replace 'command' with absolute path; 3. Reload or restart the client window after modifying config.
# Check binary path in terminal: which npx node -v
Getting 'spawn npx ENOENT' or 'command not found'?
The editor background process does not inherit your full terminal PATH. Solution: Globally install the package, or set the absolute binary path (e.g. C:\Program Files\nodejs\npx.cmd on Windows, or /usr/local/bin/npx on macOS).
Missing required environment variable or authentication failure?
Apifox requires environment variables (APIFOX_API_KEY、PROJECT_ID). Ensure you have added valid keys under the 'env' object in your config file without trailing whitespace.
// .cursor/mcp.json 或 claude_desktop_config.json
{
"env": {
"APIFOX_API_KEY": "your_actual_key_here"
}
}Tool Mock Playground
SandboxApifox Tool Interface Simulation · Preview tool schema & outputs without local runtime
{
"target": "Apifox",
"action": "execute",
"options": {
"mode": "standard",
"timeoutMs": 5000
}
}Click 'Run Mock' above
to preview the raw response returned to the LLM
Decision Guide: Why & When to Use
Assess suitability before installing to save trial-and-error time
- Feishu docs
- China maps routing
- WeCom notifications
- Teams with no China accounts
- Cross-border data compliance concerns
Apifox + Scenario Prompt → Complete Agent Automation
MCP hands-on: install to visible results
Follow the full lab (expected UI/output + contrast checks). After installing this item, verify with the tutorial prompts.
Related resources
securityscorecard-mcp
v2.0.0
io.github.CallMarcus/securityscorecard-mcp
Community-built, comprehensive MCP server for the SecurityScorecard API (unofficial).
skgate
v0.15.2
io.github.helv-io/skgate
OAuth MCP gateway. SI proxy with model aliases. Grok subscription as OpenAI-compatible API, no key.
Veto
v3.9.0
io.github.jigyasudham/veto
93 agentic MCP tools + 49 specialist agents for every major AI CLI. Self-learning, no API keys.
Fillo
v0.10.0
io.github.jacobfunch/usefillo
Fillo MCP server — provision, scaffold, publish, and query forms from your coding agent.
AgentsJunction
v0.1.1
io.github.JakubTrousil/agentsjunction
Discover MCP servers and A2A agents; verify, message, post, follow, react, and receive webhooks.
veto
v0.1.6
io.github.aiveto/veto
Turn OpenAPI services into tools an agent can call under your rules.
Often paired with
Danube
v8.1.20
io.clawhub.preston-thiele/danube
Governed tool access for AI agents — one Danube API key unlocks your organization's own tools plus a large, growing catalog of services, over MCP or curl, with confirmation before anything that writes, sends, spends, or deletes.
API Gateway
v1.2.25
io.clawhub.byungkyu/api-gateway
Call third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, etc.
v1.2.6
io.clawhub.byungkyu/linkedin-api
LinkedIn API integration with managed OAuth. Share posts, manage profile, and access LinkedIn features. Use this skill when users want to share content on LinkedIn, get profile/organization information, or interact with LinkedIn's platform.
WhatsApp Business
v1.2.8
io.clawhub.byungkyu/whatsapp-business
WhatsApp Business API integration with managed OAuth. Send messages, manage templates, and handle conversations. Use this skill when users want to interact with WhatsApp Business. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Keep exploring AgentHub
Most people compare similar tools or check scenario guides before installing—start here.
Listing badge: put AgentHub on your site
Copy either snippet into your project homepage, docs, or GitHub README. The badge is a hotlinked SVG — nothing to host — and it links back to this page so visitors can find the install steps.
<a href="https://myagenthub.cn/p/io.mcp-cn.wangmhaha/apifox-mcp-server" title="Listed on AgentHub: Apifox" target="_blank" rel="noopener">
<img src="https://myagenthub.cn/badge/io.mcp-cn.wangmhaha/apifox-mcp-server?lang=en" alt="Listed on AgentHub: Apifox" height="20" style="border:0"/>
</a>[](https://myagenthub.cn/p/io.mcp-cn.wangmhaha/apifox-mcp-server)Badges are generated on the fly from /badge/<package-id>, so name and listing changes propagate automatically. Keep the link target unchanged — it is what counts as the referral.
Unified Manifest
{
"id": "io.mcp-cn.wangmhaha/apifox-mcp-server",
"type": "mcp-server",
"version": "latest",
"displayName": "Apifox",
"description": "Apifox的MCP服务器,支持Apifox的读取和写入",
"author": {
"name": "wangmhaha"
},
"homepage": "https://mcp-cn.com/server/109",
"distribution": {
"packages": [
{
"registryType": "npm",
"identifier": "@wangmhaha/apifox-mcp-server",
"runtimeHint": "npx",
"transport": "stdio",
"environmentVariables": [
{
"name": "APIFOX_API_KEY",
"description": "<your-apifox-api-key>",
"isRequired": true,
"isSecret": true
},
{
"name": "PROJECT_ID",
"description": "<your-project-id>",
"isRequired": true,
"isSecret": false
}
]
}
],
"remotes": []
},
"dependencies": [],
"installTargets": [
"claude-code",
"claude-desktop",
"cursor",
"vscode",
"trae",
"cherry-studio",
"lingma",
"windsurf",
"cline",
"workbuddy"
],
"keywords": [
"use_count:2593",
"Apifox",
"MCP",
"Apifox",
"API"
],
"provenance": {
"origin": "mcp-cn",
"originalId": "@wangmhaha/apifox-mcp-server",
"originalUrl": "https://mcp-cn.com/server/109",
"isOfficial": false,
"status": "active"
}
}