Skip to main content
Glama

Apifox MCP

一个用于将 Apifox API 文档与 AI 助手集成的 Model Context Protocol (MCP) 服务器。

概述

本项目为 Apifox(一个 API 开发和测试平台)和支持 Model Context Protocol 的 AI 助手之间提供了桥梁。它允许 AI 助手从 Apifox API 文档中提取信息,使开发过程中理解和使用 API 变得更加容易。

Related MCP server: yapi-mcp-server

功能特点

  • 从 Apifox URL 中提取项目 ID 和 API ID

  • 使用提取的 ID 从 Apifox 获取详细的 API 信息

  • 与支持 MCP 的 AI 助手无缝集成

前提条件

  • 拥有访问令牌的 Apifox 账户

  • 支持 Model Context Protocol 的 AI 助手

安装

# 全局安装
npm install -g mcp-apifox

# 或使用 pnpm
pnpm add -g mcp-apifox

配置

方法一

{
  "mcpServers": {
    "apifox": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-apifox@latest"
      ],
      "env": {
        "APIFOX_ACCESS_TOKEN": ""
      }
    }
  }
}

方法二

{
  "mcpServers": {
    "apifox": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-apifox@latest",
        "--token=xxxx"
      ]
    }
  }
}

使用

通过下面这种协作链接就可以获取接口信息,需要维护者权限

https://app.apifox.com/link/project/${projectId}/apis/api-${apiId}

可用工具

1. get-apifox-project-id-and-api-id-from-url

从 Apifox URL 中提取项目 ID 和 API ID。

输入:

  • text:包含 Apifox URL 或路径的字符串

输出:

  • 包含 projectIdapiId 的 JSON 对象

2. get-apifox-api-info

从 Apifox 获取详细的 API 信息。

输入:

  • projectId:Apifox 项目 ID

  • apiId:Apifox API ID

输出:

  • 请求的 API 的 OpenAPI 规范

Available Tools

2 tools
get_apifox_api_infoC

Get the info of Apifox API.

ParametersJSON Schema
NameRequiredDescriptionDefault
apiIdYesThe API ID of Apifox
projectIdYesThe project ID of Apifox

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action of getting API info, without details on permissions required, rate limits, error handling, or response format. This lack of information is a significant gap for a tool with no structured safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized for a simple tool, though it could be slightly more informative to improve clarity without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is insufficiently complete. It does not explain what 'info' includes in the response, how errors are handled, or any behavioral nuances, leaving critical gaps for the agent to understand the tool's full context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both required parameters (apiId and projectId) with their purposes. The description does not add any meaning beyond this, such as explaining parameter relationships or constraints, so it meets the baseline score of 3 where the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get the info of Apifox API,' which clearly indicates it retrieves information about an API. However, it lacks specificity about what 'info' entails (e.g., metadata, details, status) and does not distinguish it from the sibling tool 'get_apifox_project_id_and_api_id_from_url,' which might serve a related but different purpose. This vagueness prevents a higher score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as the sibling tool. It does not mention any prerequisites, contexts, or exclusions for usage, leaving the agent without direction on appropriate invocation scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_apifox_project_id_and_api_id_from_urlC

Get the project ID and API ID of Apifox from the URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to extract the project id and api id from

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool extracts IDs from a URL but doesn't describe how it handles invalid inputs, errors, or the format of the extracted data. For a tool with no annotations, this is a significant gap in transparency about its operation and potential limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded with the main action and resource, making it easy to understand at a glance. Every part of the sentence contributes directly to the tool's definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of extracting IDs from text, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., structured data, error messages) or how it handles edge cases. For a tool with one parameter but no behavioral context, this falls short of providing enough information for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'text' parameter documented as 'The text to extract the project id and api id from.' The description adds minimal value beyond this, only implying that the text should be a URL. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't provide additional syntax or format details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the project ID and API ID of Apifox from the URL.' It specifies the verb ('Get') and the resources ('project ID and API ID'), and mentions the source ('from the URL'). However, it doesn't explicitly differentiate from the sibling tool 'get_apifox_api_info', which might have overlapping or related functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'get_apifox_api_info' or any other context for usage, such as prerequisites or scenarios where this extraction is needed. This leaves the agent without clear direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

C2.9/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one retrieves general API information, while the other extracts specific IDs from a URL. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'get_' prefix and snake_case naming, making them predictable and easy to understand.

Tool Count2/5

With only two tools, the server feels thin and under-scoped for an Apifox integration, lacking essential operations like creating, updating, or listing APIs, which limits its utility.

Completeness2/5

The toolset is severely incomplete for API management; it only provides retrieval and ID extraction, missing core CRUD operations (e.g., create_api, update_api, list_apis) and other typical API lifecycle functions.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sujianqingfeng/mcp-apifox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server