mcp-expose 1.0.0

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 (48) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/LICENSE +21 -0
  3. package/README.md +708 -0
  4. package/dist/adonisjs/index.cjs +708 -0
  5. package/dist/adonisjs/index.cjs.map +1 -0
  6. package/dist/adonisjs/index.d.cts +68 -0
  7. package/dist/adonisjs/index.d.ts +68 -0
  8. package/dist/adonisjs/index.js +684 -0
  9. package/dist/adonisjs/index.js.map +1 -0
  10. package/dist/express/index.cjs +789 -0
  11. package/dist/express/index.cjs.map +1 -0
  12. package/dist/express/index.d.cts +61 -0
  13. package/dist/express/index.d.ts +61 -0
  14. package/dist/express/index.js +763 -0
  15. package/dist/express/index.js.map +1 -0
  16. package/dist/fastify/index.cjs +660 -0
  17. package/dist/fastify/index.cjs.map +1 -0
  18. package/dist/fastify/index.d.cts +42 -0
  19. package/dist/fastify/index.d.ts +42 -0
  20. package/dist/fastify/index.js +635 -0
  21. package/dist/fastify/index.js.map +1 -0
  22. package/dist/hono/index.cjs +656 -0
  23. package/dist/hono/index.cjs.map +1 -0
  24. package/dist/hono/index.d.cts +44 -0
  25. package/dist/hono/index.d.ts +44 -0
  26. package/dist/hono/index.js +630 -0
  27. package/dist/hono/index.js.map +1 -0
  28. package/dist/index.cjs +720 -0
  29. package/dist/index.cjs.map +1 -0
  30. package/dist/index.d.cts +81 -0
  31. package/dist/index.d.ts +81 -0
  32. package/dist/index.js +686 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/koa/index.cjs +739 -0
  35. package/dist/koa/index.cjs.map +1 -0
  36. package/dist/koa/index.d.cts +68 -0
  37. package/dist/koa/index.d.ts +68 -0
  38. package/dist/koa/index.js +709 -0
  39. package/dist/koa/index.js.map +1 -0
  40. package/dist/nestjs/index.cjs +1117 -0
  41. package/dist/nestjs/index.cjs.map +1 -0
  42. package/dist/nestjs/index.d.cts +104 -0
  43. package/dist/nestjs/index.d.ts +104 -0
  44. package/dist/nestjs/index.js +1079 -0
  45. package/dist/nestjs/index.js.map +1 -0
  46. package/dist/server-fzkb-wJo.d.cts +194 -0
  47. package/dist/server-fzkb-wJo.d.ts +194 -0
  48. package/package.json +225 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0] - 2026-09-25
10
+
11
+ First stable release. The public API (`mcp-expose` and `mcp-expose/<framework>` exports, tool and server
12
+ options, default tool naming) now follows Semantic Versioning.
13
+
14
+ ### Added
15
+
16
+ - Framework-agnostic core: stateless MCP Streamable HTTP server (protocol 2024-11-05 → 2025-11-25),
17
+ route→tool mapping, JSON Schema / zod / Standard Schema inputs, auth-header forwarding, Origin validation.
18
+ - Adapters, each supporting the current and two previous framework majors:
19
+ - **NestJS** 10 / 11 / 12: `@McpTool()`, `McpModule.forRoot()` / `forRootAsync()`, `McpService`,
20
+ class-validator DTO → JSON Schema, global prefix and URI versioning detection, Express and Fastify platforms.
21
+ - **Express** 3 / 4 / 5: `mcpTool()`, `mountMcp()`, nested routers.
22
+ - **Fastify** 3 / 4 / 5: `fastifyMcp` plugin with `config.mcp`; route JSON schemas reused; `inject()` dispatch.
23
+ - **Koa** 1 / 2 / 3: `mcpTool()`, `mountMcp()`, `koaMcp()`; `mcpToolLegacy()` / `koaMcpLegacy()` for Koa 1.
24
+ - **Hono** 2 / 3 / 4: `mcpTool()`, `mountMcp()`; in-process `app.request()` dispatch on any runtime.
25
+ - **AdonisJS** 6 / 7: `.mcp()` route macro, `mcpTool()`, `mountMcp()`; VineJS 4 validators usable as schemas.
26
+ - `toolsFromOpenApi()` and `createFetchDispatcher()` for standalone gateways in front of any HTTP API.
27
+ - `defineTool()` for code-only tools.
28
+ - Node.js 20, 22 and 24 support.
29
+ - End-to-end suite: 18 real projects (every supported framework major) driven by the official MCP SDK client.
30
+ - Multi-version maintenance: `v<major>.x` branches, automatic npm dist-tags, one-click releases and
31
+ label-driven backports (see RELEASING.md).
32
+
33
+ ### Security
34
+
35
+ - Path parameters that are empty, `.` or `..` are rejected, so an agent cannot use them to reach routes
36
+ that were never exposed as tools (for example `/orders/../admin`).
37
+
38
+ [Unreleased]: https://github.com/NITINKACHHADIYA/Node-MCP/compare/v1.0.0...HEAD
39
+ [1.0.0]: https://github.com/NITINKACHHADIYA/Node-MCP/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nitin Kachhadiya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.