@wazobiatech/nexus-mcp
v1.2.1
Published
TypeScript SDK for Nexus MCP — HMAC middleware, server factory, and manifest generation
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-mcpPeer dependencies
@nestjs/common is a required peer dependency because HMACGuard uses Injectable and UnauthorizedException at runtime. Express-only consumers don't need it; NestJS consumers do.
# NestJS users
npm install @wazobiatech/nexus-mcp @nestjs/common
# plus, in your process entry: import 'reflect-metadata';# Express-only users
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
npx 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
