mcp-openapi-schema-explorer 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +113 -58
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +13 -9
- package/.devcontainer/Dockerfile +0 -3
- package/.devcontainer/devcontainer.json +0 -24
- package/.github/dependabot.yml +0 -13
- package/.github/workflows/ci.yml +0 -132
- package/.husky/pre-commit +0 -3
- package/.prettierignore +0 -3
- package/.prettierrc.json +0 -12
- package/.releaserc.json +0 -31
- package/CONTRIBUTING.md +0 -67
- package/Dockerfile +0 -32
- package/eslint.config.js +0 -88
- package/jest.config.js +0 -32
- package/justfile +0 -66
- package/memory-bank/activeContext.md +0 -155
- package/memory-bank/productContext.md +0 -41
- package/memory-bank/progress.md +0 -149
- package/memory-bank/projectbrief.md +0 -50
- package/memory-bank/systemPatterns.md +0 -227
- package/memory-bank/techContext.md +0 -134
- package/scripts/generate-version.js +0 -49
- package/src/config.ts +0 -33
- package/src/handlers/component-detail-handler.ts +0 -121
- package/src/handlers/component-map-handler.ts +0 -92
- package/src/handlers/handler-utils.ts +0 -230
- package/src/handlers/operation-handler.ts +0 -114
- package/src/handlers/path-item-handler.ts +0 -88
- package/src/handlers/top-level-field-handler.ts +0 -92
- package/src/index.ts +0 -233
- package/src/rendering/components.ts +0 -251
- package/src/rendering/document.ts +0 -167
- package/src/rendering/path-item.ts +0 -163
- package/src/rendering/paths.ts +0 -87
- package/src/rendering/types.ts +0 -63
- package/src/rendering/utils.ts +0 -133
- package/src/services/formatters.ts +0 -71
- package/src/services/reference-transform.ts +0 -105
- package/src/services/spec-loader.ts +0 -88
- package/src/types.ts +0 -17
- package/src/utils/uri-builder.ts +0 -134
- package/src/version.ts +0 -4
- package/test/__tests__/e2e/format.test.ts +0 -224
- package/test/__tests__/e2e/resources.test.ts +0 -369
- package/test/__tests__/e2e/spec-loading.test.ts +0 -172
- package/test/__tests__/unit/config.test.ts +0 -39
- package/test/__tests__/unit/handlers/component-detail-handler.test.ts +0 -241
- package/test/__tests__/unit/handlers/component-map-handler.test.ts +0 -187
- package/test/__tests__/unit/handlers/handler-utils.test.ts +0 -255
- package/test/__tests__/unit/handlers/operation-handler.test.ts +0 -202
- package/test/__tests__/unit/handlers/path-item-handler.test.ts +0 -153
- package/test/__tests__/unit/handlers/top-level-field-handler.test.ts +0 -182
- package/test/__tests__/unit/rendering/components.test.ts +0 -280
- package/test/__tests__/unit/rendering/document.test.ts +0 -172
- package/test/__tests__/unit/rendering/path-item.test.ts +0 -198
- package/test/__tests__/unit/rendering/paths.test.ts +0 -115
- package/test/__tests__/unit/services/formatters.test.ts +0 -109
- package/test/__tests__/unit/services/reference-transform.test.ts +0 -320
- package/test/__tests__/unit/services/spec-loader.test.ts +0 -214
- package/test/__tests__/unit/utils/uri-builder.test.ts +0 -103
- package/test/fixtures/complex-endpoint.json +0 -146
- package/test/fixtures/empty-api.json +0 -8
- package/test/fixtures/multi-component-types.json +0 -55
- package/test/fixtures/paths-test.json +0 -61
- package/test/fixtures/sample-api.json +0 -68
- package/test/fixtures/sample-v2-api.json +0 -39
- package/test/setup.ts +0 -32
- package/test/utils/console-helpers.ts +0 -48
- package/test/utils/mcp-test-helpers.ts +0 -66
- package/test/utils/test-types.ts +0 -54
- package/tsconfig.json +0 -25
- package/tsconfig.test.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.3.1](https://github.com/kadykov/mcp-openapi-schema-explorer/compare/v1.3.0...v1.3.1) (2025-11-20)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **package:** exclude unnecessary files from npm artifact ([b1fc7f6](https://github.com/kadykov/mcp-openapi-schema-explorer/commit/b1fc7f677ad7e008f078956cbc8e1e3f16b2679f))
|
|
6
|
+
|
|
7
|
+
# [1.3.0](https://github.com/kadykov/mcp-openapi-schema-explorer/compare/v1.2.1...v1.3.0) (2025-08-12)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Use more generic instructions ([1372aae](https://github.com/kadykov/mcp-openapi-schema-explorer/commit/1372aaea824f2b9eb5d4c3569acc4f38c82550fd))
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- add brief instructions so LLMs can better understand how to use the server ([c55c4ec](https://github.com/kadykov/mcp-openapi-schema-explorer/commit/c55c4ec029a7603746bf506340d8e3ffd54a6532))
|
|
16
|
+
|
|
1
17
|
## [1.2.1](https://github.com/kadykov/mcp-openapi-schema-explorer/compare/v1.2.0...v1.2.1) (2025-04-13)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://github.com/kadykov/mcp-openapi-schema-explorer/raw/main/assets/logo.min.svg" alt="MCP OpenAPI Schema Explorer Logo" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# MCP OpenAPI Schema Explorer
|
|
2
6
|
|
|
3
7
|
[](https://badge.fury.io/js/mcp-openapi-schema-explorer)
|
|
8
|
+
[](https://badge.fury.io/js/mcp-openapi-schema-explorer)
|
|
9
|
+
[](https://hub.docker.com/r/kadykov/mcp-openapi-schema-explorer)
|
|
4
10
|
[](https://opensource.org/licenses/MIT)
|
|
5
11
|
[](https://codecov.io/gh/kadykov/mcp-openapi-schema-explorer)
|
|
12
|
+
[](https://mseep.ai/app/819a3ba3-ad54-4657-9241-648497e57d7b)
|
|
13
|
+
[](https://github.com/kadykov/mcp-openapi-schema-explorer)
|
|
14
|
+
[](https://archestra.ai/mcp-catalog/kadykov__mcp-openapi-schema-explorer)
|
|
6
15
|
|
|
7
16
|
An MCP (Model Context Protocol) server that provides token-efficient access to OpenAPI (v3.0) and Swagger (v2.0) specifications via **MCP Resources**.
|
|
8
17
|
|
|
@@ -23,21 +32,52 @@ While other MCP servers exist that provide access to OpenAPI specs via _Tools_,
|
|
|
23
32
|
|
|
24
33
|
For more details on MCP clients and their capabilities, see the [MCP Client Documentation](https://modelcontextprotocol.io/clients).
|
|
25
34
|
|
|
26
|
-
##
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
For the recommended usage methods (`npx` and Docker, described below), **no separate installation step is required**. Your MCP client will download the package or pull the Docker image automatically based on the configuration you provide.
|
|
38
|
+
|
|
39
|
+
However, if you prefer or need to install the server explicitly, you have two options:
|
|
40
|
+
|
|
41
|
+
1. **Global Installation:** You can install the package globally using npm:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g mcp-openapi-schema-explorer
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
See **Method 3** below for how to configure your MCP client to use a globally installed server.
|
|
48
|
+
|
|
49
|
+
2. **Local Development/Installation:** You can clone the repository and build it locally:
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git
|
|
52
|
+
cd mcp-openapi-schema-explorer
|
|
53
|
+
npm install
|
|
54
|
+
npm run build
|
|
55
|
+
```
|
|
56
|
+
See **Method 4** below for how to configure your MCP client to run the server from your local build using `node`.
|
|
57
|
+
|
|
58
|
+
## Adding the Server to your MCP Client
|
|
27
59
|
|
|
28
|
-
This server is designed to be run by MCP clients.
|
|
60
|
+
This server is designed to be run by MCP clients (like Claude Desktop, Windsurf, Cline, etc.). To use it, you add a configuration entry to your client's settings file (often a JSON file). This entry tells the client how to execute the server process (e.g., using `npx`, `docker`, or `node`). The server itself doesn't require separate configuration beyond the command-line arguments specified in the client settings entry.
|
|
29
61
|
|
|
30
|
-
|
|
62
|
+
Below are the common methods for adding the server entry to your client's configuration.
|
|
63
|
+
|
|
64
|
+
### Method 1: npx (Recommended)
|
|
65
|
+
|
|
66
|
+
Using `npx` is recommended as it avoids global/local installation and ensures the client uses the latest published version.
|
|
67
|
+
|
|
68
|
+
**Example Client Configuration Entry (npx Method):**
|
|
69
|
+
|
|
70
|
+
Add the following JSON object to the `mcpServers` section of your MCP client's configuration file. This entry instructs the client on how to run the server using `npx`:
|
|
31
71
|
|
|
32
72
|
```json
|
|
33
73
|
{
|
|
34
74
|
"mcpServers": {
|
|
35
|
-
"My API Spec": {
|
|
75
|
+
"My API Spec (npx)": {
|
|
36
76
|
"command": "npx",
|
|
37
77
|
"args": [
|
|
38
78
|
"-y",
|
|
39
|
-
"mcp-openapi-schema-explorer",
|
|
40
|
-
"
|
|
79
|
+
"mcp-openapi-schema-explorer@latest",
|
|
80
|
+
"<path-or-url-to-spec>",
|
|
41
81
|
"--output-format",
|
|
42
82
|
"yaml"
|
|
43
83
|
],
|
|
@@ -47,53 +87,23 @@ This server is designed to be run by MCP clients. The recommended way to configu
|
|
|
47
87
|
}
|
|
48
88
|
```
|
|
49
89
|
|
|
50
|
-
**Configuration
|
|
90
|
+
**Configuration Notes:**
|
|
51
91
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
- `"mcp-openapi-schema-explorer"`: The name of the package to execute.
|
|
57
|
-
- `"/path/to/your/local/openapi.json"`: **Required.** The absolute path to your local spec file or the full URL to a remote spec (e.g., `"https://remote/url/spec.json"`).
|
|
58
|
-
- `"--output-format", "yaml"`: **Optional.** Specifies the output format for detailed resource views. Defaults to `"json"`. Other options are `"yaml"` and `"json-minified"`.
|
|
59
|
-
- **`env`:** Currently, no environment variables are needed for this server.
|
|
92
|
+
- Replace `"My API Spec (npx)"` with a unique name for this server instance in your client.
|
|
93
|
+
- Replace `<path-or-url-to-spec>` with the absolute local file path or full remote URL of your specification.
|
|
94
|
+
- The `--output-format` is optional (`json`, `yaml`, `json-minified`), defaulting to `json`.
|
|
95
|
+
- To explore multiple specifications, add separate entries in `mcpServers`, each with a unique name and pointing to a different spec.
|
|
60
96
|
|
|
61
|
-
|
|
97
|
+
### Method 2: Docker
|
|
62
98
|
|
|
63
|
-
|
|
99
|
+
You can instruct your MCP client to run the server using the official Docker image: `kadykov/mcp-openapi-schema-explorer`.
|
|
64
100
|
|
|
65
|
-
|
|
101
|
+
**Example Client Configuration Entries (Docker Method):**
|
|
66
102
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
**Running the Container:**
|
|
70
|
-
|
|
71
|
-
The container expects the path or URL to the OpenAPI specification as a command-line argument, similar to the `npx` usage.
|
|
103
|
+
Add one of the following JSON objects to the `mcpServers` section of your MCP client's configuration file. These entries instruct the client on how to run the server using `docker run`:
|
|
72
104
|
|
|
73
105
|
- **Remote URL:** Pass the URL directly to `docker run`.
|
|
74
106
|
|
|
75
|
-
```bash
|
|
76
|
-
docker run --rm -i kadykov/mcp-openapi-schema-explorer:latest https://petstore3.swagger.io/api/v3/openapi.json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
- **Local File:** Mount the local file into the container using the `-v` flag and provide the path _inside the container_ as the argument.
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Example: Mount local file ./my-spec.yaml to /spec/api.yaml inside the container
|
|
83
|
-
docker run --rm -i -v "$(pwd)/my-spec.yaml:/spec/api.yaml" kadykov/mcp-openapi-schema-explorer:latest /spec/api.yaml
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
_(Note: Replace `$(pwd)/my-spec.yaml` with the actual path to your local file)_
|
|
87
|
-
|
|
88
|
-
- **Output Format:** You can still use the `--output-format` flag:
|
|
89
|
-
```bash
|
|
90
|
-
docker run --rm -i kadykov/mcp-openapi-schema-explorer:latest https://petstore3.swagger.io/api/v3/openapi.json --output-format yaml
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Example MCP Client Configuration (Docker):**
|
|
94
|
-
|
|
95
|
-
Here's how you might configure this in a client like Claude Desktop (`claude_desktop_config.json`):
|
|
96
|
-
|
|
97
107
|
- **Using a Remote URL:**
|
|
98
108
|
|
|
99
109
|
```json
|
|
@@ -106,7 +116,7 @@ Here's how you might configure this in a client like Claude Desktop (`claude_des
|
|
|
106
116
|
"--rm",
|
|
107
117
|
"-i",
|
|
108
118
|
"kadykov/mcp-openapi-schema-explorer:latest",
|
|
109
|
-
"
|
|
119
|
+
"<remote-url-to-spec>"
|
|
110
120
|
],
|
|
111
121
|
"env": {}
|
|
112
122
|
}
|
|
@@ -114,7 +124,7 @@ Here's how you might configure this in a client like Claude Desktop (`claude_des
|
|
|
114
124
|
}
|
|
115
125
|
```
|
|
116
126
|
|
|
117
|
-
- **Using a Local File:**
|
|
127
|
+
- **Using a Local File:** (Requires mounting the file into the container)
|
|
118
128
|
```json
|
|
119
129
|
{
|
|
120
130
|
"mcpServers": {
|
|
@@ -125,7 +135,7 @@ Here's how you might configure this in a client like Claude Desktop (`claude_des
|
|
|
125
135
|
"--rm",
|
|
126
136
|
"-i",
|
|
127
137
|
"-v",
|
|
128
|
-
"/full/path/to/
|
|
138
|
+
"/full/host/path/to/spec.yaml:/spec/api.yaml",
|
|
129
139
|
"kadykov/mcp-openapi-schema-explorer:latest",
|
|
130
140
|
"/spec/api.yaml",
|
|
131
141
|
"--output-format",
|
|
@@ -136,20 +146,69 @@ Here's how you might configure this in a client like Claude Desktop (`claude_des
|
|
|
136
146
|
}
|
|
137
147
|
}
|
|
138
148
|
```
|
|
139
|
-
|
|
149
|
+
**Important:** Replace `/full/host/path/to/spec.yaml` with the correct absolute path on your host machine. The path `/spec/api.yaml` is the corresponding path inside the container.
|
|
140
150
|
|
|
141
|
-
|
|
151
|
+
### Method 3: Global Installation (Less Common)
|
|
142
152
|
|
|
143
|
-
If you
|
|
153
|
+
If you have installed the package globally using `npm install -g`, you can configure your client to run it directly.
|
|
144
154
|
|
|
145
155
|
```bash
|
|
156
|
+
# Run this command once in your terminal
|
|
146
157
|
npm install -g mcp-openapi-schema-explorer
|
|
147
158
|
```
|
|
148
159
|
|
|
149
|
-
|
|
160
|
+
**Example Client Configuration Entry (Global Install Method):**
|
|
150
161
|
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
Add the following entry to your MCP client's configuration file. This assumes the `mcp-openapi-schema-explorer` command is accessible in the client's execution environment PATH.
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"mcpServers": {
|
|
167
|
+
"My API Spec (Global)": {
|
|
168
|
+
"command": "mcp-openapi-schema-explorer",
|
|
169
|
+
"args": ["<path-or-url-to-spec>", "--output-format", "yaml"],
|
|
170
|
+
"env": {}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
- Ensure the `command` (`mcp-openapi-schema-explorer`) is accessible in the PATH environment variable used by your MCP client.
|
|
177
|
+
|
|
178
|
+
### Method 4: Local Development/Installation
|
|
179
|
+
|
|
180
|
+
This method is useful if you have cloned the repository locally for development or to run a modified version.
|
|
181
|
+
|
|
182
|
+
**Setup Steps (Run once in your terminal):**
|
|
183
|
+
|
|
184
|
+
1. Clone the repository: `git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git`
|
|
185
|
+
2. Navigate into the directory: `cd mcp-openapi-schema-explorer`
|
|
186
|
+
3. Install dependencies: `npm install`
|
|
187
|
+
4. Build the project: `npm run build` (or `just build`)
|
|
188
|
+
|
|
189
|
+
**Example Client Configuration Entry (Local Development Method):**
|
|
190
|
+
|
|
191
|
+
Add the following entry to your MCP client's configuration file. This instructs the client to run the locally built server using `node`.
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"mcpServers": {
|
|
196
|
+
"My API Spec (Local Dev)": {
|
|
197
|
+
"command": "node",
|
|
198
|
+
"args": [
|
|
199
|
+
"/full/path/to/cloned/mcp-openapi-schema-explorer/dist/src/index.js",
|
|
200
|
+
"<path-or-url-to-spec>",
|
|
201
|
+
"--output-format",
|
|
202
|
+
"yaml"
|
|
203
|
+
],
|
|
204
|
+
|
|
205
|
+
"env": {}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Important:** Replace `/full/path/to/cloned/mcp-openapi-schema-explorer/dist/src/index.js` with the correct absolute path to the built `index.js` file in your cloned repository.
|
|
153
212
|
|
|
154
213
|
## Features
|
|
155
214
|
|
|
@@ -172,14 +231,12 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
|
|
|
172
231
|
**Resource Templates:**
|
|
173
232
|
|
|
174
233
|
- **`openapi://{field}`**
|
|
175
|
-
|
|
176
234
|
- **Description:** Accesses top-level fields of the OpenAPI document (e.g., `info`, `servers`, `tags`) or lists the contents of `paths` or `components`. The specific available fields depend on the loaded specification.
|
|
177
235
|
- **Example:** `openapi://info`
|
|
178
236
|
- **Output:** `text/plain` list for `paths` and `components`; configured format (JSON/YAML/minified JSON) for other fields.
|
|
179
237
|
- **Completions:** Provides dynamic suggestions for `{field}` based on the actual top-level keys found in the loaded spec.
|
|
180
238
|
|
|
181
239
|
- **`openapi://paths/{path}`**
|
|
182
|
-
|
|
183
240
|
- **Description:** Lists the available HTTP methods (operations) for a specific API path.
|
|
184
241
|
- **Parameter:** `{path}` - The API path string. **Must be URL-encoded** (e.g., `/users/{id}` becomes `users%2F%7Bid%7D`).
|
|
185
242
|
- **Example:** `openapi://paths/users%2F%7Bid%7D`
|
|
@@ -187,7 +244,6 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
|
|
|
187
244
|
- **Completions:** Provides dynamic suggestions for `{path}` based on the paths found in the loaded spec (URL-encoded).
|
|
188
245
|
|
|
189
246
|
- **`openapi://paths/{path}/{method*}`**
|
|
190
|
-
|
|
191
247
|
- **Description:** Gets the detailed specification for one or more operations (HTTP methods) on a specific API path.
|
|
192
248
|
- **Parameters:**
|
|
193
249
|
- `{path}` - The API path string. **Must be URL-encoded**.
|
|
@@ -198,7 +254,6 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
|
|
|
198
254
|
- **Completions:** Provides dynamic suggestions for `{path}`. Provides static suggestions for `{method*}` (common HTTP verbs like GET, POST, PUT, DELETE, etc.).
|
|
199
255
|
|
|
200
256
|
- **`openapi://components/{type}`**
|
|
201
|
-
|
|
202
257
|
- **Description:** Lists the names of all defined components of a specific type (e.g., `schemas`, `responses`, `parameters`). The specific available types depend on the loaded specification. Also provides a short description for each listed type.
|
|
203
258
|
- **Example:** `openapi://components/schemas`
|
|
204
259
|
- **Output:** `text/plain` list of component names with descriptions.
|
package/dist/src/index.js
CHANGED
|
@@ -42,10 +42,14 @@ async function main() {
|
|
|
42
42
|
const serverName = spec.info?.title
|
|
43
43
|
? `Schema Explorer for ${spec.info.title}`
|
|
44
44
|
: defaultServerName;
|
|
45
|
+
// Brief help content for LLMs
|
|
46
|
+
const helpContent = `Use resorces/templates/list to get a list of available resources. Use openapi://paths to get a list of all endpoints.`;
|
|
45
47
|
// Create MCP server with dynamic name
|
|
46
48
|
const server = new McpServer({
|
|
47
49
|
name: serverName,
|
|
48
50
|
version: VERSION, // Use the imported version
|
|
51
|
+
}, {
|
|
52
|
+
instructions: helpContent,
|
|
49
53
|
});
|
|
50
54
|
// Set up formatter and new handlers
|
|
51
55
|
const formatter = createFormatter(config.outputFormat);
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC,CAAC,0BAA0B;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,sBAAsB;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iC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SAAS,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,yBAAyB,EACzB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,iBAAiB;AACjB,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.3.1";
|
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-openapi-schema-explorer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "MCP OpenAPI schema explorer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"mcp-openapi-schema-explorer": "dist/src/index.js"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"CHANGELOG.md"
|
|
14
|
+
],
|
|
11
15
|
"scripts": {
|
|
12
16
|
"build": "rm -rf dist && mkdir -p dist && npx tsc && chmod +x dist/src/index.js",
|
|
13
17
|
"test": "jest",
|
|
@@ -36,11 +40,11 @@
|
|
|
36
40
|
},
|
|
37
41
|
"homepage": "https://github.com/kadykov/mcp-openapi-schema-explorer#readme",
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.10.1",
|
|
40
44
|
"js-yaml": "^4.1.0",
|
|
41
45
|
"openapi-types": "^12.1.3",
|
|
42
46
|
"swagger2openapi": "7.0.8",
|
|
43
|
-
"zod": "^
|
|
47
|
+
"zod": "^4.0.5"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"@codedependant/semantic-release-docker": "^5.1.0",
|
|
@@ -49,12 +53,12 @@
|
|
|
49
53
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
50
54
|
"@semantic-release/exec": "^7.0.3",
|
|
51
55
|
"@semantic-release/git": "^10.0.1",
|
|
52
|
-
"@semantic-release/github": "^
|
|
53
|
-
"@semantic-release/npm": "^
|
|
56
|
+
"@semantic-release/github": "^12.0.0",
|
|
57
|
+
"@semantic-release/npm": "^13.1.1",
|
|
54
58
|
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
55
|
-
"@types/jest": "^
|
|
59
|
+
"@types/jest": "^30.0.0",
|
|
56
60
|
"@types/js-yaml": "^4.0.9",
|
|
57
|
-
"@types/node": "^
|
|
61
|
+
"@types/node": "^24.0.3",
|
|
58
62
|
"@types/node-fetch": "^2.6.12",
|
|
59
63
|
"@types/swagger2openapi": "^7.0.4",
|
|
60
64
|
"@typescript-eslint/eslint-plugin": "^8.29.0",
|
|
@@ -64,13 +68,13 @@
|
|
|
64
68
|
"eslint-plugin-security": "^3.0.1",
|
|
65
69
|
"globals": "^16.0.0",
|
|
66
70
|
"husky": "^9.1.7",
|
|
67
|
-
"jest": "^
|
|
71
|
+
"jest": "^30.0.2",
|
|
68
72
|
"jest-silent-reporter": "^0.6.0",
|
|
69
73
|
"license-checker": "^25.0.1",
|
|
70
74
|
"msw": "^2.7.4",
|
|
71
75
|
"openapi-typescript": "^7.6.1",
|
|
72
76
|
"prettier": "^3.5.3",
|
|
73
|
-
"semantic-release": "^
|
|
77
|
+
"semantic-release": "^25.0.1",
|
|
74
78
|
"ts-jest": "^29.3.1",
|
|
75
79
|
"typescript": "^5.8.3"
|
|
76
80
|
}
|
package/.devcontainer/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "MCP OpenAPI Schema Explorer",
|
|
3
|
-
"dockerFile": "Dockerfile", // Updated path
|
|
4
|
-
"features": {
|
|
5
|
-
"ghcr.io/devcontainers/features/common-utils:2": {
|
|
6
|
-
"username": "vscode"
|
|
7
|
-
},
|
|
8
|
-
"ghcr.io/guiyomh/features/just:0": {}
|
|
9
|
-
},
|
|
10
|
-
"remoteUser": "vscode",
|
|
11
|
-
"postCreateCommand": "just install",
|
|
12
|
-
"customizations": {
|
|
13
|
-
"vscode": {
|
|
14
|
-
"extensions": [
|
|
15
|
-
"ms-azuretools.vscode-docker",
|
|
16
|
-
"GitHub.vscode-github-actions",
|
|
17
|
-
"saoudrizwan.claude-dev",
|
|
18
|
-
"dbaeumer.vscode-eslint",
|
|
19
|
-
"rvest.vs-code-prettier-eslint",
|
|
20
|
-
"ms-vscode.vscode-typescript-next"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
package/.github/dependabot.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: 'npm'
|
|
4
|
-
directory: '/'
|
|
5
|
-
schedule:
|
|
6
|
-
interval: 'weekly'
|
|
7
|
-
open-pull-requests-limit: 10
|
|
8
|
-
|
|
9
|
-
- package-ecosystem: 'github-actions'
|
|
10
|
-
directory: '/'
|
|
11
|
-
schedule:
|
|
12
|
-
interval: 'weekly'
|
|
13
|
-
open-pull-requests-limit: 10
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
permissions: # Add default permissions, release job will override if needed
|
|
4
|
-
contents: read
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [main]
|
|
9
|
-
tags:
|
|
10
|
-
- 'v*'
|
|
11
|
-
pull_request:
|
|
12
|
-
branches: [main]
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
test:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout code
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: Setup Node.js
|
|
22
|
-
uses: actions/setup-node@v4
|
|
23
|
-
with:
|
|
24
|
-
node-version: 22 # Match Dockerfile
|
|
25
|
-
cache: 'npm'
|
|
26
|
-
|
|
27
|
-
- name: Setup Just
|
|
28
|
-
uses: extractions/setup-just@v3
|
|
29
|
-
|
|
30
|
-
- name: Install dependencies
|
|
31
|
-
run: npm ci
|
|
32
|
-
|
|
33
|
-
- name: Run all checks (format, lint, build, test)
|
|
34
|
-
run: just all # Uses justfile for consistency
|
|
35
|
-
|
|
36
|
-
- name: Upload coverage reports artifact
|
|
37
|
-
uses: actions/upload-artifact@v4
|
|
38
|
-
with:
|
|
39
|
-
name: coverage-report-${{ github.run_id }} # Unique name per run
|
|
40
|
-
path: coverage/
|
|
41
|
-
if: always() # Upload even if previous steps fail
|
|
42
|
-
|
|
43
|
-
- name: Upload coverage to Codecov
|
|
44
|
-
uses: codecov/codecov-action@v5
|
|
45
|
-
with:
|
|
46
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
47
|
-
# fail_ci_if_error: true # Optional: fail CI if upload fails
|
|
48
|
-
|
|
49
|
-
security:
|
|
50
|
-
runs-on: ubuntu-latest
|
|
51
|
-
permissions:
|
|
52
|
-
contents: read # Needed for checkout and CodeQL
|
|
53
|
-
security-events: write # Needed for CodeQL alert uploads
|
|
54
|
-
steps:
|
|
55
|
-
- name: Checkout code
|
|
56
|
-
uses: actions/checkout@v4
|
|
57
|
-
|
|
58
|
-
- name: Setup Node.js
|
|
59
|
-
uses: actions/setup-node@v4
|
|
60
|
-
with:
|
|
61
|
-
node-version: 22 # Match Dockerfile and test job
|
|
62
|
-
cache: 'npm'
|
|
63
|
-
|
|
64
|
-
- name: Setup Just
|
|
65
|
-
uses: extractions/setup-just@v3
|
|
66
|
-
|
|
67
|
-
- name: Install dependencies
|
|
68
|
-
run: npm ci
|
|
69
|
-
|
|
70
|
-
- name: Run Security Checks (Audit, Licenses)
|
|
71
|
-
run: just security # Uses justfile, includes npm audit and license-checker
|
|
72
|
-
continue-on-error: true # Allow workflow to continue even if npm audit finds vulnerabilities
|
|
73
|
-
|
|
74
|
-
# Static code analysis with CodeQL (Keep separate as it's not in justfile)
|
|
75
|
-
- name: Initialize CodeQL
|
|
76
|
-
uses: github/codeql-action/init@v3
|
|
77
|
-
# Auto-detect languages: javascript, typescript
|
|
78
|
-
# queries: +security-extended # Optional: run more queries
|
|
79
|
-
|
|
80
|
-
- name: Perform CodeQL Analysis
|
|
81
|
-
uses: github/codeql-action/analyze@v3
|
|
82
|
-
|
|
83
|
-
release:
|
|
84
|
-
name: Release
|
|
85
|
-
runs-on: ubuntu-latest
|
|
86
|
-
needs: [test, security] # Run after test and security checks pass
|
|
87
|
-
# Run only on pushes to main, not on tags (semantic-release creates tags)
|
|
88
|
-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
89
|
-
permissions:
|
|
90
|
-
contents: write # Allow tagging, committing package.json/changelog/version.ts
|
|
91
|
-
issues: write # Allow commenting on issues/PRs
|
|
92
|
-
pull-requests: write # Allow commenting on issues/PRs
|
|
93
|
-
id-token: write # Needed for provenance publishing to npm (alternative to NPM_TOKEN)
|
|
94
|
-
steps:
|
|
95
|
-
- name: Checkout
|
|
96
|
-
uses: actions/checkout@v4
|
|
97
|
-
with:
|
|
98
|
-
persist-credentials: false
|
|
99
|
-
|
|
100
|
-
- name: Setup Node.js
|
|
101
|
-
uses: actions/setup-node@v4
|
|
102
|
-
with:
|
|
103
|
-
node-version: 22 # Match Dockerfile and other jobs
|
|
104
|
-
cache: 'npm'
|
|
105
|
-
|
|
106
|
-
- name: Install all dependencies
|
|
107
|
-
run: npm ci --include=dev
|
|
108
|
-
|
|
109
|
-
# Docker setup steps (Still needed for the environment where the action runs)
|
|
110
|
-
- name: Set up QEMU
|
|
111
|
-
uses: docker/setup-qemu-action@v3
|
|
112
|
-
- name: Set up Docker Buildx
|
|
113
|
-
uses: docker/setup-buildx-action@v3
|
|
114
|
-
- name: Log in to Docker Hub
|
|
115
|
-
uses: docker/login-action@v3
|
|
116
|
-
with:
|
|
117
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
118
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
119
|
-
|
|
120
|
-
- name: Semantic Release
|
|
121
|
-
uses: cycjimmy/semantic-release-action@v4
|
|
122
|
-
with:
|
|
123
|
-
# Add the docker plugin to extra_plugins
|
|
124
|
-
extra_plugins: |
|
|
125
|
-
@semantic-release/changelog
|
|
126
|
-
@semantic-release/exec
|
|
127
|
-
@semantic-release/git
|
|
128
|
-
@codedependant/semantic-release-docker
|
|
129
|
-
env:
|
|
130
|
-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # Use dedicated release token if needed
|
|
131
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
132
|
-
# Docker login is handled by the login-action step above
|
package/.husky/pre-commit
DELETED
package/.prettierignore
DELETED
package/.prettierrc.json
DELETED
package/.releaserc.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"branches": ["main"],
|
|
3
|
-
"plugins": [
|
|
4
|
-
"@semantic-release/commit-analyzer",
|
|
5
|
-
"@semantic-release/release-notes-generator",
|
|
6
|
-
"@semantic-release/changelog",
|
|
7
|
-
"@semantic-release/npm",
|
|
8
|
-
[
|
|
9
|
-
"@semantic-release/exec",
|
|
10
|
-
{
|
|
11
|
-
"prepareCmd": "node ./scripts/generate-version.js ${nextRelease.version}"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
"@semantic-release/git",
|
|
16
|
-
{
|
|
17
|
-
"assets": ["package.json", "package-lock.json", "CHANGELOG.md", "src/version.ts"],
|
|
18
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
"@codedependant/semantic-release-docker",
|
|
23
|
-
{
|
|
24
|
-
"dockerProject": "kadykov",
|
|
25
|
-
"dockerImage": "mcp-openapi-schema-explorer",
|
|
26
|
-
"dockerLogin": false
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"@semantic-release/github"
|
|
30
|
-
]
|
|
31
|
-
}
|