Sandbox
@nitrocloudofficial/nitrostack

TypeScript framework for MCP servers and AI apps

NitroStack gives you a structured way to build MCP servers with TypeScript decorators, dependency injection, validation, auth, and middleware. It also includes a CLI for scaffolding projects and a widget system for interactive tool output. The framework is designed to connect to MCP-compatible clients and to be tested in NitroStudio.

2,495 stars1.4k forksTypeScriptUpdated 10d ago
Who it's for

Builders who want to scaffold, test, and deploy MCP servers with TypeScript instead of assembling the stack from scratch.

What it delivers

You can build an MCP server with built-in structure for tools, auth, validation, and UI instead of wiring each piece yourself.

What it does

Decorator-based tools and prompts

Define tools, resources, and prompts with TypeScript decorators instead of handwritten plumbing.

Dependency injection

Use singleton, transient, and scoped lifecycles for server modules and services.

Built-in authentication

Set up JWT, OAuth 2.1, and API key auth without adding a separate auth layer.

Middleware pipeline

Add guards, interceptors, pipes, and exception filters around tool execution.

UI widgets for tool output

Attach React widgets to tool results for richer interactive responses.

CLI scaffolding

Start a new server project with the NitroStack CLI and generate the base app structure.

NitroStudio workflow

Test tools, inspect payloads, chat with the server, and preview widgets in the desktop app.

How to get it

  1. 1Run
    npx @nitrostack/cli init my-server
  2. 2Run
    cd my-server
    npm install
    npm run dev

README

NitroStack

NitroStack

The enterprise-grade TypeScript framework for building production-ready MCP servers.

Decorators. Dependency Injection. Widgets. One framework to ship AI-native backends.


npm version npm downloads GitHub stars License Discord X YouTube LinkedIn GitHub



Documentation  ·  Quick Start  ·  Blog  ·  NitroStudio  ·  Discord




Quick Start

Prerequisites

1. Scaffold a new project

npx @nitrostack/cli init my-server

NitroStack CLI

2. Start developing

cd my-server
npm install
npm run dev

Your MCP server is running. Connect it to any MCP-compatible client.

3. Open in NitroStudio

Once your project is scaffolded, open the same folder in NitroStudio for visual testing and debugging.

  • Download: https://nitrostack.ai/studio
  • Open your my-server project folder
  • Use NitroStudio to test tools, inspect payloads, and chat with your MCP server

Why NitroStack?

Building MCP servers today means stitching together boilerplate, reinventing authentication, and hoping your tooling scales. NitroStack gives you an opinionated, batteries-included framework so you can focus on what your server actually does.

  • Decorator-driven — Define tools, resources, and prompts with clean, declarative TypeScript decorators
  • Dependency injection — First-class DI container with singleton, transient, and scoped lifecycles
  • Auth built in — JWT, OAuth 2.1, and API key authentication out of the box
  • Middleware pipeline — Guards, interceptors, pipes, and exception filters just like enterprise backends
  • UI Widgets — Attach React components to tool outputs for rich, interactive responses
  • Zod validation — End-to-end type safety from schema to runtime
  • NitroStudio — A dedicated desktop app for testing, debugging, and chatting with your server

See It in Action

import { McpApp, Module, ToolDecorator as Tool, z, ExecutionContext } from '@nitrostack/core';

@McpApp({
  module: AppModule,
  server: { name: 'my-server', version: '1.0.0' }
})
@Module({ imports: [] })
export class AppModule {}

export class SearchTools {
  @Tool({
    name: 'search_products',
    description: 'Search the product catalog',
    inputSchema: z.object({
      query: z.string().describe('Search query'),
      maxResults: z.number().default(10)
    })
  })
  @UseGuards(ApiKeyGuard)
  @Cache({ ttl: 300 })
  @Widget('product-grid')
  async search(input: { query: string; maxResults: number }, ctx: ExecutionContext) {
    ctx.logger.info('Searching products', { query: input.query });
    return this.productService.search(input.query, input.maxResults);
  }
}

One decorator stack gives you: API definition + validation + auth + caching + UI — zero boilerplate.

Ecosystem

NitroStack is modular. Install only what you need: The implementation workspace for NitroStack packages lives in typescript/.

PackageWhat it doesInstall
@nitrostack/coreThe framework — decorators, DI, server runtimenpm i @nitrostack/core
@nitrostack/cliScaffolding, dev server, code generatorsnpm i -g @nitrostack/cli
@nitrostack/widgetsReact SDK for interactive tool output UIsnpm i @nitrostack/widgets

NitroStudio

NitroStudio is a desktop app purpose-built for developing MCP servers. Open your project folder — it handles the dev server for you.

NitroStudio

Download NitroStudio

Real-time tool testing Execute tools, inspect payloads, and debug request/response cycles.

Testing

Built-in AI chat Talk to your MCP server through an integrated AI assistant.

AI Chat

  • Widget preview — Instantly visualize your interactive UI components
  • Hot reload — Changes reflect in real time as you develop

Documentation

ResourceDescription
Getting StartedInstallation, quick start, and first project
Server ConceptsModules, DI, and architecture deep dive
Tools GuideDefining tools, validation, annotations
Widgets GuideBuilding interactive UI components
AuthenticationJWT, OAuth 2.1, API key setup
CLI ReferenceAll CLI commands and options
DeploymentProduction checklist, Docker, cloud platforms

Community

  • Discord — Ask questions, share projects, get help
  • GitHub Discussions — Proposals, ideas, and Q&A
  • Twitter / X — Announcements and updates
  • YouTube — Product demos and walkthroughs
  • LinkedIn — Company news and updates
  • GitHub — Organization profile and open-source work
  • Blog — Tutorials, deep dives, and release notes

Contributing

We welcome contributions of all kinds — bug fixes, features, docs, and ideas. Read the Contributing Guide to get started.

Looking for a place to begin? Check out issues labeled good first issue.

Contributors

Contributors

License

NitroStack is open-source software licensed under the Apache License 2.0.


Built by the NitroStack team and contributors.

Files in the repo

Repository payload13 top-level entries
  • .github
  • assets
  • docs
  • notes
  • sample-apps
  • typescript
  • .gitignore
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE
  • logo.png
  • README.md
  • SECURITY.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More frameworks & sdks

HKUDS/nanobotFrameworks & SDKs

Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps

48k
microsoft/
SkillOpt
microsoft/SkillOptFrameworks & SDKs

SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

17k
omnigent-ai/omnigentFrameworks & SDKs

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents — swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.

9.8k
kyegomez/
OpenMythos
kyegomez/OpenMythosFrameworks & SDKs

A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.

15k
D4Vinci/ScraplingFrameworks & SDKs

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

80k