@nekzus/mcp-server 1.24.0 → 1.24.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/README.md CHANGED
@@ -147,34 +147,25 @@ docker build -t nekzus/npm-sentinel-mcp .
147
147
  docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
148
148
  ```
149
149
 
150
- ### Streamable HTTP (POST) & Cloudflare Workers Integration
150
+ ### Web Standard Streamable HTTP & Cloudflare Workers Integration
151
151
 
152
- The package exports a stateless HTTP handler `handleStreamableHttpRequest` designed for serverless platforms (Cloudflare Workers, Vercel, Express, Fastify, Next.js API routes) requiring Streamable HTTP POST transport under MCP v2:
152
+ The package exports `createMcpHttpHandler` and `WebStandardStreamableHTTPServerTransport` for serverless platforms (Cloudflare Workers, Hono, Vercel, Express, Fastify, Next.js API routes) requiring official Web Standard Streamable HTTP transport under MCP v2:
153
153
 
154
154
  ```typescript
155
- import { handleStreamableHttpRequest } from '@nekzus/mcp-server/http';
155
+ import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
156
+
157
+ const handleMcpRequest = createMcpHttpHandler();
156
158
 
157
159
  export default {
158
160
  async fetch(request: Request): Promise<Response> {
159
- if (request.method !== 'POST') {
160
- return new Response('NPM Sentinel MCP v2 Streamable HTTP Server', { status: 200 });
161
- }
162
-
163
- try {
164
- const payload = await request.json();
165
- const mcpResponse = await handleStreamableHttpRequest(payload);
166
-
167
- return new Response(mcpResponse.body, {
168
- status: mcpResponse.status,
169
- headers: mcpResponse.headers,
170
- });
171
- } catch {
172
- return new Response(JSON.stringify({ error: 'Invalid JSON-RPC payload' }), { status: 400 });
173
- }
161
+ return handleMcpRequest(request);
174
162
  },
175
163
  };
176
164
  ```
177
165
 
166
+ **100% MCP v2 Compliance**: Powered by `WebStandardStreamableHTTPServerTransport`, this handler natively activates all 3 MCP primitives (**Tools**, **Resources**, and **Prompts**) with peak performance, SSE streaming support, and full Web Standard `Request` $\rightarrow$ `Response` compatibility.
167
+
168
+
178
169
  ## Configuration
179
170
 
180
171
  The server supports the following configuration parameters: