NitroStack SDK — Open Source

Build Production-Ready
MCP Servers

The TypeScript framework that makes MCP development feel like building a web app. Decorators, Zod schemas, hot reload, and auth modules that just work.

npx @nitrostack/cli init my-mcp-server
Copied to clipboard!
calculator.tools.ts
1import { Tool, z, ExecutionContext } from 'nitrostack';
2
3export class CalculatorTools {
4 @Tool({
5 name: 'add_numbers',
6 description: 'Add two numbers together',
7 inputSchema: z.object({
8 a: z.number().describe('First number'),
9 b: z.number().describe('Second number'),
10 }),
11 metadata: {
12 category: 'math',
13 tags: ['calculator', 'arithmetic'],
14 },
15 })
16 async addNumbers(input: { a: number; b: number }, ctx: ExecutionContext) {
17 return { result: input.a + input.b };
18 }
19}
UTF-8TypeScript
Line 1, Column 1
100%

100% Type-Safe

Zod schemas and full TypeScript inference. Define your tool's input once—types, validation, and JSON schemas are generated for you.

Secure by Default

JWT, OAuth 2.1, and API Key modules that drop in with one import. Guards and pipes handle the rest. Your security team will love this.

Blazing Fast DX

Hot reload, CLI generators, starter templates. Change a decorator, see it live. The same speed you expect from modern web development.

Modular Architecture

NestJS-inspired modules with dependency injection. Organize tools, resources, and providers the way you already think about backend architecture.

@Module({
  imports: [
    AuthModule,
    DatabaseModule
  ],
  tools: [SearchTool],
  providers: [AIService]
})
export class AppModule {}

Built for Teams

MCP Tasks for long-running ops, caching, rate limiting, health checks. Production-grade reliability that's built in, not bolted on.

@Tool
@Guard
@Module
Why NitroStack SDK

Why Developers Pick NitroStack

The patterns you already know, the production features you shouldn't have to build, and the DX you deserve.

  • Your DX, But for MCP

    If you've used NestJS, you already know the patterns. Decorators, modules, DI, guards—same mental model, purpose-built for MCP. Hot reload and CLI generators mean you ship in minutes, not days.

  • Auth You Don't Have to Build

    JWT, OAuth 2.1 with PKCE, and API Key modules that drop in with one import. Guards protect tools, pipes validate input, exception filters catch the rest. Your security team signs off on day one.

  • Production from the Start

    Caching, rate limiting, health checks, and event systems aren't afterthoughts—they're built in. Your MCP server handles real traffic from the first deploy, not just demo traffic.

  • One Ecosystem, Not Twelve Tools

    SDK, CLI, widgets, Studio, and Cloud work together. Build locally, test visually, deploy to production—without gluing tools together or writing integration code.

Getting Started

From npx init to Production

Every step is real. No hand-waving, no "exercise for the reader."

Step 1

Initialize your project

Scaffold a production-ready MCP server with one command. Node.js 18+ and npm 9+; starter templates get you to a runnable server in seconds.

$ npx @nitrostack/cli init my-mcp-server

Step 2

Define tools, resources & Prompts

Use @Tool, @Resource, and @Prompt decorators with Zod schemas and optional task support. Type-safe, declarative APIs with automatic JSON schema generation.

@Tool({  name: 'search',
  description: 'Search the knowledge base',
  inputSchema: z.object({
    query: z.string(),
    limit: z.number().optional()
  })
})
async search(input) {
  return await this.searchService.query(input);
}

Step 3

Add authentication & guards

Drop in JWT, OAuth 2.1, or API Key modules and apply guards to tools, resources, and prompts. Enterprise-grade auth with minimal configuration.

@Module({  imports: [
    JWTModule.forRoot({
      secretEnvVar: 'JWT_SECRET',
      algorithms: ['HS256']
    }),
    OAuthModule.forRoot({
      provider: 'github',
      clientId: process.env.GITHUB_CLIENT_ID
    })
  ]
})

Step 4

Launch, test & deploy

Run the dev server with hot reload, test tools and tasks in NitroStudio, and deploy to NitroCloud. From local development to production in one flow.

# Start dev server with hot reload
$ npx @nitrostack/cli dev

# Deploy to NitroCloud
$ npx @nitrostack/cli deploy --prod

Built by developers, for developers

Join the community building MCP servers with NitroStack. Early access, shared patterns, and a roadmap shaped by real usage.

Your next MCP server starts here.

Open source. TypeScript-first. Ready when you are.