MCPKit
A modern, decorator-based framework for building Model Context Protocol (MCP) servers in TypeScript.
Why MCPKit?
- Decorator-based API - Clean, declarative syntax inspired by NestJS
- Type-safe - Full TypeScript support with automatic type inference
- Raw results -
@Tool({ rawResult: true })for full control over MCP responses - Production-ready - Built-in auth, rate limiting, metrics, tracing, and health checks
- Extensible - Plugin system for reusable functionality
- Multiple transports - stdio, HTTP/SSE, and Streamable HTTP support
Quick Start
npx @mcpkit-dev/cli init my-server
cd my-server
npm run dev
Or install manually:
npm install @mcpkit-dev/core reflect-metadata zod
import 'reflect-metadata';
import { createServer, MCPServer, Tool, Param } from '@mcpkit-dev/core';
@MCPServer({
name: 'my-server',
version: '1.0.0',
})
class MyServer {
@Tool({ description: 'Greet someone' })
greet(@Param({ name: 'name', description: 'Name to greet' }) name: string) {
return `Hello, ${name}!`;
}
}
const server = createServer(MyServer);
await server.listen();
Documentation
Packages
Using with Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["/path/to/your/server/dist/index.js"]
}
}
}
Requirements
- Node.js 18+
- TypeScript 5.0+
Contributing
Contributions are welcome! Please read our contributing guidelines.
License
MIT