nestjs-mcp
by orbit-codes·★ 11·Score 42
A NestJS integration for MCP that enables building MCP servers using dependency injection and decorators.
Overview
The nestjs-mcp package provides a seamless way to create MCP servers within the NestJS framework. It leverages NestJS's dependency injection system and decorator-based architecture to expose resources, tools, and prompts through the MCP protocol. The package supports both HTTP/SSE and stdio transports, making it flexible for different deployment scenarios.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this if you're already using NestJS and want to build MCP servers while leveraging dependency injection and decorator patterns.
When NOT to choose this
Avoid if you're not using NestJS or prefer a more lightweight MCP implementation without framework dependencies.
Tools this server exposes
1 tool extracted from the READMEaddadd(a: number, b: number): stringAdd two numbers together
Comparable tools
Installation
npm install @orbit-codes/nestjs-mcp @modelcontextprotocol/sdk zodIn your NestJS application:
import { Module } from '@nestjs/common';
import { MCPModule } from '@orbit-codes/nestjs-mcp';
@Module({
imports: [
MCPModule.register({
name: 'MyMCPServer',
version: '1.0.0',
sseEndpoint: '/mcp/sse',
messagesEndpoint: '/mcp/messages',
}),
],
})
export class AppModule {}For Claude Desktop, add to config.json:
{
"mcpServers": {
"nestjs-mcp": {
"command": "node",
"args": ["path/to/your/app.js"]
}
}
}FAQ
- What NestJS versions are supported?
- The package is designed to work with modern NestJS versions. Check the package documentation for specific version compatibility.
- Can I use this with non-NestJS Node.js applications?
- While designed specifically for NestJS, the underlying MCP functionality could potentially be adapted for other Node.js frameworks, though this would require additional integration work.
Compare nestjs-mcp with
Last updated · Auto-generated from public README + GitHub signals.