
Apifox MCP Server
This server acts as a Message Communication Protocol (MCP) service for integrating Apifox and Cursor, enabling OpenAPI interface implementation through AI-driven interaction.
Tzott
README
环境要求
- NodeJS >= 18
1. 准备 Apifox MCP 服务
1.1 克隆 Apifox MCP 项目
git clone https://github.com/Tzott/apifox-mcp-demo.git
1.2 创建环境变量
cd apifox-mcp-demo
cp .env.example .env
1.3 在 Apifox 客户端中创建一个Access Token ,并写入到 .env 文件中
1.4 启动 Apifox MCP 服务
# 如果没有安装 pnpm,可先运行:npm i -g pnpm
pnpm i && pnpm build && pnpm start
1.5 看到启动成功日志
> apifox-mcp-demo@0.0.1 start /Users/code/apifox-mcp-demo
> node lib/index.js
SSE endpoint: http://localhost:4444/sse
Message endpoint: http://localhost:4444/messages
HTTP server listening on port 4444
2. 准备 Cursor
2.1 创建一个空白的 Nestjs 项目
npm i -g @nestjs/cli
nest new nest-ai-demo
cd nest-ai-demo
2.2 添加一个 Cursor MCP 配置
从 apifox-mcp-demo
项目中复制 sse 的地址
,填到 Server URL
中。
可以看到MCP 服务连接成功
2.3 打开 Cursor Composer,并切换到 Agent 模式
2.4 复制一个 Apifox 接口的协作链接
2.5 粘贴到 Composer 中,并让其实现接口
https://app.apifox.com/link/project/5898808/apis/api-263537040
通过这个 Apifox 协作链接,获取其 OpenAPI 的定义,然后根据定义实现这个接口。
注意:技术是:nestjs + typescript,项目我已经搭建了好了,直接实现即可。
2.6 Cursor Composer 实现完毕,并 Accepted 结果
2.7 启动 Nestjs服务,通过 Apifox 调用AI 写的接口,断言通过
3. 其他
分页也简单实现了
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Apple MCP Server
Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor