NitroStack brings decorator-based architecture, dependency injection, and modular design to the Model Context Protocol. Build scalable, production-ready AI-powered applications that push the boundaries of what's possible.
Part of the Nitrocloud ecosystem.
|npm install -g nitrostacknitrostack init my-server --template typescript-authEverything you need to build world-class Gen AI applications, batteries included.
Clean, declarative code with TypeScript decorators. @Tool, @Widget, @UseGuards - write less, do more.
@Tool({ name: 'analyze' })Organize code into feature modules with @Module. Clear separation of concerns for scalable applications.
@Module({ imports: [...] })Built-in JWT, OAuth 2.1, and API Key authentication with declarative guards. Secure by default.
@UseGuards(JWTGuard)Constructor injection for clean, testable code. Built-in DI container manages all dependencies.
constructor(private service: Service)Create stunning Next.js widgets with @Widget decorator. Rich UIs that integrate seamlessly with AI models.
@Widget('dashboard')Next.js-based testing environment with AI chat (GPT-4, Gemini), tool testing, and widget preview.
nitrostack studioCaching, rate limiting, middleware, interceptors, pipes, event system - all with decorators.
@Cache({ ttl: 300 })Auto-generate TypeScript types from Zod schemas. Full type safety for widgets and tools.
z.object({ ... })Health checks, logging, error handling, testing utilities. Docker support and deployment guides.
@HealthCheck()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 brings a revolutionary decorator-based architecture to the Model Context Protocol. 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 Gen AI application from prototype to production-ready in minutes, not weeks.
templateinitProduction-ready templates to kickstart your Gen AI 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 cutting-edge Gen AI applications with NitroStack.
Part of the Nitrocloud ecosystem.