Feedback

Swagger MCP 服务器

@tuskermanshu Claim

Basic information

Runtime
node
Category
License
Not specified
Transports
stdio
Author
tuskermanshu
Submitted by
Community
Quality
25
Stars
16

About Swagger MCP 服务器 Server

# Swagger MCP 服务器

Swagger MCP 服务器 is a MCP server in the Other category listed in the AddMCP.net directory, published by tuskermanshu. Supported transport: stdio. Runtime: node. The repository has 16 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "swagger-mcp-server": {
            "command": "node",
            "args": [
                "start-server.js"
            ]
        }
    }
}

Swagger MCP 服务器 config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "swagger-mcp-server": {
            "command": "node",
            "args": [
                "start-server.js"
            ]
        }
    }
}

Swagger MCP 服务器 tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Swagger MCP 服务器?

Swagger MCP 服务器是一个基于Model Context Protocol (MCP)的服务器,用于解析Swagger/OpenAPI文档并生成TypeScript类型和API客户端代码。它面向需要将OpenAPI规范与大型语言模型集成的开发者。

How to use Swagger MCP 服务器?

安装依赖后启动服务器(node start-server.js),通过标准输入/输出与MCP工具通信。可调用解析、类型生成、API客户端生成等工具,例如使用 parse-swagger 或 generate-typescript-types 命令。通过 swagger-mcp-config.json 配置文件自定义服务器设置。

Key features of Swagger MCP 服务器

  • 解析Swagger/OpenAPI v2和v3规范
  • 生成TypeScript类型定义
  • 生成Axios、Fetch、React Query客户端代码
  • 大型文档缓存与懒加载机制
  • 提供标准、优化、轻量级解析模式
  • 按标签或路径前缀过滤API操作

Use cases of Swagger MCP 服务器

  • 从OpenAPI文档自动生成TypeScript类型,减少手动编码
  • 为前端项目生成一致的API客户端(Axios/Fetch/React Query)
  • 快速解析大型API文档获取操作信息
  • 集成到LLM工作流中,动态生成代码

Frequently asked questions

1 如何安装Swagger MCP 服务器?

可通过Smithery自动安装(npx -y @smithery/cli install @tuskermanshu/swagger-mcp-server --client claude),或手动 npm install 并启动。

2 支持哪些OpenAPI版本?

支持Swagger/OpenAPI v2和v3规范。

3 支持生成哪些API客户端框架?

目前支持Axios、Fetch和React Query三种框架的客户端代码生成。

4 如何优化大型API文档的处理?

使用优化版或轻量级工具,启用缓存(useCache: true)和懒加载(lazyLoading: true),并通过 filterTag 或 includeTags 参数缩小范围。

5 缓存如何管理?

API文档缓存存储在 .api-cache 目录中,可删除该目录或设置参数 useCache: false 禁用缓存。

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬