{
"mcpServers": {
"API 文档": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--oas=<oas-url-or-path>"
]
}
}
}
<oas-url-or-path>
可以是:https://petstore.swagger.io/v2/swagger.json
~/data/petstore/swagger.json
mcp.json
文件中添加以下配置,注意替换 https://petstore.swagger.io/v2/swagger.json
为你的 OpenAPI 文件路径或 URL:{
"mcpServers": {
"API 文档": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--oas=https://petstore.swagger.io/v2/swagger.json"
]
}
}
}
请通过 MCP 获取 API 文档,并告诉我项目中有几个接口
.json
文件中添加以下配置,注意替换 <oas-url-or-path>
为你的 OpenAPI 文件路径或 URL:{
"mcpServers": {
"API 文档": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--oas=https://petstore.swagger.io/v2/swagger.json"
]
}
}
}
请通过 MCP 获取 API 文档,并告诉我项目中有几个接口
--oas
参数值。<私有化部署服务器的 API 地址,以 http:// 或 https:// 开头>
"。另外,请确保网络可以正常访问 www.npm.com
。{
"mcpServers": {
"API 文档": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--oas=<oas-url-or-path>",
// 私有化部署必须添加以下参数
"--apifox-api-base-url=<私有化部署服务器的API地址>"
]
}
}
}