mcp-openapi-schema-explorer 1.3.0 → 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.
Files changed (80) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -6
  3. package/dist/src/version.d.ts +1 -1
  4. package/dist/src/version.js +1 -1
  5. package/package.json +8 -4
  6. package/.devcontainer/Dockerfile +0 -3
  7. package/.devcontainer/devcontainer.json +0 -24
  8. package/.github/dependabot.yml +0 -25
  9. package/.github/workflows/ci.yml +0 -132
  10. package/.husky/pre-commit +0 -3
  11. package/.prettierignore +0 -3
  12. package/.prettierrc.json +0 -12
  13. package/.releaserc.json +0 -31
  14. package/.tokeignore +0 -1
  15. package/CONTRIBUTING.md +0 -67
  16. package/DOCKERHUB_README.md +0 -126
  17. package/Dockerfile +0 -32
  18. package/assets/logo-400.png +0 -0
  19. package/assets/logo-full.png +0 -0
  20. package/eslint.config.js +0 -88
  21. package/jest.config.js +0 -32
  22. package/justfile +0 -66
  23. package/llms-install.md +0 -210
  24. package/memory-bank/activeContext.md +0 -93
  25. package/memory-bank/productContext.md +0 -41
  26. package/memory-bank/progress.md +0 -150
  27. package/memory-bank/projectbrief.md +0 -50
  28. package/memory-bank/systemPatterns.md +0 -227
  29. package/memory-bank/techContext.md +0 -134
  30. package/scripts/generate-version.js +0 -49
  31. package/src/config.ts +0 -33
  32. package/src/handlers/component-detail-handler.ts +0 -121
  33. package/src/handlers/component-map-handler.ts +0 -92
  34. package/src/handlers/handler-utils.ts +0 -230
  35. package/src/handlers/operation-handler.ts +0 -114
  36. package/src/handlers/path-item-handler.ts +0 -88
  37. package/src/handlers/top-level-field-handler.ts +0 -92
  38. package/src/index.ts +0 -241
  39. package/src/rendering/components.ts +0 -251
  40. package/src/rendering/document.ts +0 -167
  41. package/src/rendering/path-item.ts +0 -163
  42. package/src/rendering/paths.ts +0 -87
  43. package/src/rendering/types.ts +0 -63
  44. package/src/rendering/utils.ts +0 -133
  45. package/src/services/formatters.ts +0 -71
  46. package/src/services/reference-transform.ts +0 -105
  47. package/src/services/spec-loader.ts +0 -88
  48. package/src/types.ts +0 -17
  49. package/src/utils/uri-builder.ts +0 -134
  50. package/src/version.ts +0 -4
  51. package/test/__tests__/e2e/format.test.ts +0 -224
  52. package/test/__tests__/e2e/resources.test.ts +0 -369
  53. package/test/__tests__/e2e/spec-loading.test.ts +0 -172
  54. package/test/__tests__/unit/config.test.ts +0 -39
  55. package/test/__tests__/unit/handlers/component-detail-handler.test.ts +0 -247
  56. package/test/__tests__/unit/handlers/component-map-handler.test.ts +0 -193
  57. package/test/__tests__/unit/handlers/handler-utils.test.ts +0 -255
  58. package/test/__tests__/unit/handlers/operation-handler.test.ts +0 -208
  59. package/test/__tests__/unit/handlers/path-item-handler.test.ts +0 -159
  60. package/test/__tests__/unit/handlers/top-level-field-handler.test.ts +0 -181
  61. package/test/__tests__/unit/rendering/components.test.ts +0 -280
  62. package/test/__tests__/unit/rendering/document.test.ts +0 -172
  63. package/test/__tests__/unit/rendering/path-item.test.ts +0 -198
  64. package/test/__tests__/unit/rendering/paths.test.ts +0 -115
  65. package/test/__tests__/unit/services/formatters.test.ts +0 -109
  66. package/test/__tests__/unit/services/reference-transform.test.ts +0 -320
  67. package/test/__tests__/unit/services/spec-loader.test.ts +0 -214
  68. package/test/__tests__/unit/utils/uri-builder.test.ts +0 -103
  69. package/test/fixtures/complex-endpoint.json +0 -146
  70. package/test/fixtures/empty-api.json +0 -8
  71. package/test/fixtures/multi-component-types.json +0 -55
  72. package/test/fixtures/paths-test.json +0 -61
  73. package/test/fixtures/sample-api.json +0 -68
  74. package/test/fixtures/sample-v2-api.json +0 -39
  75. package/test/setup.ts +0 -32
  76. package/test/utils/console-helpers.ts +0 -48
  77. package/test/utils/mcp-test-helpers.ts +0 -66
  78. package/test/utils/test-types.ts +0 -54
  79. package/tsconfig.json +0 -25
  80. package/tsconfig.test.json +0 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
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
+
1
7
  # [1.3.0](https://github.com/kadykov/mcp-openapi-schema-explorer/compare/v1.2.1...v1.3.0) (2025-08-12)
2
8
 
3
9
  ### Bug Fixes
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="assets/logo-400.png" alt="MCP OpenAPI Schema Explorer Logo" width="200">
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
3
  </p>
4
4
 
5
5
  # MCP OpenAPI Schema Explorer
@@ -10,7 +10,8 @@
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
11
  [![codecov](https://codecov.io/gh/kadykov/mcp-openapi-schema-explorer/graph/badge.svg?token=LFDOMJ6W4W)](https://codecov.io/gh/kadykov/mcp-openapi-schema-explorer)
12
12
  [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/819a3ba3-ad54-4657-9241-648497e57d7b)
13
- [![](https://tokei.rs/b1/github/kadykov/mcp-openapi-schema-explorer?category=code)](https://github.com/kadykov/mcp-openapi-schema-explorer)
13
+ [![Lines of code](https://tokei.rs/b1/github/kadykov/mcp-openapi-schema-explorer?category=code)](https://github.com/kadykov/mcp-openapi-schema-explorer)
14
+ [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/kadykov/mcp-openapi-schema-explorer)](https://archestra.ai/mcp-catalog/kadykov__mcp-openapi-schema-explorer)
14
15
 
15
16
  An MCP (Model Context Protocol) server that provides token-efficient access to OpenAPI (v3.0) and Swagger (v2.0) specifications via **MCP Resources**.
16
17
 
@@ -230,14 +231,12 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
230
231
  **Resource Templates:**
231
232
 
232
233
  - **`openapi://{field}`**
233
-
234
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.
235
235
  - **Example:** `openapi://info`
236
236
  - **Output:** `text/plain` list for `paths` and `components`; configured format (JSON/YAML/minified JSON) for other fields.
237
237
  - **Completions:** Provides dynamic suggestions for `{field}` based on the actual top-level keys found in the loaded spec.
238
238
 
239
239
  - **`openapi://paths/{path}`**
240
-
241
240
  - **Description:** Lists the available HTTP methods (operations) for a specific API path.
242
241
  - **Parameter:** `{path}` - The API path string. **Must be URL-encoded** (e.g., `/users/{id}` becomes `users%2F%7Bid%7D`).
243
242
  - **Example:** `openapi://paths/users%2F%7Bid%7D`
@@ -245,7 +244,6 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
245
244
  - **Completions:** Provides dynamic suggestions for `{path}` based on the paths found in the loaded spec (URL-encoded).
246
245
 
247
246
  - **`openapi://paths/{path}/{method*}`**
248
-
249
247
  - **Description:** Gets the detailed specification for one or more operations (HTTP methods) on a specific API path.
250
248
  - **Parameters:**
251
249
  - `{path}` - The API path string. **Must be URL-encoded**.
@@ -256,7 +254,6 @@ Some resource templates include parameters ending with an asterisk (`*`), like `
256
254
  - **Completions:** Provides dynamic suggestions for `{path}`. Provides static suggestions for `{method*}` (common HTTP verbs like GET, POST, PUT, DELETE, etc.).
257
255
 
258
256
  - **`openapi://components/{type}`**
259
-
260
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.
261
258
  - **Example:** `openapi://components/schemas`
262
259
  - **Output:** `text/plain` list of component names with descriptions.
@@ -1 +1 @@
1
- export declare const VERSION = "1.3.0";
1
+ export declare const VERSION = "1.3.1";
@@ -1,4 +1,4 @@
1
1
  // Auto-generated by scripts/generate-version.js during semantic-release prepare step
2
2
  // Do not edit this file manually.
3
- export const VERSION = '1.3.0';
3
+ export const VERSION = '1.3.1';
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-openapi-schema-explorer",
3
- "version": "1.3.0",
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",
@@ -49,8 +53,8 @@
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": "^11.0.1",
53
- "@semantic-release/npm": "^12.0.1",
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
59
  "@types/jest": "^30.0.0",
56
60
  "@types/js-yaml": "^4.0.9",
@@ -70,7 +74,7 @@
70
74
  "msw": "^2.7.4",
71
75
  "openapi-typescript": "^7.6.1",
72
76
  "prettier": "^3.5.3",
73
- "semantic-release": "^24.2.3",
77
+ "semantic-release": "^25.0.1",
74
78
  "ts-jest": "^29.3.1",
75
79
  "typescript": "^5.8.3"
76
80
  }
@@ -1,3 +0,0 @@
1
- FROM node:22-alpine3.21
2
-
3
- WORKDIR /workspaces/mcp-openapi-schema-explorer
@@ -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
- }
@@ -1,25 +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
- groups:
9
- # Group all development dependencies together
10
- dev-dependencies:
11
- dependency-type: 'development'
12
-
13
- # Group production dependencies together
14
- production-dependencies:
15
- dependency-type: 'production'
16
-
17
- - package-ecosystem: 'github-actions'
18
- directory: '/'
19
- schedule:
20
- interval: 'weekly'
21
- open-pull-requests-limit: 10
22
- groups:
23
- github-actions:
24
- patterns:
25
- - '*'
@@ -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
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env sh
2
- prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
3
- git update-index --again
package/.prettierignore DELETED
@@ -1,3 +0,0 @@
1
- dist/
2
- node_modules/
3
- local-docs/
package/.prettierrc.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "printWidth": 100,
3
- "tabWidth": 2,
4
- "useTabs": false,
5
- "semi": true,
6
- "singleQuote": true,
7
- "quoteProps": "as-needed",
8
- "trailingComma": "es5",
9
- "bracketSpacing": true,
10
- "arrowParens": "avoid",
11
- "endOfLine": "lf"
12
- }
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
- }
package/.tokeignore DELETED
@@ -1 +0,0 @@
1
- package-lock.json
package/CONTRIBUTING.md DELETED
@@ -1,67 +0,0 @@
1
- # Contributing to MCP OpenAPI Schema Explorer
2
-
3
- Thank you for considering contributing to this project! We welcome improvements and bug fixes.
4
-
5
- ## Getting Started
6
-
7
- - **Devcontainer:** The easiest way to get a consistent development environment is to use the provided [Dev Container](https://code.visualstudio.com/docs/devcontainers/containers) configuration (`.devcontainer/`). If you have Docker and the VS Code Dev Containers extension installed, simply reopen the project folder in a container.
8
- - **Manual Setup:** If you prefer not to use the devcontainer, ensure you have Node.js (v22 or later recommended) and npm installed. Clone the repository and run `npm install` to install dependencies.
9
-
10
- ## Development Workflow
11
-
12
- This project uses [`just`](https://github.com/casey/just) as a command runner for common development tasks. See the `justfile` for all available commands. Key commands include:
13
-
14
- - `just install`: Install dependencies (`npm install`).
15
- - `just format`: Format code using Prettier.
16
- - `just lint`: Check code for linting errors using ESLint.
17
- - `just build`: Compile TypeScript code (`npx tsc`).
18
- - `just test`: Run unit and end-to-end tests using Jest.
19
- - `just test-coverage`: Run tests and generate a coverage report.
20
- - `just security`: Run security checks (npm audit, license check).
21
- - `just all`: Run format, lint, build, test-coverage, and security checks sequentially.
22
-
23
- Please ensure `just all` passes before submitting a pull request.
24
-
25
- ## Code Style
26
-
27
- - **Formatting:** We use [Prettier](https://prettier.io/) for automatic code formatting. Please run `just format` before committing.
28
- - **Linting:** We use [ESLint](https://eslint.org/) for code analysis. Please run `just lint` to check for issues.
29
-
30
- ## Commit Messages
31
-
32
- This project uses [`semantic-release`](https://github.com/semantic-release/semantic-release) to automate versioning and releases. Therefore, commit messages **must** follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. This allows the release process to automatically determine the version bump (patch, minor, major) and generate changelogs.
33
-
34
- Common commit types include:
35
-
36
- - `feat`: A new feature
37
- - `fix`: A bug fix
38
- - `docs`: Documentation only changes
39
- - `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
40
- - `refactor`: A code change that neither fixes a bug nor adds a feature
41
- - `perf`: A code change that improves performance
42
- - `test`: Adding missing tests or correcting existing tests
43
- - `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
44
- - `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
45
- - `chore`: Other changes that don't modify src or test files
46
-
47
- Example: `feat: add support for YAML output format`
48
- Example: `fix: correct handling of remote URL loading errors`
49
- Example: `docs: update README with client configuration examples`
50
-
51
- ## Cline & Memory Bank
52
-
53
- This project utilizes [Cline](https://github.com/cline/cline) for AI-assisted development. The `memory-bank/` directory contains documentation specifically for Cline's context. Maintaining this memory bank helps ensure Cline can effectively assist with development tasks.
54
-
55
- If you make significant changes to the project's architecture, features, or development process, please consider updating the relevant files in `memory-bank/`. You can learn more about the Cline Memory Bank [here](https://docs.cline.bot/improving-your-prompting-skills/cline-memory-bank).
56
-
57
- ## Submitting Changes
58
-
59
- 1. Fork the repository.
60
- 2. Create a new branch for your feature or fix (`git checkout -b feat/my-new-feature` or `git checkout -b fix/my-bug-fix`).
61
- 3. Make your changes.
62
- 4. Ensure all checks pass (`just all`).
63
- 5. Commit your changes using the Conventional Commits format.
64
- 6. Push your branch to your fork (`git push origin feat/my-new-feature`).
65
- 7. Open a pull request against the `main` branch of the original repository.
66
-
67
- Thank you for your contribution!
@@ -1,126 +0,0 @@
1
- # MCP OpenAPI Schema Explorer
2
-
3
- [![Docker Pulls](https://img.shields.io/docker/pulls/kadykov/mcp-openapi-schema-explorer.svg)](https://hub.docker.com/r/kadykov/mcp-openapi-schema-explorer)
4
- [![GitHub Repo](https://img.shields.io/badge/GitHub-kadykov/mcp--openapi--schema--explorer-blue?logo=github)](https://github.com/kadykov/mcp-openapi-schema-explorer)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
-
7
- This Docker image runs the **MCP OpenAPI Schema Explorer**, an MCP (Model Context Protocol) server that provides token-efficient access to OpenAPI (v3.0) and Swagger (v2.0) specifications via **MCP Resources**.
8
-
9
- It allows MCP clients (like Cline or Claude Desktop) to explore the structure and details of large OpenAPI specifications without needing to load the entire file into an LLM's context window.
10
-
11
- **Source Code & Full Documentation:** [https://github.com/kadykov/mcp-openapi-schema-explorer](https://github.com/kadykov/mcp-openapi-schema-explorer)
12
-
13
- ## Features
14
-
15
- - **MCP Resource Access:** Explore OpenAPI specs via intuitive URIs (`openapi://info`, `openapi://paths/...`, `openapi://components/...`).
16
- - **OpenAPI v3.0 & Swagger v2.0 Support:** Loads both formats, automatically converting v2.0 to v3.0.
17
- - **Local & Remote Files:** Load specs from local file paths (via volume mount) or HTTP/HTTPS URLs.
18
- - **Token-Efficient:** Designed to minimize token usage for LLMs.
19
- - **Multiple Output Formats:** Get detailed views in JSON (default), YAML, or minified JSON (`--output-format`).
20
- - **Dynamic Server Name:** Server name in MCP clients reflects the `info.title` from the loaded spec.
21
- - **Reference Transformation:** Internal `$ref`s (`#/components/...`) are transformed into clickable MCP URIs.
22
-
23
- ## How to Run
24
-
25
- Pull the image:
26
-
27
- ```bash
28
- docker pull kadykov/mcp-openapi-schema-explorer:latest
29
- ```
30
-
31
- The container expects the path or URL to the OpenAPI specification as a command-line argument.
32
-
33
- ### Using a Remote Specification URL
34
-
35
- Pass the URL directly to `docker run`:
36
-
37
- ```bash
38
- docker run --rm -i kadykov/mcp-openapi-schema-explorer:latest https://petstore3.swagger.io/api/v3/openapi.json
39
- ```
40
-
41
- ### Using a Local Specification File
42
-
43
- Mount your local file into the container using the `-v` flag and provide the path _inside the container_ as the argument:
44
-
45
- ```bash
46
- # Example: Mount local file ./my-spec.yaml to /spec/api.yaml inside the container
47
- docker run --rm -i -v "$(pwd)/my-spec.yaml:/spec/api.yaml" kadykov/mcp-openapi-schema-explorer:latest /spec/api.yaml
48
- ```
49
-
50
- _(Note: Replace `$(pwd)/my-spec.yaml` with the actual absolute path to your local file on the host machine)_
51
-
52
- ### Specifying Output Format
53
-
54
- Use the `--output-format` flag (optional, defaults to `json`):
55
-
56
- ```bash
57
- # Using YAML output with a remote URL
58
- docker run --rm -i kadykov/mcp-openapi-schema-explorer:latest https://petstore3.swagger.io/api/v3/openapi.json --output-format yaml
59
-
60
- # Using minified JSON with a local file
61
- docker run --rm -i -v "$(pwd)/my-spec.yaml:/spec/api.yaml" kadykov/mcp-openapi-schema-explorer:latest /spec/api.yaml --output-format json-minified
62
- ```
63
-
64
- Supported formats: `json`, `yaml`, `json-minified`.
65
-
66
- ## Tags
67
-
68
- - `latest`: Points to the most recent stable release.
69
- - Specific version tags (e.g., `1.2.1`) are available corresponding to the npm package versions.
70
-
71
- ## Usage with MCP Clients
72
-
73
- You can configure your MCP client (like Cline or Claude Desktop) to run this Docker image as an MCP server.
74
-
75
- ### Example: Remote URL Specification
76
-
77
- ```json
78
- // Example: ~/.config/cline/mcp_config.json
79
- {
80
- "mcpServers": {
81
- "My API Spec (Docker Remote)": {
82
- "command": "docker",
83
- "args": [
84
- "run",
85
- "--rm",
86
- "-i", // Required for MCP communication
87
- "kadykov/mcp-openapi-schema-explorer:latest",
88
- "https://petstore3.swagger.io/api/v3/openapi.json"
89
- // Optional: Add "--output-format", "yaml" here if needed
90
- ],
91
- "env": {}
92
- }
93
- }
94
- }
95
- ```
96
-
97
- ### Example: Local File Specification
98
-
99
- ```json
100
- // Example: ~/.config/cline/mcp_config.json
101
- {
102
- "mcpServers": {
103
- "My API Spec (Docker Local)": {
104
- "command": "docker",
105
- "args": [
106
- "run",
107
- "--rm",
108
- "-i", // Required for MCP communication
109
- "-v",
110
- "/full/path/to/your/local/openapi.yaml:/spec/api.yaml", // Host path : Container path
111
- "kadykov/mcp-openapi-schema-explorer:latest",
112
- "/spec/api.yaml", // Path inside the container
113
- "--output-format",
114
- "yaml" // Optional format
115
- ],
116
- "env": {}
117
- }
118
- }
119
- }
120
- ```
121
-
122
- _(Remember to replace `/full/path/to/your/local/openapi.yaml` with the correct absolute path on your host machine)_
123
-
124
- ## Support
125
-
126
- For issues or questions, please refer to the [GitHub repository](https://github.com/kadykov/mcp-openapi-schema-explorer) or open an [issue](https://github.com/kadykov/mcp-openapi-schema-explorer/issues).
package/Dockerfile DELETED
@@ -1,32 +0,0 @@
1
- # Stage 1: Builder
2
- FROM node:22-alpine AS builder
3
-
4
- WORKDIR /app
5
-
6
- # Copy necessary files for installation and build
7
- COPY package.json package-lock.json ./
8
- COPY tsconfig.json ./
9
- COPY src ./src
10
-
11
- # Install all dependencies (including devDependencies needed for build)
12
- RUN npm ci
13
-
14
- # Build the project
15
- RUN npm run build
16
-
17
- # Stage 2: Release
18
- FROM node:22-alpine AS release
19
-
20
- WORKDIR /app
21
-
22
- # Copy only necessary files from the builder stage
23
- COPY --from=builder /app/package.json ./package.json
24
- COPY --from=builder /app/package-lock.json ./package-lock.json
25
- COPY --from=builder /app/dist ./dist
26
-
27
- # Install only production dependencies
28
- RUN npm ci --omit=dev --ignore-scripts
29
-
30
- # Set the entrypoint to run the compiled server
31
- # Corrected path based on tsconfig.json ("rootDir": ".", "outDir": "dist")
32
- ENTRYPOINT ["node", "dist/src/index.js"]
Binary file
Binary file