Apifox MCP Pro
About
An enhanced Apifox MCP service providing comprehensive API management capabilities for Claude Desktop and Cursor.
Details
- Author
- guocong-bincai
- Categories
- Developer Tools, API
Jump to
Setup
Install Apifox MCP Pro in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/guocong-bincai/Apifox_mcp_pro
Follow the installation instructions in the repository README, then restart your MCP client.
由于Apifox官方开放API功能极其有限(仅提供3个基础导入导出接口),本项目已从最初计划的33+个工具简化为9个诊断和信息查询工具。大部分API管理功能需要使用Apifox Web界面或桌面客户端。
Due to Apifox's extremely limited Open API (only 3 basic import/export endpoints), this project has been simplified from the originally planned 33+ tools to 9 diagnostic and information tools. Most API management features require using the Apifox web interface or desktop client.
Enhanced Apifox MCP Service with basic diagnostic and information capabilities for Claude Desktop and Cursor.
Due to Apifox's extremely limited Open API, most advanced features are not available:
- ❌API Interface Management- Cannot list, create, update, or delete APIs
- ❌Folder Management- No folder operations supported
- ❌Environment Management- Cannot manage environments
- ❌Data Model Management- No schema operations
- ❌Test Case Management- Cannot manage test cases
- ❌Search Functionality- API search not supported
- ❌Batch Operations- No bulk operations available
- ✅Basic Project Info- Get project information and access checks
- ✅Limitation Explanations- Clear documentation of what's not supported
- ✅Token Validation- Check if your access token works
- ✅Diagnostic Tools- Help understand API limitations
Reason:Apifox officially provides only 3 basic import/export API endpoints. Most management functions require using the Apifox web interface or desktop client.
- 🚀9 MCP Tools- Basic diagnostic and information tools
- 📋Project Info- Get basic project information and access status
- ⚠️Limitation Awareness- Clear documentation of API restrictions
- 🔍Diagnostic Tools- Check token validity and project access
- 💻Cross-Platform- Works with Claude Desktop and Cursor
- 📦NPM Package- Easy installation via npm
- 🛠️CLI Tools- Setup and configuration utilities
Note:Due to Apifox's limited Open API, advanced management features are not available. This tool primarily serves as a diagnostic and information utility.
Option 1: NPM Installation (Recommended)
# Install globally npm install -g apifox-mcp-pro # Set your Apifox access token export APIFOX_ACCESS_TOKEN="your_access_token_here" # Setup for Cursor apifox-mcp-pro setup --cursor # Setup for Claude Desktop apifox-mcp-pro setup --claude # Setup for both apifox-mcp-pro setup --both
# Clone the repository git clone https://github.com/guocong-bincai/Apifox_mcp_pro.git cd Apifox_mcp_pro # Install dependencies npm install # Build the project npm run build # Set environment variables cp .env.example .env # Edit .env and add your APIFOX_ACCESS_TOKEN # Setup local configuration npm run dev setup --both --local
- 登录Apifox 官网
- 进入个人设置 → API 访问令牌
- 创建新的访问令牌
- 复制生成的令牌(格式通常为APS-xxxxxxxxxx)
- 请妥善保管您的访问令牌,不要在代码中硬编码
- 不要在公共仓库中提交包含真实令牌的配置文件
- 使用环境变量或配置文件来管理令牌
Create a.envfile or set environment variables:
# Required - 从Apifox个人设置中获取 APIFOX_ACCESS_TOKEN=your_apifox_access_token_here # Optional APIFOX_BASE_URL=https://api.apifox.com # Default API base URL LOG_LEVEL=info # Log level: debug, info, warn, error
# .env 文件示例(请替换为您的真实令牌) APIFOX_ACCESS_TOKEN=APS-your-actual-token-here LOG_LEVEL=info
After runningapifox-mcp-pro setup --cursor, the MCP server will be automatically configured. You can also manually add it to your Cursor settings:
{ "mcpServers": { "apifox-mcp-pro": { "command": "npx", "args": ["apifox-mcp-pro"], "env": { "APIFOX_ACCESS_TOKEN": "your_apifox_access_token_here" } } } }
For Claude Desktop, add to yourclaude_desktop_config.json:
{ "mcpServers": { "apifox-mcp-pro": { "command": "npx", "args": ["apifox-mcp-pro"], "env": { "APIFOX_ACCESS_TOKEN": "your_apifox_access_token_here" } } } }
- apifox_project_info- Get MCP functionality overview and limitations
- apifox_check_access- Check token validity and access permissions
- apifox_api_info- Get API management limitations explanation
- apifox_check_project_access- Check specific project access
- apifox_folder_info- Folder management limitations
- apifox_environment_info- Environment management limitations
- apifox_schema_info- Data model management limitations
- apifox_test_info- Test case management limitations
- apifox_import_export_info- Import/export functionality info
❌ Removed Tools (Previously Listed but Not Functional)
The following tools were removed because Apifox's Open API doesn't support them:
- apifox_list_apis- API listing not supported
- apifox_get_api- API details not accessible
- apifox_create_api- API creation not supported
- apifox_update_api- API updates not supported
- apifox_delete_api- API deletion not supported
- apifox_search_apis- Search functionality unavailable
- apifox_batch_delete_apis- Batch operations not supported
- apifox_batch_update_api_status- Status updates not supported
- apifox_batch_move_apis- Moving APIs not supported
- apifox_list_projects- Limited API access
- apifox_create_project- Creation not supported
- apifox_update_project- Updates not supported
- apifox_delete_project- Deletion not supported
- All folder, environment, schema, test case, and import/export management tools
Reason for Removal:Apifox's Open API is extremely limited and only provides 3 basic import/export endpoints. All management operations require using the Apifox web interface or desktop application.
// In Claude or Cursor, you can ask: "What Apifox MCP Pro features are available?" // This will call: apifox_project_info()
// Check if your token works: "Check my Apifox access permissions" // This will call: apifox_check_access()
// Get information about API management limitations: "Why can't I list APIs in my Apifox project?" // This will call: apifox_api_info()
Since most management features are not available through the API, consider these alternatives:
// List all APIs in a project "Show me all APIs in project 12345" // Create a new API "Create a GET API at /users/{id} for getting user details in project 12345" // Search APIs "Find all POST APIs in project 12345"
// Batch update API status "Mark APIs with IDs [1, 2, 3] as 'released'" // Batch move APIs "Move APIs [4, 5, 6] to folder 'v2-apis'"
# Start MCP server (default) apifox-mcp-pro # Setup configuration apifox-mcp-pro setup --cursor # Setup for Cursor apifox-mcp-pro setup --claude # Setup for Claude Desktop apifox-mcp-pro setup --both # Setup for both apifox-mcp-pro setup --local # Use local node instead of npx apifox-mcp-pro setup --examples # Generate config examples only # Show version apifox-mcp-pro --version # Show help apifox-mcp-pro --help
# Install dependencies npm install # Build the project npm run build # Run in development mode npm run dev # Run tests npm test # Lint code npm run lint # Format code npm run format
The setup command generates several configuration files:
- cursor-mcp-config.json- Cursor MCP configuration
- claude-desktop-config.json- Claude Desktop configuration
- local-config-example.json- Local development configuration
# Make sure your token is set correctly echo $APIFOX_ACCESS_TOKEN # Or check in your IDE configuration
# Clear npm cache and reinstall npm cache clean --force npm install -g apifox-mcp-pro
# Regenerate configuration files apifox-mcp-pro setup --both --examples
MIT License - seeLICENSEfile for details.
- Initial release with 33 MCP tools
- NPM package support
- Cursor and Claude Desktop integration
- Comprehensive API management features
- CLI setup tools
Note: This is an enhanced version of the official Apifox MCP service, providing significantly more functionality than the basic official implementation.
由于Apifox官方开放API功能极其有限(仅提供3个基础导入导出接口),本项目已从最初计划的33+个工具简化为9个诊断和信息查询工具。大部分API管理功能需要使用Apifox Web界面或桌面客户端。
为 Claude Desktop 和 Cursor 提供基础诊断和信息功能的 Apifox MCP 服务。
- ❌API接口管理- 无法列出、创建、更新或删除API
- ❌文件夹管理- 不支持文件夹操作
- ❌环境管理- 无法管理环境
- ❌数据模型管理- 不支持Schema操作
- ❌测试用例管理- 无法管理测试用例
- ❌搜索功能- 不支持API搜索
- ❌批量操作- 不支持批量操作
- ✅基础项目信息- 获取项目信息和访问检查
- ✅限制说明- 清晰的不支持功能文档
- ✅令牌验证- 检查访问令牌是否有效
- ✅诊断工具- 帮助理解API限制
原因:Apifox官方仅提供3个基础导入导出API端点。大部分管理功能需要使用Apifox Web界面或桌面客户端。
- 🚀9个MCP工具- 基础诊断和信息工具
- 📋项目信息- 获取基础项目信息和访问状态
- ⚠️限制说明- 清晰的API限制文档
- 🔍诊断工具- 检查令牌有效性和项目访问
- 💻跨平台- 支持 Claude Desktop 和 Cursor
- 📦NPM 包- 通过 npm 轻松安装
- 🛠️CLI 工具- 设置和配置工具
注意:由于Apifox开放API限制,高级管理功能不可用。此工具主要作为诊断和信息查询工具使用。
# 全局安装 npm install -g apifox-mcp-pro # 设置 Apifox 访问令牌 export APIFOX_ACCESS_TOKEN="your_access_token_here" # 配置 Cursor apifox-mcp-pro setup --cursor # 配置 Claude Desktop apifox-mcp-pro setup --claude # 同时配置两者 apifox-mcp-pro setup --both
# 克隆仓库 git clone https://github.com/guocong-bincai/Apifox_mcp_pro.git cd Apifox_mcp_pro # 安装依赖 npm install # 构建项目 npm run build # 设置环境变量 cp .env.example .env # 编辑 .env 文件并添加你的 APIFOX_ACCESS_TOKEN # 设置本地配置 npm run dev setup --both --local
# 必需 APIFOX_ACCESS_TOKEN=your_apifox_access_token_here # 可选 APIFOX_BASE_URL=https://api.apifox.com # 默认 API 基础 URL LOG_LEVEL=info # 日志级别:debug, info, warn, error
运行apifox-mcp-pro setup --cursor后,MCP 服务器将自动配置。您也可以手动添加到 Cursor 设置中:
{ "mcpServers": { "apifox-mcp-pro": { "command": "npx", "args": ["apifox-mcp-pro"], "env": { "APIFOX_ACCESS_TOKEN": "your_apifox_access_token_here" } } } }
对于 Claude Desktop,添加到您的claude_desktop_config.json:
{ "mcpServers": { "apifox-mcp-pro": { "command": "npx", "args": ["apifox-mcp-pro"], "env": { "APIFOX_ACCESS_TOKEN": "your_apifox_access_token_here" } } } }
- apifox_project_info- 获取MCP功能概览和限制信息
- apifox_check_access- 检查令牌有效性和访问权限
- apifox_api_info- 获取API管理限制说明
- apifox_check_project_access- 检查特定项目访问权限
- apifox_folder_info- 文件夹管理限制说明
- apifox_environment_info- 环境管理限制说明
- apifox_schema_info- 数据模型管理限制说明
- apifox_test_info- 测试用例管理限制说明
- apifox_import_export_info- 导入导出功能信息
- apifox_list_apis- 不支持API列表查询
- apifox_get_api- 无法访问API详情
- apifox_create_api- 不支持API创建
- apifox_update_api- 不支持API更新
- apifox_delete_api- 不支持API删除
- apifox_search_apis- 搜索功能不可用
- apifox_batch_delete_apis- 不支持批量操作
- apifox_batch_update_api_status- 不支持状态更新
- apifox_batch_move_apis- 不支持移动API
- apifox_list_projects- API访问受限
- apifox_create_project- 不支持创建
- apifox_update_project- 不支持更新
- apifox_delete_project- 不支持删除
删除原因:Apifox开放API功能极其有限,仅提供3个基础导入导出端点。所有管理操作需要使用Apifox Web界面或桌面应用程序。
// 在 Claude 或 Cursor 中,您可以询问: "Apifox MCP Pro 有哪些可用功能?" // 这将调用: apifox_project_info()
// 检查令牌是否有效: "检查我的 Apifox 访问权限" // 这将调用: apifox_check_access()
// 获取API管理限制信息: "为什么我无法列出 Apifox 项目中的 API?" // 这将调用: apifox_api_info()
- 使用Apifox Web界面进行完整的API管理
- 使用 Apifox 桌面客户端获得最佳体验
- 等待官方完善开放API功能
# 启动 MCP 服务器(默认) apifox-mcp-pro # 设置配置 apifox-mcp-pro setup --cursor # 设置 Cursor apifox-mcp-pro setup --claude # 设置 Claude Desktop apifox-mcp-pro setup --both # 设置两者 apifox-mcp-pro setup --local # 使用本地 node 而不是 npx apifox-mcp-pro setup --examples # 仅生成配置示例 # 显示版本 apifox-mcp-pro --version # 显示帮助 apifox-mcp-pro --help
# 安装依赖 npm install # 构建项目 npm run build # 开发模式运行 npm run dev # 运行测试 npm test # 代码检查 npm run lint # 格式化代码 npm run format
- cursor-mcp-config.json- Cursor MCP 配置
- claude-desktop-config.json- Claude Desktop 配置
- local-config-example.json- 本地开发配置
# 确保您的令牌设置正确 echo $APIFOX_ACCESS_TOKEN # 或检查您的 IDE 配置
# 清除 npm 缓存并重新安装 npm cache clean --force npm install -g apifox-mcp-pro
# 重新生成配置文件 apifox-mcp-pro setup --both --examples
- 查看USAGE.md了解详细使用说明
- 查看生成的配置文件
- 检查您的 Apifox 访问令牌权限
- 验证您的 IDE MCP 配置
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





