NitroStack v3.0 brings decorator-based architecture, dependency injection, and modular design to the Model Context Protocol. Build scalable, maintainable AI-powered applications with ease.
npm install -g nitrostacknitrostack init my-server --template typescript-authEverything you need to build world-class MCP servers, batteries included.
Clean, declarative code with TypeScript decorators. @Tool, @Widget, @UseGuards - inspired by NestJS.
Organize code into feature modules with @Module. Clear separation of concerns for scalable applications.
Built-in JWT, OAuth 2.1, and API Key authentication with declarative guards. Secure by default.
Constructor injection for clean, testable code. Built-in DI container manages all dependencies.
Create stunning Next.js widgets with @Widget decorator. Rich UIs that integrate with AI models.
Next.js-based testing environment with AI chat (GPT-4, Gemini), tool testing, and widget preview.
Caching, rate limiting, middleware, interceptors, pipes, event system - all with decorators.
Auto-generate TypeScript types from Zod schemas. Full type safety for widgets and tools.
Health checks, logging, error handling, testing utilities. Docker support and deployment guides.
Write clean, maintainable code with our decorator-based API
import { Tool, Widget, Cache, UseGuards, ExecutionContext } from 'nitrostack';
import { z } from 'zod';
import { JWTGuard } from '../../guards/jwt.guard.js';
export class WeatherTools {
constructor(private weatherService: WeatherService) {}
@Tool({
name: 'get_weather',
description: 'Get current weather for a location',
inputSchema: z.object({
location: z.string().describe('City name'),
units: z.enum(['celsius', 'fahrenheit']).optional(),
}),
examples: {
request: { location: 'New York', units: 'celsius' },
response: { temp: 22, conditions: 'Sunny', humidity: 65 }
}
})
@Widget('weather-card') // 🎨 Beautiful UI
@Cache({ ttl: 300 }) // ⚡ 5-min cache
@UseGuards(JWTGuard) // 🔐 Auth required
async getWeather(input: any, ctx: ExecutionContext) {
const weather = await this.weatherService.fetch(input.location);
ctx.logger.info('Weather fetched', { location: input.location });
return {
temperature: weather.temp,
conditions: weather.conditions,
humidity: weather.humidity,
};
}
}NitroStack v3.0 brings a revolutionary decorator-based architecture inspired by NestJS. Write clean, declarative code that's easy to understand and maintain.
@Tool - Define tools with schema validation@Widget - Attach beautiful UI components@UseGuards - Declarative authentication@Cache - Automatic response caching@Module - Organize code into featuresBuilt-in features that take your MCP server from prototype to production-ready in minutes, not weeks.
Production-ready templates to kickstart your project
Simple calculator example. Perfect for learning NitroStack fundamentals. No authentication, no database - just pure MCP goodness.
nitrostack init my-calc --template typescript-starterLearn More Full-featured e-commerce server with JWT auth, SQLite database, and 20+ tools. Production-ready architecture.
nitrostack init my-shop --template typescript-authLearn More Join developers worldwide who are building the future of AI-powered applications with NitroStack v3.0.