Skip to content

Latest commit

 

History

History
95 lines (70 loc) · 2.68 KB

File metadata and controls

95 lines (70 loc) · 2.68 KB

MCPKit

npm version License: MIT

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

Read the full documentation

Packages

Package Description
@mcpkit-dev/core Core framework with decorators and server
@mcpkit-dev/cli CLI for project scaffolding
@mcpkit-dev/testing Testing utilities and mock clients

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