SDK Overview
Build MCP servers in TypeScript or Python, with the same architecture in both.
NitroStack ships two SDKs: @nitrostack/core for TypeScript and nitrostack for Python. Both build MCP servers the same way. You group features into modules, declare tools, resources, and prompts with decorators, inject services with dependency injection, and run every call through the same request pipeline.
The APIs follow each language's conventions. TypeScript uses Zod schemas and class decorators such as @Tool; Python uses Pydantic models and decorators such as @tool. Pick the language your team works in; everything else in these docs applies to both.
Choose your language
TypeScript SDK
Node.js 20 or later. Zod schemas, decorators, and the nitrostack-cli.
Python SDK
Python 3.10 or later. Pydantic models, decorators, and the nitrostack-py CLI.
Look up syntax fast
One page has the snippets you reach for most, in TypeScript and in Python.
What's in the SDK
Server and modules
Bootstrap the server and organize features into modules.
Tools, resources, prompts
The capabilities an AI client can discover and call.
Guards and auth
Decide who may call what, with JWT, API keys, or OAuth.
Pipes and validation
Transform and validate input before your handler runs.
Widgets
Return interactive React UI with a tool's result.
Health checks
Report the health of your server and its dependencies.
Both SDKs share these concepts, but not their syntax. The Reference shows each API in TypeScript with the Python equivalent beside it.
