@nitrostack/core
v1.0.9
Published
NitroStack Core - Build powerful MCP servers with TypeScript
Maintainers
Readme
@nitrostack/core
TypeScript framework for building production-ready MCP servers with decorators, dependency injection, validation, auth, and middleware pipelines.
Installation
npm install @nitrostack/core zod reflect-metadataWhy @nitrostack/core
- Decorator-first authoring for tools, resources, and prompts
- Built-in DI container with module architecture
- Auth primitives for API key, JWT, and OAuth 2.1 flows
- Middleware-style request lifecycle (guards, pipes, interceptors)
- Strong runtime validation with Zod-based schemas
Quick Example
import { McpApp, Module, ToolDecorator as Tool, z } from '@nitrostack/core';
export class MathTools {
@Tool({
name: 'add_numbers',
description: 'Add two numbers',
inputSchema: z.object({
a: z.number(),
b: z.number(),
}),
})
async add(input: { a: number; b: number }) {
return { result: input.a + input.b };
}
}
@McpApp({
server: { name: 'math-server', version: '1.0.0' },
})
@Module({
name: 'app',
controllers: [MathTools],
})
export class AppModule {}NitroStudio
Use NitroStudio to test tools visually, inspect payloads, and validate behavior while developing your MCP server.
- Download: https://nitrostack.ai/studio
- Studio: https://nitrostack.ai/studio
Links
- Docs: https://docs.nitrostack.ai
- SDK guide: https://docs.nitrostack.ai/sdk/typescript/server
- Source: https://github.com/nitrocloudofficial/nitrostack
- npm: https://www.npmjs.com/package/@nitrostack/core
- Blog: https://blog.nitrostack.ai
