@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 +9 -18
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/src/http.d.ts +7 -10
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +23 -101
- package/dist/src/http.js.map +1 -1
- package/dist/src/schemas.d.ts +2 -2
- package/dist/src/schemas.d.ts.map +1 -1
- package/dist/src/schemas.js +12 -12
- package/dist/src/schemas.js.map +1 -1
- package/llms-full.txt +9 -18
- package/package.json +11 -1
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
|
|
150
|
+
### Web Standard Streamable HTTP & Cloudflare Workers Integration
|
|
151
151
|
|
|
152
|
-
The package exports
|
|
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 {
|
|
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
|
-
|
|
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:
|