ApifoxBLOCK
Apifox MCP 服务器 - 让 Claude 等 AI 助手通过自然语言管理你的 Apifox 项目,轻松创建、更新和审计 API 接口
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://go.dev/) [](LICENSE) [](https://apifox.com/)
apifox-cli is now a Go command line tool plus an AI Skill for writing Apifox/OpenAPI documentation. The CLI replaces the old tool-call workflow: agents and scripts should call apifox-cli commands directly.
The main use case is not importing an existing OpenAPI file. The expected workflow is:
- Read routes, handlers, DTOs, validators, and product requirements from the target project.
- Write structured hidden JSON files such as
.apifox-docs.json,.apifox-endpoint.json,.apifox-crud.json, or.apifox-schema.json. - Validate locally.
- Run
--dry-run. - Apply the generated documentation to Apifox through the CLI.
For Go projects, do not use Swagger marker comments as the primary API documentation strategy. Keep Go code focused on implementation and let AI author structured OpenAPI/Apifox specs through this CLI.
Install
Homebrew:
brew tap iwen-conf/tap brew trust iwen-conf/tap brew install --cask apifox-cli apifox-cli --version
From source:
go build -o ./bin/apifox-cli ./cmd/apifox-cli ./bin/apifox-cli --help
Or install from the checkout:
go install ./cmd/apifox-cli apifox-cli --help
Configure
Set credentials through environment variables, or pass them before the subcommand with --token and --project-id.
export APIFOX_TOKEN="your-token" export APIFOX_PROJECT_ID="your-project-id" apifox-cli config check
Use --base-url only when your Apifox deployment is not https://api.apifox.com.
CLI Commands
Use the canonical command surface in new scripts: api create|update|upsert, schema create|update, apply-docs, and generate-crud. The older create-endpoint, update-endpoint, and upsert-endpoint commands are l
54c30bab6e42OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add apifox-cli --env APIFOX_TOKEN=${APIFOX_TOKEN} -- uvx apifox-cli{
"mcpServers": {
"apifox-cli": {
"command": "uvx",
"args": [
"apifox-cli"
],
"env": {
"APIFOX_TOKEN": "${APIFOX_TOKEN}"
}
}
}
}Exposed tools (22)
13 read · 6 write · 3 destructive. Blast radius: 3 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
add_tag_to_api | write | 为现有接口添加标签。 |
audit_all_api_responses | read | |
check_api_responses | read | |
check_apifox_config | read | |
check_path_naming_convention | read | |
check_response_consistency | read | |
create_api_endpoint | write | |
create_folder | write | 在 Apifox 项目中创建新目录(标签)。 |
create_schema | write | 创建新的数据模型 (Schema)。 |
delete_api_endpoint | destructive | 删除 Apifox 项目中的 HTTP 接口。⚠️ 此操作不可撤销! |
delete_folder | destructive | 删除 Apifox 项目中的目录(标签)。⚠️ 警告: 此操作不可撤销! |
delete_schema | destructive | 删除数据模型 (Schema)。⚠️ 警告: 此操作不可撤销! |
generate_crud_apis | read | |
get_api_endpoint_detail | read | 获取 HTTP 接口的详细信息。 |
get_apis_by_tag | read | 获取指定标签下的所有接口。 |
get_schema_detail | read | 获取数据模型的详细信息。 |
list_api_endpoints | read | |
list_folders | read | 列出 Apifox 项目中的所有目录结构。 |
list_schemas | read | 列出 Apifox 项目中的所有数据模型 (Schema)。 |
list_tags | read | 列出项目中所有的标签及其接口数量。 |
update_api_endpoint | write | |
update_schema | write | 更新现有的数据模型 (Schema)。 |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (6)
sudo: false,
delete_api_endpoint, delete_folder, delete_schema
.goreleaser.yaml
mcp, requests
system use found in code, not declared in the description
Gates applied: no_behavioural_pass, no_license.
54c30bab6e42full audit observations/trust-audit/mcp-server/iwen-conf__apifox-3.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 54c30bab6e42 | BLOCK | D | 69 | first audit |
Questions
What is the Apifox MCP server?
Apifox MCP 服务器 - 让 Claude 等 AI 助手通过自然语言管理你的 Apifox 项目,轻松创建、更新和审计 API 接口
What tools does Apifox expose?
22 in total: 13 read-only, 6 that write, and 3 that can delete or overwrite (delete_api_endpoint, delete_folder, delete_schema). Every one is listed on this page with its risk.
Is Apifox safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 3 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Apifox need?
It reads APIFOX_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (54c30bab6e42), read on 2026-10-08. The repository is watched and re-audited when it changes.