mcp
Model Context Protocol (MCP) integration for Rikta Framework - Connect AI assistants to your backend
Installation
npx @riktajs/mcpAsk AI about mcp
Powered by Claude Β· Grounded in docs
I know everything about mcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π§ Rikta
The Zero-Config TypeScript Framework for Modern Backends.
Build scalable APIs with the power of Fastify and the elegance of decorators. No modules. No boilerplate. Just code.
π€ Why Rikta?
Do you miss the simplicity of Express but need the structure of a real framework?
Rikta is designed for developers who want to move fast without breaking things.
- π Zero-Config Autowiring: No
imports: [],exports: [], orproviders: []arrays. Just decorate your class, and it works. - β‘ Fastify Powered: Built on top of Fastify for maximum performance and low overhead.
- π‘οΈ Type-Safe by Default: Native Zod integration for validation that infers your TypeScript types automatically.
- π Hybrid Lifecycle: Powerful hooks and an event bus for complex application flows.
Rikta is nordic for "guide". Let Rikta guide you to build better backends, faster.
β‘ Quick Start
Get up and running in seconds with the Rikta CLI:
# Create a new project
npx @riktajs/cli new my-app
# Start development
cd my-app
npm run dev
That's it! π Your API is running at http://localhost:3000
What you get
The CLI generates a complete project with:
- β TypeScript configuration optimized for Rikta
- β Example controller with REST endpoints
- β Example service with dependency injection
- β Hot reload development server
- β Production build for serverless deployment
Generated Code Example
// src/controllers/app.controller.ts
import { Controller, Get, Autowired } from '@riktajs/core';
import { GreetingService } from '../services/greeting.service.js';
@Controller()
export class AppController {
@Autowired()
private greetingService!: GreetingService;
@Get('/')
index() {
return { message: this.greetingService.getGreeting() };
}
@Get('/health')
health() {
return { status: 'ok', timestamp: new Date().toISOString() };
}
}
// src/services/greeting.service.ts
import { Injectable } from '@riktajs/core';
@Injectable()
export class GreetingService {
getGreeting(): string {
return 'Welcome to Rikta! π';
}
}
π¦ Packages
| Package | Description | Version |
|---|---|---|
| @riktajs/core | Core framework with DI, routing, and validation | |
| @riktajs/cli | CLI for scaffolding and development | |
| @riktajs/swagger | OpenAPI/Swagger documentation | |
| @riktajs/typeorm | TypeORM integration | |
| @riktajs/queue | BullMQ-based job queue integration for Rikta |
π οΈ CLI Commands
| Command | Description |
|---|---|
rikta new <name> | Create a new Rikta project |
rikta dev | Start development server with hot reload |
rikta build | Build for production (serverless optimized) |
# Global installation (optional)
npm install -g @riktajs/cli
# Or use npx directly
npx @riktajs/cli new my-app
See the CLI Guide for full documentation.
π Documentation
Everything you need to build production-ready APIs.
| Guide | Description |
|---|---|
| Architecture | How Rikta's auto-discovery works under the hood. |
| Dependency Injection | Using @Autowired, tokens, and scopes. |
| Configuration | Type-safe configuration with .env and Zod validation. |
| Routing | Controllers, methods, and parameter handling. |
| Validation | New! Type-safe validation with Zod. |
| Lifecycle | Hooks (OnProviderInit) and the Event Bus. |
| Error Handling | Exception filters and standard JSON responses. |
| CLI Guide | Using the Rikta CLI. |
| Benchmarks | Performance comparison with Fastify & NestJS. |
β‘ Performance
Rikta is built on Fastify and delivers excellent performance. From our benchmarks:
| Metric | Rikta vs NestJS | Result |
|---|---|---|
| Startup | π’ -43% | Rikta is faster |
| GET requests | π’ -41% | Rikta is faster |
| POST requests | π’ -25% | Rikta is faster |
| Param requests | π’ -46% | Rikta is faster |
| Average | π’ ~40% | Rikta is faster |
Rikta adds minimal overhead (~2-5%) over vanilla Fastify while providing DI, decorators, and structured architecture.
For detailed tests:
cd benchmarks
npm install
npm run bench
Production Mode
For maximum performance, use silent mode:
const app = await Rikta.create({
port: 3000,
silent: true, // Disable all console output
logger: false // Disable Fastify logging
});
β¨ Key Features
π« No Modules, Just Logic
Forget about AppModule, UserModule, SharedModule. Rikta scans your code and resolves dependencies automatically.
β Native Zod Validation
Don't duplicate your types. Define a Zod schema, and Rikta validates the request and gives you the TypeScript type.
@Post()
create(@Body(UserSchema) user: z.infer<typeof UserSchema>) {
// If we get here, 'user' is valid and typed.
// If not, Rikta returns a 400 Bad Request automatically.
}
π Powerful Dependency Injection
Support for Singleton (default) and Transient scopes, factory providers, and value tokens.
@Injectable()
class AuthService {
constructor(
@Autowired(DB_CONFIG) private config: Config,
@Autowired() private logger: LoggerService
) {}
}
π Sponsors
Rikta is proudly sponsored by:
Artiforge - AI-powered development tools
π€ Contributing
We love contributions! Please check our Contributing Guide (Coming Soon) and join our community.
π License
Rikta is MIT licensed.
