Content
# swagger-mcp-server
Swagger-MCP-Server is based on Swagger documentation as the interface constraint standard, allowing users to interact with large models (such as ChatGPT) in natural language to trigger website API calls, completing data queries, analysis, and processing. It features ad-hoc analysis and real-time feedback, providing users with a brand new experience.
## 1. Usage Configuration
### 1.1. Install Cherry Studio
Official website: [https://cherry-ai.com/](https://cherry-ai.com/)
### 1.2. Clone the Project
```
https://github.com/maohuihua123/swagger-mcp-server.git
```
### 1.3. Configure MCP-Server
> [!NOTE]
>
> Change 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 the List of Interfaces
`What functionalities does the website have?` `What are the available functional interfaces?`
### 2.2. Call a Specific Interface
> [!TIP]
>
> When entering commands, let the large model first call the detailed tool of the interface to obtain accurate interface URLs, 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; first, query the detailed information of the interface before calling.`
### 2.3. Generate Interface Test Plan
`You are a senior software testing engineer. Based on the website's interface documentation, please automatically generate a test plan and test cases using testing design methods such as equivalence class partitioning and boundary value analysis.`
### 2.4. Automated Interface Testing
`Based on the established test plan, perform automated testing calls on the website's interfaces and output the final test report.`
## 3. Source of Inspiration
> [!TIP]
>
> The MCP protocol addresses the issue of large models being unable to call services freely. If clear interface definitions allow large models to construct parameters and call services themselves, could this reduce the development of MCP-Server?
* Based on Swagger documentation as a constraint standard, it can quickly adapt to different websites and services without needing to develop integration logic for each website separately.
* By obtaining data through API calls and leveraging the analytical capabilities of large models, it can quickly generate data insights, charts, or predictive results for ad-hoc analysis.
* With the natural language interaction interface of large models, could it serve as a complement to traditional UI interfaces in the future, thus providing users with a new experience?
You Might Also Like
Ollama
Ollama enables easy access to large language models on various platforms.

n8n
n8n is a secure workflow automation platform for technical teams with 400+...
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

Dify
Dify is a platform for AI workflows, enabling file uploads and self-hosting.

Zed
Zed is a high-performance multiplayer code editor from the creators of Atom.
MarkItDown MCP
markitdown-mcp is a lightweight MCP server for converting various URIs to Markdown.