Content
<!--
* @Descripttion:
* @version:
* @Author: wangmin
* @Date: 2025-03-20 14:39:11
* @LastEditors: wangmin
* @LastEditTime: 2025-04-03 10:33:49
-->
# ApiFox MCP Server
This is an ApiFox interface server based on the Model Context Protocol (MCP) for retrieving and managing ApiFox interface information. By configuring the MCP service in Cursor, you can obtain the corresponding interface module information and return it to the large model, allowing Cursor to assist you in implementing business logic through the interface information.
## Features
- Supports retrieving ApiFox interface information via the MCP protocol
- Provides both HTTP service and CLI command line usage
- Developed using TypeScript, offering type safety
- Supports environment variable configuration
## Quick Installation and Usage
```javascript
npx @wangmhaha/apifox-mcp-server@latest --apifox-api-key=<your-apifox-api-key> --project=<your-project-id>
```
### Configure Cursor to Connect to the MCP Server via SSE
The server will start on the configured port (default is 3000).
```javascript
"apifox-mcp-server": {
"url": "http://localhost:3000/sse",
}
```
### Recommended Configuration via JSON Configuration File
You can configure the apifox-mcp-server by adding the following content to the Cursor MCP configuration file:
```javascript
"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>"
}
}
```
## Alternatively, Run from Local Source
Pull the code and install dependencies:
```bash
pnpm install
```
Build the project:
```bash
pnpm build
```
Run the server:
```bash
pnpm start:http
```
Configuration:
```javascript
"apifox-mcp-server": {
"url": "http://localhost:3000/sse",
"env": {
"APIFOX_API_KEY": "<your-apifox-api-key>",
"PROJECT_ID": "<your-project-id>"
}
}
```
You can also run in command mode:
```javascript
"apifox-mcp-server": {
"command": "node",
"args": [
"<your-local-path>/build/index.js",
"--local",
],
"env": {
"APIFOX_API_KEY": "<your-apifox-api-key>",
"PROJECT_ID": "<your-project-id>"
}
},
```
## If the env Environment Variables are Not Configured in the MCP Configuration File, Please Configure Them in the Local Environment
Modify the `.evn.example` file in the project root directory to `.env` and configure the following environment variables:
```env
APIFOX_API_KEY=your_api_key_here
PROJECT_ID=your_project-ID
PORT=3000 # Optional, defaults to 3000
```
## Tech Stack
- Node.js
- TypeScript
- Express.js
- Model Context Protocol SDK
- Zod (data validation)
## License
ISC License
Connection Info
You Might Also Like
MarkItDown MCP
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
flowlens-mcp-server
FlowLens MCP Server enables coding agents to debug and test with full...
spring-documentation-mcp-server
An unofficial Spring Boot MCP Server for educational demo applications.
typescript-utcp
UTCP is a secure, scalable TypeScript framework for tool integration across...