Content
```html
<!--
* @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 Model Context Protocol (MCP), used to obtain and manage ApiFox interface information. By configuring the MCP service in Cursor, the corresponding interface module information is obtained and returned to the large model, allowing Cursor to help you implement business logic through interface information.
## Features
- Supports obtaining ApiFox interface information through the MCP protocol
- Provides two usage methods: HTTP service and CLI command line
- Developed using TypeScript, providing 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 3000).
```javascript
"apifox-mcp-server": {
"url": "http://localhost:3000/sse",
}
```
### Recommended JSON Configuration via Configuration File
You can configure the apifox-mcp-server 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>"
}
}
```
## Or Run from Local Source
Pull the code and install dependencies
```bash
pnpm install
```
Build
```bash
pnpm build
```
Run
```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>"
}
}
```
Can also be run in command mode
```javascript
"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>"
}
},
```
## If you do not configure env environment variables in the MCP configuration file, please configure them in the local environment variables
Modify the `.evn.example` file to `.env` in the project root directory 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
```
## Technology Stack
- Node.js
- TypeScript
- Express.js
- Model Context Protocol SDK
- Zod (Data Validation)
## License
ISC License
```
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.