
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that parses Swagger/OpenAPI documents and generates TypeScript types and API client code for large language model integration.
Swagger MCP Server is cataloged as an MCP server attributed to tuskermanshu. An MCP server that parses Swagger/OpenAPI documents and generates TypeScript types and API client code for large language model integration. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Swagger MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
README.md · abf35931451c · 采集于 2026-11-13 10:02:35 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
一个基于Model Context Protocol (MCP)的服务器,用于解析Swagger/OpenAPI文档并生成TypeScript类型和API客户端代码。
npm install
# 或者使用pnpm
pnpm install
node start-server.js
服务器默认使用标准输入/输出通信。
可以通过标准输入/输出与MCP服务器通信。以下是一些示例:
# 解析Swagger文档
node examples/optimized-swagger-parser-example.js
# 生成TypeScript类型
node examples/typescript-generator-example.js
# 生成API客户端
node examples/api-client-generator-example.js
{
"method": "parse-swagger",
"params": {
"url": "https://petstore3.swagger.io/api/v3/openapi.json",
"includeSchemas": true,
"includeDetails": true
}
}
适用于完整解析,带有高级选项:
{
"method": "parse-swagger-optimized",
"params": {
"url": "https://petstore3.swagger.io/api/v3/openapi.json",
"includeSchemas": true,
"includeDetails": true,
"useCache": true,
"skipValidation": true,
"cacheTTLMinutes": 60,
"lazyLoading": false,
"filterTag": "pet"
}
}
为大型文档优化,快速但只返回基本信息:
{
"method": "parse-swagger-lite",
"params": {
"url": "https://petstore3.swagger.io/api/v3/openapi.json",
"includeSchemas": false,
"includeDetails": false,
"useCache": true,
"skipValidation": true
}
}
{
"method": "generate-typescript-types",
"params": {
"swaggerUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
"outputDir": "./generated/types",
"namespace": "PetStore",
"strictTypes": true,
"generateEnums": true,
"generateIndex": true
}
}
{
"method": "generate-typescript-types-optimized",
"params": {
"swaggerUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
"outputDir": "./generated/types",
"namespace": "PetStore",
"strictTypes": true,
"useCache": true,
"skipValidation": true,
"lazyLoading": true,
"includeSchemas": ["Pet", "Order", "User"]
}
}
{
"method": "generate-api-client",
"params": {
"swaggerUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
"outputDir": "./generated/api",
"clientType": "axios",
"generateTypeImports": true,
"typesImportPath": "../types",
"groupBy": "tag"
}
}
{
"method": "generate-api-client-optimized",
"params": {
"swaggerUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
"outputDir": "./generated/api",
"clientType": "react-query",
"generateTypeImports": true,
"typesImportPath": "../types",
"groupBy": "tag",
"useCache": true,
"skipValidation": true,
"lazyLoading": true,
"includeTags": ["pet", "store"]
}
}
{
"method": "file-writer",
"params": {
"filePath": "./output.txt",
"content": "Hello, world!",
"createDirs": true
}
}
对于大型API文档,推荐使用以下配置:
示例:
{
"method": "parse-swagger-lite",
"params": {
"url": "https://your-large-api-doc-url.json",
"useCache": true,
"skipValidation": true,
"lazyLoading": true,
"filterTag": "your-specific-tag",
"includeSchemas": false
}
}
目前支持以下API客户端框架:
示例 - 生成React Query客户端:
{
"method": "generate-api-client-optimized",
"params": {
"swaggerUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
"outputDir": "./generated/react-query",
"clientType": "react-query",
"generateTypeImports": true
}
}
API文档缓存存储在 .api-cache 目录中。如果需要清除缓存:
.api-cache 目录useCache: false 参数可在 swagger-mcp-config.json 中自定义服务器设置:
{
"name": "Swagger MCP Server",
"version": "1.0.0",
"transport": "stdio"
}
启动调试服务器:
node start-server.js
然后使用MCP Inspector连接:
npx @modelcontextprotocol/inspector pipe -- node start-server.js
或者直接方式(但可能导致输出混乱):
npx @modelcontextprotocol/inspector -- node start-server.js
参见 road.md 文件了解开发计划和进度。
要通过Smithery为Claude Desktop自动安装swagger-mcp-server:
npx -y @smithery/cli install @tuskermanshu/swagger-mcp-server --client claude
# 构建项目
npm run build
# 或使用pnpm
pnpm build
parse-swagger - 解析Swagger/OpenAPI文档,返回API操作信息parse-swagger-optimized - 解析Swagger/OpenAPI文档(优化版)parse-swagger-lite - 轻量级解析Swagger/OpenAPI文档,专为大型文档优化generate-typescript-types - 从Swagger/OpenAPI文档生成TypeScript类型定义generate-typescript-types-optimized - 从Swagger/OpenAPI文档生成TypeScript类型定义(优化版)generate-api-client - 从Swagger/OpenAPI文档生成API客户端代码generate-api-client-optimized - 从Swagger/OpenAPI文档生成API客户端代码(优化版)file-writer - 将内容写入文件系统Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Swagger MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/swagger-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.