ApiFox MCP Server

ApiFox MCP Server

A server that enables accessing and managing ApiFox API information through the Model Context Protocol, supporting both HTTP services and CLI commands.

wangmhaha

Developer Tools
Visit Server

README

<!--

  • @Descripttion:
  • @version:
  • @Author: wangmin
  • @Date: 2025-03-20 14:39:11
  • @LastEditors: wangmin
  • @LastEditTime: 2025-04-03 10:33:49 -->

ApiFox MCP Server

这是一个基于 Model Context Protocol (MCP) 的 ApiFox 接口服务器,用于获取和管理 ApiFox 的接口信息。通过在 Cursor 中配置 MCP 服务,获取对应接口模块信息返回给大模型,让 Cursor 通过接口信息帮助你实现业务逻辑。

功能特点

  • 支持通过 MCP 协议获取 ApiFox 接口信息
  • 提供 HTTP 服务和 CLI 命令行两种使用方式
  • 使用 TypeScript 开发,提供类型安全
  • 支持环境变量配置

快速安装使用


npx @wangmhaha/apifox-mcp-server@latest --apifox-api-key=<your-apifox-api-key> --project=<your-project-id>

配置 cursor 通过 sse 连接到 MCP 服务器

服务器将在配置的端口上启动(默认 3000)。

"apifox-mcp-server": {
    "url": "http://localhost:3000/sse",
  }

推荐通过使用配置文件 JSON 配置

可以通过在 cursor mcp 配置文件中添加以下内容来配置 apifox-mcp-server 服务器:

 "apifox-mcp-server": {
    "command": "npx",
    "args": ["-y", "@wangmhaha/apifox-mcp-server@latest", "--local"],
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  }

或者从本地源运行

拉取代码安装依赖

pnpm install

打包

pnpm build

运行

pnpm start:http

配置:

"apifox-mcp-server": {
    "url": "http://localhost:3000/sse",
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  }

也可通过 command 模式运行

"apifox-mcp-server": {
    "command": "node",
    "args": [
      "<you-local-path>/build/index.js",
      "--local",
    ],
    "env": {
      "APIFOX_API_KEY": "<your-apifox-api-key>",
      "PROJECT_ID": "<your-project-id>"
    }
  },

如在不在 MCP 配置文件中配置 env 环境变量,请在本地环境变量配置

在项目根目录下修改.evn.example 文件为.env 文件,配置以下环境变量:

APIFOX_API_KEY=your_api_key_here
PROJECT_ID=your_project-ID
PORT=3000  # 可选,默认为 3000

技术栈

  • Node.js
  • TypeScript
  • Express.js
  • Model Context Protocol SDK
  • Zod(数据验证)

许可证

ISC License

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
MCP Package Docs Server

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.

Featured
Local
TypeScript
Claude Code MCP

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.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@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.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python