@wazobiatech/nexus-mcp
v1.0.8
Published
TypeScript SDK for Nexus MCP — HMAC middleware, server factory, and manifest generation
Downloads
1,038
Maintainers
Readme
@wazobiatech/nexus-mcp
TypeScript SDK for the Nexus MCP ecosystem. Provides HMAC signing/verification, MCP server scaffolding, and manifest generation.
Installation
npm install @wazobiatech/nexus-mcpUsage
HMAC Middleware (Express)
import express from "express";
import { hmacMiddleware } from "@wazobiatech/nexus-mcp";
const app = express();
app.use(hmacMiddleware(process.env.HMAC_SECRET!));HMAC Guard (NestJS)
import { HMACGuard } from "@wazobiatech/nexus-mcp";
@UseGuards(new HMACGuard(process.env.HMAC_SECRET!))
@Controller()
export class MyController {}MCP Server
import { createMCPServer } from "@wazobiatech/nexus-mcp";
const server = createMCPServer({
port: 4001,
hmacSecret: process.env.HMAC_SECRET!,
manifest: { /* ... */ },
tools: [ /* MCPToolDefinition[] */ ],
});
// Graceful shutdown
process.on("SIGTERM", () => {
server.close(() => process.exit(0));
});Generate Manifest CLI
# Option A — pre-compile first (recommended)
tsc && npx generate-manifest --context ./src/mcp/context.json --tools "./dist/mcp/tools/*.tools.js" --out ./src/mcp/manifest.json
# Option B — run TypeScript sources directly via ts-node
npx ts-node ./node_modules/.bin/generate-manifest --context ./src/mcp/context.json --tools "./src/mcp/tools/*.tools.ts" --out ./src/mcp/manifest.jsonTesting
npm testContract vector tests verify every entry from nexus-mcp-contract/vectors.json.
License
MIT
