🚀 NestJS-Inspired MCP Framework v3.0

Build Production-Ready
MCP Servers in Minutes

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.

Quick Install
npm install -g nitrostack
nitrostack init my-server --template typescript-auth

Why Choose NitroStack?

Everything you need to build world-class MCP servers, batteries included.

Decorator-Based

Clean, declarative code with TypeScript decorators. @Tool, @Widget, @UseGuards - inspired by NestJS.

Modular Architecture

Organize code into feature modules with @Module. Clear separation of concerns for scalable applications.

Authentication Ready

Built-in JWT, OAuth 2.1, and API Key authentication with declarative guards. Secure by default.

Dependency Injection

Constructor injection for clean, testable code. Built-in DI container manages all dependencies.

Beautiful UI Widgets

Create stunning Next.js widgets with @Widget decorator. Rich UIs that integrate with AI models.

Built-in Studio

Next.js-based testing environment with AI chat (GPT-4, Gemini), tool testing, and widget preview.

Advanced Features

Caching, rate limiting, middleware, interceptors, pipes, event system - all with decorators.

Type Generation

Auto-generate TypeScript types from Zod schemas. Full type safety for widgets and tools.

Production Ready

Health checks, logging, error handling, testing utilities. Docker support and deployment guides.

Simple. Elegant. Powerful.

Write clean, maintainable code with our decorator-based API

src/modules/weather/weather.tools.ts
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,
    };
  }
}

Decorator-Based Development

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 features

Production Features

Built-in features that take your MCP server from prototype to production-ready in minutes, not weeks.

  • JWT, OAuth 2.1, API Key authentication
  • Middleware, interceptors, pipes for request/response
  • Built-in caching and rate limiting
  • Event system with @OnEvent decorator
  • Health checks and monitoring
  • Testing utilities for unit and integration tests
100%
Type Safe
<5min
Setup Time
20+
Decorators
Possibilities

Start with a Template

Production-ready templates to kickstart your project

Starter Template

Simple calculator example. Perfect for learning NitroStack fundamentals. No authentication, no database - just pure MCP goodness.

  • ✓ One module with tools, resources, prompts
  • ✓ Two beautiful UI widgets
  • ✓ Health checks
  • ✓ Perfect for beginners
nitrostack init my-calc --template typescript-starterLearn More

E-commerce Template

Full-featured e-commerce server with JWT auth, SQLite database, and 20+ tools. Production-ready architecture.

  • ✓ JWT authentication with guards
  • ✓ 5 feature modules (auth, products, cart, orders)
  • ✓ 20+ UI widgets
  • ✓ SQLite with seed data
nitrostack init my-shop --template typescript-authLearn More

Ready to Build Something Amazing?

Join developers worldwide who are building the future of AI-powered applications with NitroStack v3.0.