Introduction to NitroStack v3.0
Welcome to NitroStack v3.0! This guide will help you get started with building production-ready MCP (Model Context Protocol) servers using our revolutionary decorator-based architecture.
What is NitroStack?
NitroStack is a NestJS-inspired framework for building MCP servers with TypeScript. It provides powerful abstractions, excellent developer experience, and production-ready features out of the box.
Why NitroStack v3.0?
šÆ Decorator-Based Development
Write clean, declarative code:
@Tool({
  name: 'get_user',
  description: 'Get user by ID'
})
@UseGuards(JWTGuard)
async getUser(input: any, ctx: ExecutionContext) {
  return await this.userService.find(input.id);
}
šļø Modular Architecture
Organize code into self-contained modules:
@Module({
  name: 'users',
  controllers: [UserTools],
  providers: [UserService]
})
export class UserModule {}
š Dependency Injection
Built-in DI container for better testability:
export class UserTools {
  constructor(private userService: UserService) {}  // Auto-injected!
}
š Declarative Guards
Simple, powerful authentication:
@UseGuards(JWTGuard, AdminGuard)  // Stack multiple guards
šØ Beautiful Widgets
Create stunning UIs for your tools:
@Widget('user-profile')  // Attach UI component
Key Features
- ā
 Decorator-Based - 
@Tool,@Module,@Widget,@UseGuards - ā Modular - Organize code logically
 - ā DI Container - Dependency injection for testability
 - ā Guards System - Declarative authentication
 - ā Middleware & Interceptors - Transform requests/responses
 - ā Pipes - Validate and transform inputs
 - ā Exception Filters - Centralized error handling
 - ā
 Caching - 
@Cache()decorator - ā
 Rate Limiting - 
@RateLimit()decorator - ā
 Event System - 
@OnEvent()for event-driven code - ā Type Generation - Auto-generate types from tools
 - ā Studio - Next.js-based visual testing
 - ā AI Integration - Test with GPT-4 or Gemini
 
Who is NitroStack for?
Perfect for:
- Developers building MCP servers for AI applications
 - Teams needing modular, maintainable code
 - Projects requiring authentication and authorization
 - Apps needing beautiful UI components
 - Production systems requiring caching, rate limiting, etc.
 
Use Cases:
- šļø E-commerce chatbots
 - š Data analysis tools
 - š§ DevOps automation
 - š Content management
 - š¦ Financial services
 - š„ Healthcare systems
 - š Educational platforms
 
Architecture Overview
NitroStack v3.0 uses a layered architecture:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā         Your Application           ā
ā  (@McpApp + @Module + @Tool)       ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā         NitroStack Core              ā
ā  (Decorators, DI, Guards, etc.)    ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā     Model Context Protocol SDK     ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
What's New in v3.0?
Breaking Changes
v3.0 introduces a complete architectural redesign:
Before (v2.x):
const server = createServer({...});
server.tool(createTool({
  name: 'get_user',
  handler: async (input) => {...}
}));
After (v3.0):
@Module({...})
export class UserTools {
  @Tool({ name: 'get_user' })
  async getUser(input: any) {...}
}
Migration Guide
Migration guide coming soon!
Getting Started
Ready to dive in? Let's go!
- Installation - Install NitroStack CLI
 - Quick Start - Create your first server
 - Core Concepts - Learn the fundamentals
 
Community & Support
- š Documentation
 - š¬ GitHub Discussions
 - š Issues
 - š¦ Twitter
 
License
NitroStack is MIT licensed.
Next: Installation ā