Provides API documentation from Apifox projects as a data source for AI programming tools that support MCP.
使用 Apifox MCP Server,可以将 Apifox 项目内的接口文档作为数据源提供给 Cursor 等支持 AI 编程的 IDE 工具以便让 AI 能够直接访问项目对应的接口文档数据。
开发者可以通过 AI 助手完成以下工作:根据接口文档生成或修改代码、搜索接口文档内容等等,至于通过这个接口文档数据能让 AI 干什么更多更强大的活,请发挥你和你们团队的想象力😜
安装配置好 MCP 后,Apifox MCP Server 会自动读取 Apifox 整个项目里的所有接口文档的数据并缓存在本地电脑,AI 可以通过 MCP 读取项目内所有的接口的接口文档数据。
你只要告诉 AI 你想要通过 API 文档做什么即可,示例:
注意:接口文档数据默认是会缓存在本地的,如果 Apifox 内的数据有更新,请告诉 AI 刷新接口文档数据,否则 AI 读到的数据可能不是最新的。
<access-token>
<project-id>
将下面 JSON 配置添加到 IDE 对应的 MCP 配置文件里:
{
"mcpServers": {
"API 文档": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--project-id=<project-id>"
],
"env": {
"APIFOX_ACCESS_TOKEN": "<access-token>"
}
}
}
}
如果使用 Windows 操作系统,而上文的配置文件无法正常工作,请使用如下配置文件:
{
"mcpServers": {
"API 文档": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"apifox-mcp-server@latest",
"--project-id=<project-id>"
],
"env": {
"APIFOX_ACCESS_TOKEN": "<access-token>"
}
}
}
}
~/.cursor/mcp.json
或项目内的 .cursor/mcp.json
注意:
<access-token>
和 <project-id>
替换为你个人的 Apifox API 访问令牌和 Apifox 项目 ID。<project-id>
), MCP Server 的名字填写“xxx API 文档”。<access-token>
",改成每个成员在自己电脑里配置名为 APIFOX_ACCESS_TOKEN 的环境变量,以避免 APIFOX_ACCESS_TOKEN 泄漏问题。<私有化部署服务器的 API 地址,以 http:// 或 https:// 开头>
"。另外,请确保网络可以正常访问 www.npm.com
。"--project-id=<project-id>"
参数,添加 "--oas=<oas-url-or-path>"
参数。如:npx apifox-mcp-server --oas https://petstore.swagger.io/v2/swagger.json
或 npx apifox-mcp-server --oas ~/data/petstore/swagger.json
Apifox MCP Server 还在内测阶段,欢迎各位给我们提建议和想法,请加内测群:
A code observability MCP enabling dynamic code analysis based on OTEL/APM data to assist in code reviews, issues identification and fix, highlighting risky code etc.
Up-to-date Docs For Any Cursor Prompt
Manage Xcode simulators.
Provides multi-cluster Kubernetes management and operations using MCP, featuring a management interface, logging, and nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.
A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.
A specialized MCP gateway for LLM enhancement prompts and jailbreaks with dynamic schema adaptation. Provides prompts for different LLMs using an enum-based approach.
Obtains latest dependency details for Clojure libraries.
MCP Server for automated reverse engineering with IDA Pro.
Tool platform by IBM to build, test and deploy tools for any data source
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.