Content
# swagger-mcp-server
Swagger-MCP-Server based on Swagger documentation as the interface constraint standard, allows users to interact with large models (such as ChatGPT) in a natural language manner, triggering website interface calls to complete data query, analysis, and processing, with features such as ad-hoc analysis and real-time feedback, providing users with a new experience.
## 1. Usage Configuration
### 1.1. Install Cherry Studio
Official website: [https://cherry-ai.com/](https://cherry-ai.com/)
### 1.2. Pull the project
```
https://github.com/maohuihua123/swagger-mcp-server.git
```
### 1.3. Configure MCP-Server
> [!NOTE]
>
> Modify the path to your local project path: for example, `c:/Users/Administrator/Desktop/swagger-mcp-server`
>
> The Swagger file link needs to be accessible: for example, `http://localhost:8080/v3/api-docs/openapi.json`
```json
{
"mcpServers": {
"ct8e9lwgcZCYAp_c5UErc": {
"name": "swagger-mcp",
"type": "stdio",
"isActive": true,
"registryUrl": "",
"command": "uv",
"args": [
"--directory",
"c:/Users/Administrator/Desktop/swagger-mcp-server",
"run",
"main.py"
],
"env": {
"OPEN_API_URL": "http://localhost:8080/v3/api-docs/openapi.json"
}
}
}
}
```
## 2. Usage Examples
### 2.1. View Interface List
`Tell me what functions the website has?` `Tell me what function interfaces are available?`
### 2.2. Call Specific Interface
> [!TIP]
>
> When entering instructions, let the large model first call the interface details tool to obtain accurate interface URLs, interface parameters, etc., before initiating the call.
`Call the create user interface to create a new user with the username Zhang San and email 123456@qq.com; before calling, first query the interface details.`
### 2.3. Generate Interface Test Plan
`You are a senior software test engineer. Combining the website's interface documentation, please automatically generate a test plan and test cases based on test design methods such as equivalence class partitioning and boundary value analysis.`
### 2.4. Automated Interface Testing
`Based on the formulated test plan, perform automated test calls on the website interface and output the final test report.`
## 3. Source of Ideas
> [!TIP]
>
> The MCP protocol solves the problem that large models cannot arbitrarily call services. If large models can construct parameters to call services through clear interface definitions, can the development of MCP-Server be reduced?
* Based on Swagger documentation as a constraint standard, it can quickly adapt to different websites and services without the need to develop separate integration logic for each website.
* After obtaining data through interface calls, combined with the analysis capabilities of large models, quickly generate data insights, charts, or prediction results to achieve ad-hoc analysis.
* Based on the natural language interaction interface of large models, can it serve as a supplement to traditional UI interfaces in the future, thereby providing users with a new experience?
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.