Swagger MCP Server
Generates API client code that uses Axios as the HTTP client, allowing for simple integration with Swagger/OpenAPI definitions
Generates React Query hooks from Swagger/OpenAPI definitions, providing data fetching capabilities with built-in caching for React applications
Parses Swagger/OpenAPI documents (v2 and v3) to extract API operations and schema definitions that can be used for generating TypeScript types and API clients
Generates TypeScript type definitions from Swagger/OpenAPI schemas with options for namespaces, strict typing, and enum generation
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Swagger MCP Servergenerate TypeScript types from https://petstore3.swagger.io/api/v3/openapi.json"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Swagger MCP 服务器
一个基于Model Context Protocol (MCP)的服务器,用于解析Swagger/OpenAPI文档并生成TypeScript类型和API客户端代码。
功能特点
解析Swagger/OpenAPI文档,支持v2和v3规范
生成TypeScript类型定义
生成不同框架的API客户端代码(Axios、Fetch、React Query等)
通过MCP协议提供这些功能,便于与大型语言模型集成
优化的大型文档处理:
内存和文件系统缓存机制
懒加载解析策略
增量解析与部分结果返回
进度反馈
自动识别不同格式的Swagger UI URLs
Related MCP server: MCP OpenAPI Server
快速开始
安装依赖
npm install
# 或者使用pnpm
pnpm install启动服务器
node start-server.js服务器默认使用标准输入/输出通信。
使用MCP工具
可以通过标准输入/输出与MCP服务器通信。以下是一些示例:
# 解析Swagger文档
node examples/optimized-swagger-parser-example.js
# 生成TypeScript类型
node examples/typescript-generator-example.js
# 生成API客户端
node examples/api-client-generator-example.js可用工具
1. Swagger/OpenAPI解析工具
标准解析工具 (parse-swagger)
{
"method": "parse-swagger",
"params": {
"url": "https://petstore3.swagger.io/api/v3/openapi.json",
"includeSchemas": true,
"includeDetails": true
}
}优化解析工具 (parse-swagger-optimized)
适用于完整解析,带有高级选项:
{
"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"
}
}轻量级解析工具 (parse-swagger-lite)
为大型文档优化,快速但只返回基本信息:
{
"method": "parse-swagger-lite",
"params": {
"url": "https://petstore3.swagger.io/api/v3/openapi.json",
"includeSchemas": false,
"includeDetails": false,
"useCache": true,
"skipValidation": true
}
}2. TypeScript类型生成工具
标准类型生成器 (generate-typescript-types)
{
"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
}
}优化类型生成器 (generate-typescript-types-optimized)
{
"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"]
}
}3. API客户端生成工具
标准API客户端生成器 (generate-api-client)
{
"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"
}
}优化API客户端生成器 (generate-api-client-optimized)
{
"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"]
}
}4. 文件写入工具
{
"method": "file-writer",
"params": {
"filePath": "./output.txt",
"content": "Hello, world!",
"createDirs": true
}
}处理大型API文档
对于大型API文档,推荐使用以下配置:
使用优化版工具,启用缓存和懒加载
使用标签或路径前缀过滤,只获取需要的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客户端框架:
Axios: 功能全面的Promise基HTTP客户端
Fetch: 浏览器原生API,无需额外依赖
React Query: 用于React应用的数据获取和缓存库,提供hooks和缓存功能
示例 - 生成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安装
要通过Smithery为Claude Desktop自动安装swagger-mcp-server:
npx -y @smithery/cli install @tuskermanshu/swagger-mcp-server --client claude构建
# 构建项目
npm run build
# 或使用pnpm
pnpm build可用的MCP工具
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- 将内容写入文件系统
Available Tools
12 toolsfile_writerC
Write content to the specified file path, with support for automatic directory creation
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Complete path of the file | |
| content | Yes | Content to be written to the file | |
| createDirs | No | Whether to automatically create parent directories if they do not exist | |
| append | No | Whether to append to an existing file instead of overwriting it | |
| encoding | No | File encoding | utf8 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'automatic directory creation' which adds useful context beyond basic writing, but fails to address critical behavioral aspects: whether the operation overwrites existing files by default (though the schema shows append defaults to false), what happens on permission errors, whether it's idempotent, or what the return value looks like (no output schema). For a mutation tool with zero annotation coverage, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that immediately conveys the core functionality and key feature. Every word earns its place with no redundancy or fluff. It's appropriately sized for a tool with comprehensive schema documentation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a file mutation tool with 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't address error conditions, permission requirements, idempotency, or return values. While the schema covers parameter definitions well, the description fails to provide the behavioral context needed for safe and effective tool invocation in the absence of annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'automatic directory creation' which corresponds to the createDirs parameter, but doesn't provide additional semantic context about when or why to use specific parameters. The baseline of 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'write' and resource 'content to the specified file path', making the purpose unambiguous. It distinguishes itself from sibling tools like template-save or template-get by focusing on raw file operations rather than template management. However, it doesn't explicitly differentiate from potential file-related siblings that might exist in other contexts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. While it mentions 'automatic directory creation' as a feature, it doesn't specify scenarios where this tool is preferred over other file operations or template management tools in the sibling list. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate-api-clientC
Generate API client code from Swagger/OpenAPI document.
| Name | Required | Description | Default |
|---|---|---|---|
| swaggerUrl | Yes | Swagger/OpenAPI document URL | |
| outputDir | No | Output directory | |
| overwrite | No | Whether to overwrite existing files | |
| filePrefix | No | File prefix | |
| fileSuffix | No | File suffix | |
| clientType | No | API client technology stack | |
| generateTypeImports | No | Whether to generate type imports | |
| typesImportPath | No | Types import path | |
| groupBy | No | Grouping method | |
| includeTags | No | Include tags filter | |
| excludeTags | No | Exclude tags filter | |
| headers | No | Request headers |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions generation but doesn't disclose behavioral traits like whether this creates files locally, requires network access for the Swagger URL, has rate limits, or what happens on failure. The description is minimal and lacks essential operational context for a code generation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the core purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (12 parameters, no annotations, no output schema), the description is inadequate. It doesn't explain what the generated output looks like, how files are structured, error handling, or dependencies. For a code generation tool with many configuration options, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 12 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain relationships between parameters like 'filePrefix' and 'fileSuffix', or clarify the 'clientType' enum options). Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate API client code from Swagger/OpenAPI document.' It specifies the verb ('Generate') and resource ('API client code'), but doesn't differentiate from siblings like 'generate-api-client-optimized' or 'generate-typescript-types', which would require more specificity about what makes this tool unique.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. With siblings like 'generate-api-client-optimized', 'generate-typescript-types', and various 'parse-swagger' tools, the description offers no context about differences, prerequisites, or appropriate scenarios for this specific tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate-api-client-optimizedB
Generate API client code from Swagger/OpenAPI document (optimized version with caching and large document support).
| Name | Required | Description | Default |
|---|---|---|---|
| swaggerUrl | Yes | Swagger/OpenAPI document URL | |
| outputDir | No | Output directory | |
| overwrite | No | Whether to overwrite existing files | |
| filePrefix | No | File prefix | |
| fileSuffix | No | File suffix | |
| clientType | No | API client technology stack | |
| generateTypeImports | No | Whether to generate type imports | |
| typesImportPath | No | Types import path | |
| groupBy | No | Grouping method | |
| includeTags | No | Include tags filter | |
| excludeTags | No | Exclude tags filter | |
| headers | No | Request headers | |
| useCache | No | Whether to use cache | |
| cacheTTLMinutes | No | Cache TTL in minutes | |
| skipValidation | No | Whether to skip validation | |
| lazyLoading | No | Whether to use lazy loading |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'caching and large document support' which provides some context about performance characteristics, but doesn't describe what the tool actually produces (e.g., file structure, code format), whether it validates the Swagger document, what happens on failure, or any side effects like file system modifications. For a complex 16-parameter tool with no annotations, this is insufficient behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that efficiently communicates the core purpose and key differentiators. Every word earns its place: 'Generate API client code' (action), 'from Swagger/OpenAPI document' (input), 'optimized version' (differentiator), 'with caching and large document support' (key features). No wasted words or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 16 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the output looks like (files generated, structure), doesn't mention error handling, doesn't describe the caching behavior in detail, and provides minimal guidance on when to use this versus alternatives. The description leaves too many questions unanswered for such a sophisticated code generation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so all parameters are documented in the schema itself. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions 'caching' which relates to the 'useCache' and 'cacheTTLMinutes' parameters, but doesn't provide additional semantic context. With complete schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate API client code from Swagger/OpenAPI document' with the specific verb 'generate' and resource 'API client code'. It distinguishes from the sibling 'generate-api-client' by mentioning 'optimized version with caching and large document support', but doesn't explicitly differentiate from other code generation siblings like 'generate-typescript-types'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through 'optimized version with caching and large document support', suggesting this tool should be used when those features are needed. However, it doesn't provide explicit guidance on when to choose this over the non-optimized 'generate-api-client' sibling or when to use other code generation tools like 'generate-typescript-types'. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate-typescript-typesC
Generate TypeScript type definitions from Swagger/OpenAPI document.
| Name | Required | Description | Default |
|---|---|---|---|
| swaggerUrl | Yes | Swagger/OpenAPI document URL | |
| outputDir | No | Output directory | |
| overwrite | No | Whether to overwrite existing files | |
| filePrefix | No | File prefix | |
| fileSuffix | No | File suffix | |
| useNamespace | No | Whether to use namespace for wrapping types | |
| namespace | No | Namespace name | |
| generateEnums | No | Whether to generate enum types | |
| strictTypes | No | Whether to use strict types | |
| excludeSchemas | No | Array of schema names to exclude | |
| includeSchemas | No | Array of schema names to include | |
| generateIndex | No | Whether to generate an index file | |
| headers | No | Request headers | |
| useCache | No | Whether to use cache | |
| cacheTTLMinutes | No | Cache TTL in minutes | |
| skipValidation | No | Whether to skip validation | |
| lazyLoading | No | Whether to use lazy loading |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility for behavioral disclosure. While 'Generate' implies a write operation, it doesn't specify file system impacts, error handling, or performance characteristics. The description lacks details about what gets created/destroyed, authentication needs, rate limits, or output format, which are critical for a tool with 17 parameters and file generation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that efficiently conveys the core functionality without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to quickly understand the tool's purpose. Every word earns its place in this concise statement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (17 parameters, file generation, no output schema, and no annotations), the description is insufficient. It doesn't explain what the output looks like, how files are structured, error conditions, or dependencies. For a code generation tool with many configuration options, more context about behavioral expectations and results is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, meaning all parameters are documented in the input schema. The description doesn't add any parameter-specific information beyond the generic purpose statement. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Generate TypeScript type definitions from Swagger/OpenAPI document.' It specifies the verb ('Generate'), resource ('TypeScript type definitions'), and source ('Swagger/OpenAPI document'). However, it doesn't explicitly differentiate from sibling tools like 'generate-typescript-types-optimized' or 'generate-api-client', which could cause confusion about when to choose this specific tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With siblings like 'generate-typescript-types-optimized' and 'generate-api-client', there's no indication of differences in performance, output format, or use cases. This omission leaves the agent without context for tool selection among similar options.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate-typescript-types-optimizedB
Generate TypeScript type definitions from Swagger/OpenAPI document with optimized options for caching and large document support.
| Name | Required | Description | Default |
|---|---|---|---|
| swaggerUrl | Yes | Swagger/OpenAPI document URL | |
| outputDir | No | Output directory | |
| overwrite | No | Whether to overwrite existing files | |
| filePrefix | No | File prefix | |
| fileSuffix | No | File suffix | |
| useNamespace | No | Whether to use namespace for wrapping types | |
| namespace | No | Namespace name | |
| generateEnums | No | Whether to generate enum types | |
| strictTypes | No | Whether to use strict types | |
| excludeSchemas | No | Array of schema names to exclude | |
| includeSchemas | No | Array of schema names to include | |
| generateIndex | No | Whether to generate an index file | |
| headers | No | Request headers | |
| useCache | No | Whether to use cache | |
| cacheTTLMinutes | No | Cache TTL in minutes | |
| skipValidation | No | Whether to skip validation | |
| lazyLoading | No | Whether to use lazy loading |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'optimized options for caching and large document support', which hints at performance behaviors, but doesn't disclose critical traits like whether this is a read-only or mutation operation (e.g., file writing), error handling, rate limits, or authentication needs. For a tool with 17 parameters and no annotations, this is a significant gap in behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the core purpose and key differentiators ('optimized options for caching and large document support'). It is front-loaded with the main action and avoids unnecessary details, making it appropriately concise for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the high parameter count (17), no annotations, and no output schema, the description is incomplete. It covers the basic purpose and hints at optimizations but lacks details on behavioral traits, output format, or error handling. The schema handles parameter documentation well, but the description doesn't compensate for the missing annotation and output context, making it only minimally adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 17 parameters thoroughly. The description adds no parameter-specific information beyond the general 'optimized options for caching and large document support', which loosely relates to parameters like 'useCache' and 'cacheTTLMinutes'. With high schema coverage, the baseline is 3, as the description provides minimal additional semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate TypeScript type definitions from Swagger/OpenAPI document' with the specific verb 'generate' and resource 'TypeScript type definitions'. It distinguishes from the sibling 'generate-typescript-types' by mentioning 'optimized options for caching and large document support', though it doesn't explicitly contrast with all siblings like 'generate-api-client'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through 'optimized options for caching and large document support', suggesting this tool is preferred for performance or scalability needs. However, it lacks explicit guidance on when to use this versus alternatives like 'generate-typescript-types' (non-optimized) or 'generate-api-client', and doesn't mention prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
parse-swaggerB
Parse Swagger/OpenAPI document and return API operation information.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Swagger/OpenAPI document URL | |
| headers | No | Request headers | |
| includeSchemas | No | Whether to include schema definitions | |
| includeDetails | No | Whether to include all details like request bodies, responses, etc. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions parsing and returning information but doesn't describe important behaviors like error handling (e.g., invalid URLs, malformed documents), performance characteristics, or whether it makes network requests (implied by URL parameter but not explicit). For a tool with no annotation coverage, this leaves significant gaps in understanding how it operates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that efficiently communicates the core functionality. It's front-loaded with the essential information and contains no unnecessary words or redundant explanations. Every word earns its place in this minimal but complete statement of purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters including nested objects, no output schema, no annotations), the description is adequate but incomplete. It explains what the tool does at a high level but lacks details about output format, error conditions, or behavioral characteristics. The description would benefit from additional context about what 'API operation information' includes and how it's structured.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, providing clear documentation for all four parameters. The description adds no additional parameter semantics beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Parse Swagger/OpenAPI document and return API operation information.' It specifies the verb (parse), resource (Swagger/OpenAPI document), and output (API operation information). However, it doesn't explicitly differentiate from sibling tools like 'parse-swagger-lite' or 'parse-swagger-optimized', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools like 'parse-swagger-lite' and 'parse-swagger-optimized', there's no indication of differences in functionality, performance, or use cases. The description only states what the tool does, not when it should be selected over other options.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
parse-swagger-liteA
Lightweight parsing of Swagger/OpenAPI document, faster but returns only basic information (suitable for large documents).
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Swagger/OpenAPI document URL | |
| headers | No | Request headers | |
| includeSchemas | No | Whether to include schema definitions | |
| includeDetails | No | Whether to include all details like request bodies, responses, etc. | |
| skipValidation | No | Whether to skip validation, used for handling non-fully compliant API documents | |
| useCache | No | Whether to use cache | |
| cacheTTLMinutes | No | Cache TTL in minutes | |
| lazyLoading | No | Whether to use lazy loading for schema parsing | |
| filterTag | No | Filter operations by tag | |
| pathPrefix | No | Filter operations by path prefix |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'faster' (performance characteristic) and 'returns only basic information' (output limitation), which adds some behavioral context. However, it doesn't address important aspects like whether this is a read-only operation, potential rate limits, authentication requirements, error handling, or what 'basic information' specifically includes. For a parsing tool with 10 parameters, this is insufficient behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that efficiently communicates the tool's purpose, performance characteristics, and appropriate use cases. Every word earns its place with zero waste or redundancy. It's appropriately sized and front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (10 parameters, no annotations, no output schema), the description is somewhat incomplete. While it effectively communicates the tool's purpose and when to use it, it lacks details about what 'basic information' specifically includes in the output, error handling, authentication requirements, and performance trade-offs. For a parsing tool with this many configuration options, more context would be helpful despite the good schema coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, meaning all 10 parameters are well-documented in the schema itself. The description doesn't add any parameter-specific information beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Lightweight parsing of Swagger/OpenAPI document' with the specific verb 'parsing' and resource 'Swagger/OpenAPI document'. It distinguishes from siblings by mentioning 'faster but returns only basic information' and 'suitable for large documents', though it doesn't explicitly name the sibling 'parse-swagger' for comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: 'faster but returns only basic information (suitable for large documents)'. This implies it should be used for performance with large documents when only basic info is needed. However, it doesn't explicitly state when NOT to use it or name alternatives like 'parse-swagger' for when more detailed parsing is required.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
parse-swagger-optimizedC
Parse Swagger/OpenAPI document using optimized parser with caching and large document support.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Swagger/OpenAPI document URL | |
| headers | No | Request headers | |
| includeSchemas | No | Whether to include schema definitions | |
| includeDetails | No | Whether to include all details like request bodies, responses, etc. | |
| skipValidation | No | Whether to skip validation, used for handling non-fully compliant API documents | |
| useCache | No | Whether to use cache | |
| cacheTTLMinutes | No | Cache TTL in minutes | |
| lazyLoading | No | Whether to use lazy loading for schema parsing | |
| filterTag | No | Filter operations by tag | |
| pathPrefix | No | Filter operations by path prefix |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'optimized parser with caching and large document support' which hints at performance characteristics, but doesn't describe error handling, rate limits, authentication requirements, output format, or what 'optimized' entails compared to standard parsing. For a tool with 10 parameters and no annotations, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words and gets straight to the point. However, it could be slightly more structured by separating key features (e.g., 'optimized for large documents with caching support').
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (10 parameters, no annotations, no output schema), the description is incomplete. It lacks details on output format, error conditions, performance trade-offs, and when to use versus siblings. For a parsing tool with many configuration options, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 10 parameters. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain relationships between parameters like 'includeSchemas' and 'includeDetails'). Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool parses Swagger/OpenAPI documents using an optimized parser with caching and large document support. It specifies the resource (Swagger/OpenAPI document) and key capabilities (optimized parser, caching, large document support). However, it doesn't explicitly differentiate from sibling tools like 'parse-swagger' or 'parse-swagger-lite' beyond mentioning optimization.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'parse-swagger' or 'parse-swagger-lite', nor does it specify scenarios where this optimized version is preferred (e.g., for large documents, performance needs). Usage is implied through the term 'optimized' but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
template-deleteC
Delete custom template
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Template ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. 'Delete' implies a destructive mutation, but the description doesn't specify whether deletion is permanent, reversible, requires specific permissions, or what happens on success/failure. This leaves critical behavioral traits undocumented.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient phrase ('Delete custom template') with zero wasted words. It's front-loaded and appropriately sized for a simple operation, earning full marks for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context like behavioral traits (permanence, permissions), error handling, or what to expect after deletion. The description alone is insufficient for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'id' documented as 'Template ID' in the schema. The description adds no additional meaning about the parameter beyond what the schema provides, such as format examples or where to obtain the ID. The baseline of 3 is appropriate given the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Delete custom template' clearly states the action (delete) and the resource (custom template), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like template-get or template-list, but the verb 'delete' inherently differentiates it from read operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing template ID), when not to use it, or refer to sibling tools like template-get for verification before deletion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
template-getC
Get specific template content
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Template ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states 'Get' which implies a read operation, but doesn't disclose behavioral traits such as error handling (e.g., what happens if the ID is invalid), authentication needs, rate limits, or return format. This leaves significant gaps for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with just three words, front-loaded with the key action and resource. There is zero waste or redundancy, making it efficient and easy to parse, though it may be overly brief for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't cover what 'template content' entails (e.g., structure, format), error cases, or usage context, leaving the agent with insufficient information for reliable invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'id' documented as 'Template ID' in the schema. The description adds no additional meaning beyond this, as it doesn't explain the ID format, source, or constraints. With high schema coverage, the baseline is 3, and the description doesn't compensate with extra details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get specific template content' clearly states the action (get) and resource (template content), but it's vague about what 'specific' means and doesn't differentiate from sibling tools like template-list. It's better than a tautology but lacks precision about scope or format.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like template-list or template-save. The description implies retrieval of a single template but doesn't specify prerequisites, such as needing an existing template ID, or exclusions, like not being for creating or listing templates.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
template-listC
Get available code generation template list
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Template type filter | |
| framework | No | Framework type filter (only for API client and config file templates) | |
| includeContent | No | Whether to include template content |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this is a safe, idempotent call, what authentication might be required, or how results are structured (e.g., pagination, sorting). For a tool with three parameters and no output schema, this leaves significant behavioral aspects undocumented.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it immediately scannable. Every word serves a clear function, and there's no redundancy or fluff, exemplifying optimal conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (3 parameters, no output schema, and no annotations), the description is insufficiently complete. It doesn't address what the output looks like (e.g., list format, fields), how to handle multiple templates, or error conditions. With siblings involving template operations, more context is needed to ensure proper integration and usage in workflows.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter-specific information beyond what's already in the schema, which has 100% coverage with clear descriptions and enums. This meets the baseline of 3 since the schema adequately documents all parameters. However, the description doesn't explain how parameters interact (e.g., that 'framework' only applies to certain 'type' values) or provide usage examples, missing opportunities to enhance understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('available code generation template list'), making the purpose immediately understandable. It distinguishes itself from siblings like template-delete, template-get, and template-save by focusing on listing rather than modifying or retrieving individual templates. However, it doesn't explicitly differentiate from other list-like operations among siblings, keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With siblings like template-get (for individual templates) and generate-* tools (for code generation), there's no indication of appropriate contexts, prerequisites, or exclusions. This lack of usage context leaves the agent to infer relationships, which could lead to incorrect tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
template-saveC
Save or update template
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Template ID | |
| name | Yes | Template name | |
| type | Yes | Template type | |
| framework | No | Framework type (only for API client and config file templates) | |
| content | Yes | Template content | |
| description | No | Template description |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'save or update' which implies mutation, but doesn't disclose behavioral traits like required permissions, whether operations are idempotent, error handling, or side effects. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with just three words, front-loaded with the core action. There's zero waste or redundancy, making it easy to parse quickly, though this conciseness comes at the cost of detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a mutation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't cover return values, error cases, or behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond basic parameter passing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds no meaning beyond what the schema provides—it doesn't explain parameter interactions (e.g., how 'id' determines save vs. update) or provide additional context. Baseline 3 is appropriate when the schema does all the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Save or update template' states the basic action (save/update) and resource (template), but it's vague about what constitutes saving vs. updating and doesn't distinguish this tool from its siblings like template-delete or template-get. It provides minimal differentiation beyond the tool name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing ID for updates), compare to sibling tools like template-delete or template-get, or specify scenarios for saving versus updating. The description lacks any contextual usage instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
12 tool updates
- First observed
file_writer - First observed
generate-api-client - First observed
generate-api-client-optimized - First observed
generate-typescript-types - First observed
generate-typescript-types-optimized - First observed
parse-swagger - First observed
parse-swagger-lite - First observed
parse-swagger-optimized - First observed
template-delete - First observed
template-get - First observed
template-list - First observed
template-save
TDQS
Multiple tools have overlapping purposes that could cause confusion. For example, generate-api-client, generate-api-client-optimized, parse-swagger, parse-swagger-lite, and parse-swagger-optimized all appear to serve similar functions with minor variations in performance or features, making it difficult for an agent to choose the right one without detailed context. The template tools are clearer but the core parsing/generation tools have significant ambiguity.
The naming shows mixed conventions. Most tools use snake_case (e.g., file_writer, parse-swagger), but some use kebab-case (e.g., generate-api-client) or a mix (e.g., parse-swagger-lite). The template tools follow a consistent verb_noun pattern (template-delete, template-get, etc.), but overall the server lacks a uniform naming style, reducing predictability.
With 12 tools, the count is reasonable for a Swagger/OpenAPI server that handles parsing, code generation, and template management. It's slightly high due to redundant optimized/lite versions, but still within a manageable scope for the domain, avoiding the extremes of being too thin or overwhelming.
The tool set covers key areas for Swagger/OpenAPI processing: parsing documents, generating client code and TypeScript types, and managing templates. Minor gaps exist, such as no direct tool for validating Swagger documents or handling server-side code generation, but core workflows are well-supported, allowing agents to perform essential tasks without major dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- typeshipOAuthdev.typeship
Generate a typed SDK, CLI, and MCP server from any OpenAPI or GraphQL spec, and keep them current.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- -licenseAqualityNot gradedmaintenanceA TypeScript-based MCP server that generates API clients from OpenAPI specifications, allowing automated code generation through natural language.1441-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that loads multiple OpenAPI specifications and exposes them to LLM-powered IDE integrations, enabling AI to understand and work with your APIs directly in development tools like Cursor.78390MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server that converts OpenAPI/Swagger specifications to MCP format, enabling AI assistants to interact with REST APIs through standardized protocol.74TypeScriptMIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server that automates code generation for web development, specializing in creating TypeScript API clients from Swagger/OpenAPI specs and Vue.js components for frontend development.322MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tuskermanshu/swagger-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server