Skip to main content
Glama
gurvinder-dhillon

Unbundle OpenAPI Specs MCP

解除 OpenAPI MCP 服务器捆绑

铁匠徽章

该项目提供了一个模型上下文协议 (MCP) 服务器,其中包含一些工具,可用于将 OpenAPI 规范文件拆分为多个文件,或将特定端点提取到一个新文件中。它允许 MCP 客户端(例如 AI 助手)以编程方式操作 OpenAPI 规范。

先决条件

  • Node.js(推荐 LTS 版本,例如 v18 或 v20)

  • npm(Node.js 附带)

Related MCP server: openapi-mcp-proxy

用法

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Unbundle OpenAPI MCP Server:

npx -y @smithery/cli install @auto-browse/unbundle_openapi_mcp --client claude

使用此服务器的最简单方法是通过npx ,这可以确保您始终使用最新版本,而无需全局安装。

npx @auto-browse/unbundle-openapi-mcp@latest

或者,您可以全局安装它(通常不推荐):

npm install -g @auto-browse/unbundle-openapi-mcp
# Then run using: unbundle-openapi-mcp

服务器将启动并监听标准输入/输出 (stdio) 上的 MCP 请求。

客户端配置

要将此服务器与 VS Code、Cline、Cursor 或 Claude Desktop 等 MCP 客户端一起使用,请将其配置添加到相应的设置文件中。推荐使用npx

VS Code / Cline / 光标

将以下内容添加到您的用户settings.json (可通过Ctrl+Shift+P > Preferences: Open User Settings (JSON) )或工作区根目录中的.vscode/mcp.json文件。

// In settings.json:
"mcp.servers": {
  "unbundle_openapi": { // You can choose any key name
    "command": "npx",
    "args": [
      "@auto-browse/unbundle-openapi-mcp@latest"
    ]
  }
  // ... other servers can be added here
},

// Or in .vscode/mcp.json (omit the top-level "mcp.servers"):
{
  "unbundle_openapi": { // You can choose any key name
    "command": "npx",
    "args": [
      "@auto-browse/unbundle-openapi-mcp@latest"
    ]
  }
  // ... other servers can be added here
}

克劳德桌面

将以下内容添加到您的claude_desktop_config.json文件中。

{
	"mcpServers": {
		"unbundle_openapi": {
			// You can choose any key name
			"command": "npx",
			"args": ["@auto-browse/unbundle-openapi-mcp@latest"]
		}
		// ... other servers can be added here
	}
}

添加配置后,重新启动客户端应用程序以使更改生效。

提供的 MCP 工具

split_openapi

**描述:**执行redocly split命令,根据 OpenAPI 定义文件的结构将其解绑为多个较小的文件。

参数:

  • apiPath (字符串,必需):输入 OpenAPI 定义文件的绝对路径(例如, openapi.yaml )。

  • outputDir (字符串,必需):保存分割输出文件的目录的绝对路径。如果该目录不存在,则会创建。

返回:

  • 成功时:包含来自redocly split命令的标准输出的文本消息(通常是确认消息)。

  • 失败时:包含命令执行的标准错误或异常详细信息的错误消息,标记为isError: true

使用示例(概念 MCP 请求):

{
	"tool_name": "split_openapi",
	"arguments": {
		"apiPath": "/path/to/your/openapi.yaml",
		"outputDir": "/path/to/output/directory"
	}
}

extract_openapi_endpoints

**描述:**从大型 OpenAPI 定义文件中提取特定端点,并创建一个新的、较小的 OpenAPI 文件,该文件仅包含这些端点及其引用的组件。它通过拆分原始文件、修改结构以仅保留指定路径,然后打包结果来实现此目的。

参数:

  • inputApiPath (字符串,必需):大型输入 OpenAPI 定义文件的绝对路径。

  • endpointsToKeep (字符串数组,必需):最终输出中要包含的确切端点路径(字符串)列表(例如, ["/api", "/api/projects/{id}{.format}"] )。原始规范中未找到的路径将被忽略。

  • outputApiPath (字符串,必需):最终较小的打包 OpenAPI 文件的绝对路径。如果目录不存在,则会创建该目录。

返回:

  • 成功时:一条文本消息,指示所创建文件的路径和来自redocly bundle命令的标准输出。

  • 失败时:包含失败步骤(拆分、修改、捆绑)详细信息的错误消息,标记为isError: true

使用示例(概念 MCP 请求):

{
	"tool_name": "extract_openapi_endpoints",
	"arguments": {
		"inputApiPath": "/path/to/large-openapi.yaml",
		"endpointsToKeep": ["/users", "/users/{userId}/profile"],
		"outputApiPath": "/path/to/extracted-openapi.yaml"
	}
}

**注意:**此服务器内部使用npx @redocly/cli@latest extract_openapi_endpoints执行底层splitbundle命令。如果@redocly/cli未缓存,则可能需要互联网连接才能让npx获取该命令。extract_openapi_endpoints 过程中会创建临时文件,并会自动清理。

发展

如果您想贡献或从源代码运行服务器:

  1. **克隆:**克隆此存储库。

  2. 导航: cd unbundle_openapi_mcp

  3. 安装依赖项: npm install

  4. 构建: npm run build (将 TypeScript 编译为dist/

  5. 运行: npm start (使用dist/中的编译代码启动服务器)

Available Tools

2 tools
extract_openapi_endpointsD
ParametersJSON Schema
NameRequiredDescriptionDefault
endpointsToKeepYesList of exact endpoint paths to keep (e.g., ['/users', '/users/{id}']).
inputApiPathYesAbsolute path to the large input OpenAPI definition file.
outputApiPathYesAbsolute path where the final, smaller bundled OpenAPI file should be saved.

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

split_openapiD
ParametersJSON Schema
NameRequiredDescriptionDefault
apiPathYesAbsolute path to the input OpenAPI definition file.
outputDirYesAbsolute path to the directory for split output files.

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

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.

  1. 2 tool updatesv1.0.0
    • First observedextract_openapi_endpoints
    • First observedsplit_openapi

TDQS

D1.7/5.0
Disambiguation4/5

The two tools have clearly distinct purposes: 'extract_openapi_endpoints' likely retrieves endpoints from an OpenAPI spec, while 'split_openapi' probably divides a spec into parts. There is no overlap in functionality, though the lack of descriptions leaves some room for minor uncertainty about exact differences.

Naming Consistency5/5

Both tools follow a consistent snake_case naming pattern with a verb_noun structure ('extract_endpoints', 'split_openapi'). The naming is predictable and aligned, making it easy to understand the action and target for each tool.

Tool Count2/5

With only two tools, the server feels thin for its purpose of unbundling OpenAPI specs. This limited set may not cover essential operations like validation, merging, or transformation, leaving obvious gaps in functionality for a domain that typically requires more comprehensive handling.

Completeness2/5

The tool surface is severely incomplete for unbundling OpenAPI specs. Missing are tools for tasks such as validating specs, merging split parts, converting formats, or handling errors. Agents will likely encounter dead ends when trying to perform common workflows in this domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server providing token-efficient access to OpenAPI/Swagger specs via MCP Resources for client-side exploration.
    234
    76
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Parses Swagger 2.0 and OpenAPI 3.x specifications, exposing API endpoints, schemas, and authentication through MCP tools with local caching to reduce token usage.
    11
    27
    1
    MIT

Latest Blog Posts

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/gurvinder-dhillon/unbundle_openapi_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server